/ Check-in [ca0e3a83]
Login

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

Overview
Comment:Test cases for ticket [587791f92620090e]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ca0e3a83a1c015b346a791e6de03904d17a769c52dad0e3d71316c6e2e3f43c7
User & Date: drh 2019-09-17 13:30:30
Context
2019-09-17
21:28
Do not change the OP_String8 opcode into OP_String until *after* any necessary encoding conversions are accomplished. Otherwise, a rerun of the prepared statement after an OOM can result in errors. Test case in TH3. check-in: 8efd6259 user: drh tags: trunk
13:30
Test cases for ticket [587791f92620090e] check-in: ca0e3a83 user: drh tags: trunk
03:16
Fix the instr() SQL function so that it makes a copy of its argument before changing the datatype, since the datatype affects processing. Also fix the sqlite3_value_text() routine so that it always works even for values obtained form sqlite3_value_dup(). Ticket [587791f92620090e] check-in: 3fb40f51 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/instr.test.

   252    252     SELECT instr(X'', 'abc')
   253    253   } 0
   254    254   do_execsql_test instr-1.64 {
   255    255     CREATE TABLE x1(a, b);
   256    256     INSERT INTO x1 VALUES(X'', 'abc');
   257    257     SELECT instr(a, b) FROM x1;
   258    258   } 0
          259  +
          260  +# 2019-09-16 ticket https://www.sqlite.org/src/info/587791f92620090e
          261  +#
          262  +do_execsql_test instr-2.0 {
          263  +  DROP TABLE IF EXISTS t0;
          264  +  CREATE TABLE t0(c0 PRIMARY KEY, c1);
          265  +  INSERT INTO t0(c0) VALUES (x'bb'), (0);
          266  +  SELECT COUNT(*) FROM t0 WHERE INSTR(x'aabb', t0.c0) ORDER BY t0.c0, t0.c1;
          267  +} {1}
          268  +do_execsql_test instr-2.1 {
          269  +  SELECT quote(c0) FROM t0 WHERE INSTR(x'aabb', t0.c0) ORDER BY t0.c0, t0.c1;
          270  +} {X'BB'}
          271  +do_execsql_test instr-2.2 {
          272  +  DROP TABLE IF EXISTS t1;
          273  +  CREATE TABLE t1(x);
          274  +  INSERT INTO t1(x) VALUES('text'),(x'bb');
          275  +  SELECT quote(x) FROM t1 WHERE instr(x'aabb',x);
          276  +} {X'BB'}
          277  +do_execsql_test instr-2.3 {
          278  +  SELECT quote(x) FROM t1 WHERE x>'zzz' AND instr(x'aabb',x);
          279  +} {X'BB'}
   259    280   
   260    281   finish_test