Index: third_party/sqlite/src/test/json103.test |
diff --git a/third_party/sqlite/src/test/json103.test b/third_party/sqlite/src/test/json103.test |
index 0f0241e6fcac4eaf85045aa93e3c346beadc7cfd..d7d12e3378259c7b92bfc0a89504d97fd9b04e7a 100644 |
--- a/third_party/sqlite/src/test/json103.test |
+++ b/third_party/sqlite/src/test/json103.test |
@@ -60,6 +60,19 @@ do_execsql_test json103-220 { |
WHERE rowid<7 GROUP BY b ORDER BY b; |
} {0 {{"n3":3,"n6":6}} 1 {{"n1":1,"n4":4}} 2 {{"n2":2,"n5":5}}} |
- |
+# ticket https://www.sqlite.org/src/info/f45ac567eaa9f93c 2016-01-30 |
+# Invalid JSON generated by json_group_array() |
+# |
+# The underlying problem is a failure to reset Mem.eSubtype |
+# |
+do_execsql_test json103-300 { |
+ DROP TABLE IF EXISTS t1; |
+ CREATE TABLE t1(x); |
+ INSERT INTO t1 VALUES(1),('abc'); |
+ SELECT |
+ json_group_array(x), |
+ json_group_array(json_object('x',x)) |
+ FROM t1; |
+} {{[1,"abc"]} {[{"x":1},{"x":"abc"}]}} |
finish_test |