aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/json101.test18
-rw-r--r--test/window1.test5
-rw-r--r--test/with3.test4
3 files changed, 23 insertions, 4 deletions
diff --git a/test/json101.test b/test/json101.test
index b84846d88..135c988e9 100644
--- a/test/json101.test
+++ b/test/json101.test
@@ -867,4 +867,22 @@ do_catchsql_test json-18.5 {
SELECT json_extract('{"":8}', '$.');
} {1 {JSON path error near ''}}
+# 2022-08-29 https://sqlite.org/forum/forumpost/9b9e4716c0d7bbd1
+# This is not a problem specifically with JSON functions. It is
+# a problem with transaction control. But the json() function makes
+# the problem more easily accessible, so it is tested here.
+#
+do_execsql_test json-19.1 {
+ DROP TABLE IF EXISTS t1;
+ CREATE TABLE t1(x);
+} {}
+do_catchsql_test json-19.2 {
+ BEGIN;
+ INSERT INTO t1 VALUES(0), (json('not-valid-json'));
+} {1 {malformed JSON}}
+do_execsql_test json-19.3 {
+ COMMIT;
+ SELECT * FROM t1;
+} {}
+
finish_test
diff --git a/test/window1.test b/test/window1.test
index fd71ed6bb..0f2282984 100644
--- a/test/window1.test
+++ b/test/window1.test
@@ -212,10 +212,11 @@ do_execsql_test 6.1 {
} {1 1 2 2 3 3 4 4 5 5 6 6 7 7}
do_execsql_test 6.2 {
- SELECT * FROM t2, (SELECT x, count(*) OVER (ORDER BY x) FROM t1);
+ SELECT * FROM t2, (SELECT x, count(*) OVER (ORDER BY x) FROM t1)
+ ORDER BY 1, 2;
} {
- b 1 1 b 2 2 b 3 3 b 4 4 b 5 5 b 6 6 b 7 7
a 1 1 a 2 2 a 3 3 a 4 4 a 5 5 a 6 6 a 7 7
+ b 1 1 b 2 2 b 3 3 b 4 4 b 5 5 b 6 6 b 7 7
}
do_catchsql_test 6.3 {
diff --git a/test/with3.test b/test/with3.test
index 8e8eba89f..1aed92a99 100644
--- a/test/with3.test
+++ b/test/with3.test
@@ -131,8 +131,8 @@ do_eqp_test 3.2.2 {
| | `--SCALAR SUBQUERY xxxxxx
| | `--SCAN w2
| `--RECURSIVE STEP
- | |--SCAN w1
- | `--SCAN c
+ | |--SCAN c
+ | `--SCAN w1
|--SCAN c
|--SEARCH w2 USING INTEGER PRIMARY KEY (rowid=?)
`--SEARCH w1 USING INTEGER PRIMARY KEY (rowid=?)