/ Check-in [ef94ea06]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:New test cases for ticket [b899b6042f97f5] derived from a bug report on the mailing list from Wout Mertens.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ef94ea061d2ec8ee0243e97dfcfc7a7c75dd22006e61a7195b780722bbc925db
User & Date: drh 2017-10-04 14:13:29
Context
2017-10-04
16:35
Fix typos in session extension header comments. No changes to code. check-in: 182ec9d6 user: mistachkin tags: trunk
14:13
New test cases for ticket [b899b6042f97f5] derived from a bug report on the mailing list from Wout Mertens. check-in: ef94ea06 user: drh tags: trunk
12:08
Amend recent changes to busy.test to avoid failing with SQLITE_ENABLE_STAT4 builds. check-in: 9ff49441 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/whereF.test.

   191    191       INSERT INTO t6 VALUES
   192    192        (0,null,'{"a":0,"b":[3,4,5],"c":{"x":4.5,"y":7.8}}'),
   193    193        (1,null,'{"a":1,"b":[3,4,5],"c":{"x":4.5,"y":7.8}}'),
   194    194        (2,null,'{"a":9,"b":[3,4,5],"c":{"x":4.5,"y":7.8}}');
   195    195       SELECT * FROM t6
   196    196        WHERE (EXISTS (SELECT 1 FROM json_each(t6.c) AS x WHERE x.value=1));
   197    197     } {1 {} {{"a":1,"b":[3,4,5],"c":{"x":4.5,"y":7.8}}}}
   198         -    
          198  +
          199  +  # Another test case derived from a posting by Wout Mertens on the
          200  +  # sqlite-users mailing list on 2017-10-04.
          201  +  do_execsql_test 6.3 {
          202  +    DROP TABLE IF EXISTS t;
          203  +    CREATE TABLE t(json JSON);
          204  +    SELECT * FROM t
          205  +     WHERE(EXISTS(SELECT 1 FROM json_each(t.json,"$.foo") j
          206  +                   WHERE j.value = 'meep'));
          207  +  } {}
          208  +  do_execsql_test 6.4 {
          209  +    INSERT INTO t VALUES('{"xyzzy":null}');
          210  +    INSERT INTO t VALUES('{"foo":"meep","other":12345}');
          211  +    INSERT INTO t VALUES('{"foo":"bingo","alt":5.25}');
          212  +    SELECT * FROM t
          213  +     WHERE(EXISTS(SELECT 1 FROM json_each(t.json,"$.foo") j
          214  +                   WHERE j.value = 'meep'));
          215  +  } {{{"foo":"meep","other":12345}}}
   199    216   }
   200    217   
   201    218   finish_test