From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 7FF79277EC for ; Wed, 18 Jul 2018 11:57:52 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z6TiWciSxZMb for ; Wed, 18 Jul 2018 11:57:52 -0400 (EDT) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id DBCE324420 for ; Wed, 18 Jul 2018 11:57:51 -0400 (EDT) Received: by mail-lf0-f65.google.com with SMTP id u14-v6so3836208lfu.0 for ; Wed, 18 Jul 2018 08:57:51 -0700 (PDT) MIME-Version: 1.0 References: <1530190036-10105-1-git-send-email-hollow653@gmail.com> <20180718024314.be245cmsgklxuvnk@tkn_work_nb> In-Reply-To: From: Nikita Tatunov Date: Wed, 18 Jul 2018 18:57:39 +0300 Message-ID: Subject: [tarantool-patches] Re: [PATCH] sql: LIKE & GLOB pattern comparison issue Content-Type: multipart/alternative; boundary="000000000000e8d9790571481f9a" Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: avkhatskevich@tarantool.org Cc: alexander.turenko@tarantool.org, tarantool-patches@freelists.org --000000000000e8d9790571481f9a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D1=81=D1=80, 18 =D0=B8=D1=8E=D0=BB. 2018 =D0=B3. =D0=B2 18:53, Alex Khatsk= evich : > Once you have fixed comments, please apply a new full diff at the end of > email, to > continue review process. > Answer with a full diff to this email please (just paste as a plain text > output of `git diff` command) > > On 18.07.2018 18:24, Nikita Tatunov wrote: > > > Fixed it. > > Yeah, you're right. Fixed it. > > Isn't actual with the fix. > > Yeah, sure. > > > Sorry. Here it is: diff --git a/src/box/sql/func.c b/src/box/sql/func.c index c06e3bd..a7f7c17 100644 --- a/src/box/sql/func.c +++ b/src/box/sql/func.c @@ -617,13 +617,15 @@ struct compareInfo { u8 noCase; /* true to ignore case differences */ }; -/* - * For LIKE and GLOB matching on EBCDIC machines, assume that every - * character is exactly one byte in size. Also, provde the Utf8Read() - * macro for fast reading of the next character in the common case where - * the next character is ASCII. +/** + * Providing there are symbols in string s this macro returns + * UTF-8 code of character and pushes pointer to the next symbol + * in the string. Otherwise return code is SQL_END_OF_STRING. */ -#define Utf8Read(s, e) ucnv_getNextUChar(pUtf8conv, &s, e, &status) +#define Utf8Read(s, e) (s < e ?\ + ucnv_getNextUChar(pUtf8conv, &s, e, &status) : 0) + +#define SQL_END_OF_STRING 0 static const struct compareInfo globInfo =3D { '*', '?', '[', 0 }; @@ -698,29 +700,27 @@ patternCompare(const char * pattern, /* The glob pattern */ const char * string_end =3D string + strlen(string); UErrorCode status =3D U_ZERO_ERROR; - while (pattern < pattern_end){ - c =3D Utf8Read(pattern, pattern_end); + while ((c =3D Utf8Read(pattern, pattern_end))) { if (c =3D=3D matchAll) { /* Match "*" */ /* Skip over multiple "*" characters in the pattern. If there * are also "?" characters, skip those as well, but consume a * single character of the input string for each "?" skipped */ - while (pattern < pattern_end){ - c =3D Utf8Read(pattern, pattern_end); + while ((c =3D Utf8Read(pattern, pattern_end))) { if (c !=3D matchAll && c !=3D matchOne) break; - if (c =3D=3D matchOne - && Utf8Read(string, string_end) =3D=3D 0) { + if (c =3D=3D matchOne && + Utf8Read(string, string_end) =3D=3D + SQL_END_OF_STRING) return SQLITE_NOWILDCARDMATCH; - } } /* "*" at the end of the pattern matches */ - if (pattern =3D=3D pattern_end) + if (c =3D=3D SQL_END_OF_STRING) return SQLITE_MATCH; if (c =3D=3D matchOther) { if (pInfo->matchSet =3D=3D 0) { c =3D Utf8Read(pattern, pattern_end); - if (c =3D=3D 0) + if (c =3D=3D SQL_END_OF_STRING) return SQLITE_NOWILDCARDMATCH; } else { /* "[...]" immediately follows the "*". We have to do a slow @@ -782,7 +782,7 @@ patternCompare(const char * pattern, /* The glob pattern */ if (c =3D=3D matchOther) { if (pInfo->matchSet =3D=3D 0) { c =3D Utf8Read(pattern, pattern_end); - if (c =3D=3D 0) + if (c =3D=3D SQL_END_OF_STRING) return SQLITE_NOMATCH; zEscaped =3D pattern; } else { @@ -802,7 +802,7 @@ patternCompare(const char * pattern, /* The glob pattern */ seen =3D 1; c2 =3D Utf8Read(pattern, pattern_end); } - while (c2 && c2 !=3D ']') { + while (c2 !=3D SQL_END_OF_STRING && c2 !=3D ']') { if (c2 =3D=3D '-' && pattern[0] !=3D ']' && pattern < pattern_end && prior_c > 0) { @@ -839,7 +839,8 @@ patternCompare(const char * pattern, /* The glob pattern */ c =3D=3D u_tolower(c2)) continue; } - if (c =3D=3D matchOne && pattern !=3D zEscaped && c2 !=3D 0) + if (c =3D=3D matchOne && pattern !=3D zEscaped && + c2 !=3D SQL_END_OF_STRING) continue; return SQLITE_NOMATCH; } diff --git a/test/sql-tap/like1.test.lua b/test/sql-tap/like1.test.lua new file mode 100755 index 0000000..807ee65 --- /dev/null +++ b/test/sql-tap/like1.test.lua @@ -0,0 +1,181 @@ +#!/usr/bin/env tarantool +test =3D require("sqltester") +test:plan(16) + +test:do_catchsql_test( + "like-test-1.1", + [[ + CREATE TABLE t2 (column1 INTEGER, + column2 VARCHAR(100), + column3 BLOB, + column4 FLOAT, + PRIMARY KEY (column1, column2)); + INSERT INTO t2 VALUES (1, 'AB', X'4142', 5.5); + INSERT INTO t2 VALUES (1, 'CD', X'2020', 1E4); + INSERT INTO t2 VALUES (2, 'AB', X'2020', 12.34567); + INSERT INTO t2 VALUES (-1000, '', X'', 0.0); + CREATE TABLE t1 (a INT PRIMARY KEY, str VARCHAR(100)); + INSERT INTO t1 VALUES (1, 'ab'); + INSERT INTO t1 VALUES (2, 'abCDF'); + INSERT INTO t1 VALUES (3, 'CDF'); + CREATE TABLE t (s1 char(2) primary key, s2 char(2)); + INSERT INTO t VALUES ('AB', 'AB'); + ]], { + -- + 0 + -- + }) + +test:do_execsql_test( + "like-test-1.2", + [[ + SELECT column1, column2, column1 * column4 FROM t2 WHERE column2 LIKE '_B'; + ]], { + -- + 1, 'AB', 5.5, 2, 'AB', 24.69134 + -- + }) + +test:do_execsql_test( + "like-test-1.3", + [[ + SELECT column1, column2 FROM t2 WHERE column2 LIKE '%B'; + ]], { + -- + 1, 'AB', 2, 'AB' + -- + }) + +test:do_execsql_test( + "like-test-1.4", + [[ + SELECT column1, column2 FROM t2 WHERE column2 LIKE 'A__'; + ]], { + -- + + -- + }) + +test:do_execsql_test( + "like-test-1.5", + [[ + SELECT column1, column2 FROM t2 WHERE column2 LIKE 'A_'; + ]], { + -- + 1, 'AB', 2, 'AB' + -- + }) + +test:do_execsql_test( + "like-test-1.6", + [[ + SELECT column1, column2 FROM t2 WHERE column2 LIKE 'A'; + ]], { + -- + + -- + }) + +test:do_execsql_test( + "like-test-1.7", + [[ + SELECT column1, column2 FROM t2 WHERE column2 LIKE '_'; + ]], { + -- + + -- + }) + +test:do_execsql_test( + "like-test-1.8", + [[ + SELECT * FROM t WHERE s1 LIKE '%A'; + ]], { + -- + + -- + }) + +test:do_execsql_test( + "like-test-1.9", + [[ + SELECT * FROM t WHERE s1 LIKE '%C'; + ]], { + -- + + -- + }) + +test:do_execsql_test( + "like-test-1.10", + [[ + SELECT * FROM t1 WHERE str LIKE '%df'; + ]], { + -- + 2, 'abCDF', 3, 'CDF' + -- + }) + +test:do_execsql_test( + "like-test-1.11", + [[ + SELECT * FROM t1 WHERE str LIKE 'a_'; + ]], { + -- + 1, 'ab' + -- + }) + +test:do_execsql_test( + "like-test-1.12", + [[ + SELECT column1, column2 FROM t2 WHERE column2 LIKE '__'; + ]], { + -- + 1, 'AB', 1, 'CD', 2, 'AB' + -- + }) + +test:do_execsql_test( + "like-test-1.13", + [[ + SELECT str FROM t1 WHERE str LIKE 'ab%'; + ]], { + -- + 'ab', 'abCDF' + -- + }) + +test:do_execsql_test( + "like-test-1.14", + [[ + SELECT str FROM t1 WHERE str LIKE 'abC%'; + ]], { + -- + 'abCDF' + -- + }) + +test:do_execsql_test( + "like-test-1.15", + [[ + SELECT str FROM t1 WHERE str LIKE 'a_%'; + ]], { + -- + 'ab', 'abCDF' + -- + }) + +test:do_execsql_test( + "like-test-1.16", + [[ + DROP TABLE t1; + DROP TABLE t2; + DROP TABLE t; + ]], { + -- + + -- + }) + +test:finish_test() --000000000000e8d9790571481f9a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

=D1=81=D1= =80, 18 =D0=B8=D1=8E=D0=BB. 2018 =D0=B3. =D0=B2 18:53, Alex Khatskevich <= ;avkhatskevich@tarantool.org= >:
=20 =20 =20
Once you have fixed comments, please apply a new full diff at the end of email, to
continue review process.
Answer with a full diff to this email please (just paste as a plain text output of `git diff` command)

On 18.07.201= 8 18:24, Nikita Tatunov wrote:

Fixed it.

Yeah, you're right. Fixed it.
=C2=A0
Isn't actual with the fix.

Yeah, sure.=C2=A0


Sorry. Here it is:

diff --git a/src/box/sql/func.c b/src/box/sql/func.c
index c06= e3bd..a7f7c17 100644
--- a/src/box/sql/func.c
+++ b/src= /box/sql/func.c
@@ -617,13 +617,15 @@ struct compareInfo {
<= div>=C2=A0 u8 noCase; /* true to ignore case differences */
= =C2=A0};
=C2=A0
-/*
- * For LIKE and GLOB mat= ching on EBCDIC machines, assume that every
- * character is exac= tly one byte in size.=C2=A0 Also, provde the Utf8Read()
- * macro= for fast reading of the next character in the common case where
= - * the next character is ASCII.
+/**
+ * Providing the= re are symbols in string s this macro returns
+ * UTF-8 code of c= haracter and pushes pointer to the next symbol
+ * in the string.= Otherwise return code is SQL_END_OF_STRING.
=C2=A0 */
= -#define Utf8Read(s, e)=C2=A0 =C2=A0 ucnv_getNextUChar(pUtf8conv, &s, e= , &status)
+#define Utf8Read(s, e) (s < e ?\
+ ucnv_getNextUChar(pUtf8conv, &s, = e, &status) : 0)
+
+#define SQL_END_OF_STRING=C2=A0= =C2=A0 =C2=A0 =C2=A00
=C2=A0
=C2=A0static const struct= compareInfo globInfo =3D { '*', '?', '[', 0 };
=C2=A0
@@ -698,29 +700,27 @@ patternCompare(const char * p= attern, /* The glob pattern */
=
=C2=A0 const char * string_end = =3D string + strlen(string);
=C2=A0 UErrorCode status =3D U_ZERO_ERROR;
=C2=A0
-<= span style=3D"white-space:pre"> while (pattern < pattern_end){
- c =3D Utf8Read(pattern, p= attern_end);
+ while ((c = =3D Utf8Read(pattern, pattern_end))) {
=C2=A0 if (c =3D=3D matchAll) { /* Match "*" */
=C2=A0 /* Skip over multiple "*" characters in the pa= ttern.=C2=A0 If there
=C2=A0 * are also "?" characters, skip those as well, but consume = a
=C2=A0 * single chara= cter of the input string for each "?" skipped
=C2=A0 */
- while (pattern < pattern_end){
- c =3D Utf8Read(pattern, pattern_end);
+ while ((c =3D Utf8Read(pa= ttern, pattern_end))) {
=C2=A0 = if (c !=3D matchAll && c !=3D matchOne)
=C2=A0 break;
- if (c =3D=3D matchOne
- =C2=A0 =C2=A0 && Utf8Read(string, strin= g_end) =3D=3D 0) {
+ if= (c =3D=3D matchOne &&
+ = =C2=A0 =C2=A0 Utf8Read(string, string_end) =3D=3D
+ =C2=A0 =C2=A0 SQL_END_OF_STRING)
=C2=A0 return SQLITE_NOWI= LDCARDMATCH;
- }
<= div>=C2=A0 }
=C2=A0 /* "*" at the end of the pat= tern matches */
- if (pa= ttern =3D=3D pattern_end)
+ if (c =3D=3D SQL_END_OF_STRING)
=C2=A0 return SQLITE_MATCH;
=C2=A0 if (c =3D=3D matchOther) {
=C2=A0 if (pInfo->matchSet =3D=3D 0) {
=
=C2=A0 c =3D Utf8Read(patte= rn, pattern_end);
- if= (c =3D=3D 0)
+ if (c = =3D=3D SQL_END_OF_STRING)
=C2=A0 = return SQLITE_NOWILDCARDMATCH;
=C2=A0 } else {
=C2=A0 /* "[...]" immediately follows the "*&q= uot;.=C2=A0 We have to do a slow
@@ -782,7 +782,7 @@ patternCompa= re(const char * pattern, /* The glob= pattern */
=C2=A0 if (c = =3D=3D matchOther) {
=C2=A0 if (pInfo->matchSet =3D=3D 0) {
=C2=A0 c =3D Utf8Read(pattern, pattern_end);
- if (c =3D=3D 0)
+ if (c =3D=3D SQL_END_OF_STRING)
=C2=A0 return SQLITE_NOMATCH;<= /div>
=C2=A0 zEscaped =3D pat= tern;
=C2=A0 } else {
@@ -802,7 +802,7 @@ patternCompare(const char * pattern, /* The glob pattern */
=C2=A0 seen =3D 1;
=C2=A0 c2 =3D Utf8Read(pattern, pattern_end);
=C2=A0 }
- while (c2 && c2 !=3D ']&= #39;) {
+ while (c2 != =3D SQL_END_OF_STRING && c2 !=3D ']') {
=C2=A0 if (c2 =3D=3D '-' &&am= p; pattern[0] !=3D ']'
=C2=A0 =C2=A0 =C2=A0 && pattern < pattern_end
=C2=A0 =C2=A0 =C2=A0 &&= prior_c > 0) {
@@ -839,7 +839,8 @@ patternCompare(const char = * pattern, /* The glob pattern */
=C2=A0 =C2=A0 =C2=A0 c =3D= =3D u_tolower(c2))
=C2=A0 continue;
=C2=A0 }
- if (c =3D=3D matchOne &= ;& pattern !=3D zEscaped && c2 !=3D 0)
+ if (c =3D=3D matchOne && pattern !=3D= zEscaped &&
+ = =C2=A0 =C2=A0 c2 !=3D SQL_END_OF_STRING)
=C2=A0 continue;
=C2=A0 return SQLITE_NOMATCH;
=C2=A0 }
diff --git a/test/sql-tap/like1.test.lua b/= test/sql-tap/like1.test.lua
new file mode 100755
index = 0000000..807ee65
--- /dev/null
+++ b/test/sql-tap/like1= .test.lua
@@ -0,0 +1,181 @@
+#!/usr/bin/env tarantool
+test =3D require("sqltester")
+test:plan(16)<= /div>
+
+test:do_catchsql_test(
+ "like-test-1.1",
+ [[
+ CREATE TABLE t2 (column1 INTEGER,
+ =C2=A0 =C2=A0 =C2=A0column2 VARCHAR(100),
+ =C2=A0 =C2=A0 =C2=A0column3 BLOB,
+ =C2=A0 =C2=A0 =C2=A0col= umn4 FLOAT,
+ =C2=A0 = =C2=A0 =C2=A0PRIMARY KEY (column1, column2));
+ INSERT INTO t2 VALUES (1, 'AB', X'4142&#= 39;, 5.5);
+ INSERT INTO = t2 VALUES (1, 'CD', X'2020', 1E4);
+ INSERT INTO t2 VALUES (2, 'AB', X'= ;2020', 12.34567);
+ = INSERT INTO t2 VALUES (-1000, '', X'', 0.0);
+ CREATE TABLE t1 (a INT PRIMARY KEY, s= tr VARCHAR(100));
+ INSER= T INTO t1 VALUES (1, 'ab');
+ INSERT INTO t1 VALUES (2, 'abCDF');
+ INSERT INTO t1 VALUES (3, 'CDF');=
+ CREATE TABLE t (s1 cha= r(2) primary key, s2 char(2));
+ = INSERT INTO t VALUES ('AB', 'AB');
+ ]], {
+ -- <like-test-1.1>
+ 0
+ -= - <like-test-1.1>
+ = })
+
+test:do_execsql_test(
+ "like-test-1.2",
+ [[
+= SELECT column1, column2, column1 * column4 FROM t2 WHERE column2 L= IKE '_B';
+ ]], {<= /div>
+ -- <like-test-1.2>= ;
+ 1, 'AB', 5.5,= 2, 'AB', 24.69134
+ -- <like-test-1.2>
+ })
+
+test:do_execsql_test(
+ "like-test-1.3",
+ [[
+ SELECT column1, column2 FROM t2 WHERE column2 LIKE '%B'= ;
+ ]], {
+=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.3>
=
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01, 'AB', 2, &= #39;AB'
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- &= lt;like-test-1.3>
+ })<= /div>
+
+test:do_execsql_test(
+ "like-test-1.4",
+ [[
+ SELECT column1, column2 FROM t2 WHERE column2 LIKE 'A__';
=
+ ]], {
+=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.4>
+<= /div>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test= -1.4>
+ })
+<= /div>
+test:do_execsql_test(
+ "like-test-1.5",
+ [[
+ SELECT c= olumn1, column2 FROM t2 WHERE column2 LIKE 'A_';
+ ]], {
+=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.5>
+=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01, 'AB', 2, 'AB'
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.5>=
+ })
+
+test:do_execsql_test(
+ "like-test-1.6",
+ [[
+ SELECT column1, = column2 FROM t2 WHERE column2 LIKE 'A';
+ ]], {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0-- <like-test-1.6>
+
+=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.6>
+ })
+
+test:do_execs= ql_test(
+ "like-test= -1.7",
+ [[
+ SELECT column1, column2 FROM t2 = WHERE column2 LIKE '_';
+= ]], {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--= <like-test-1.7>
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0-- <like-test-1.7>
+ })
+
+test:do_execsql_test(
<= div>+ "like-test-1.8",
+ [[
+ SELECT * FROM t WHERE s1 LIKE '%A';
+ ]], {
+=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.8>
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-t= est-1.8>
+ })
+
+test:do_execsql_test(
+ "like-test-1.9",
+ [[
+ SELEC= T * FROM t WHERE s1 LIKE '%C';
+ ]], {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0-- <like-test-1.9>
+
+=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.9>
+ })
+
+test:do_execsql_test= (
+ "like-test-1.10&q= uot;,
+ [[
+ SELECT * FROM t1 WHERE str LIKE '%= df';
+ ]], {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.10>=
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02, 'abCDF&#= 39;, 3, 'CDF'
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0-- <like-test-1.10>
+= })
+
+test:do_execsql_test(
+ "like-test-1.11",
+ [[
+ SELECT * FROM t1 WHERE str LIKE 'a_';
+ ]], {
+=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.11>
+=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01, 'ab'
+=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.11>
+= })
+
+test:do_e= xecsql_test(
+ "like-= test-1.12",
+ [[
+ SELECT column1, column2 FRO= M t2 WHERE column2 LIKE '__';
+ ]], {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0-- <like-test-1.12>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A01, 'AB', 1, 'CD', 2, 'AB'
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.12>= ;
+ })
+
+test:do_execsql_test(
+ "like-test-1.13",
+ <= /span>[[
+ SELECT str FRO= M t1 WHERE str LIKE 'ab%';
+ ]], {
+ -- <= ;like-test-1.13>
+ = 9;ab', 'abCDF'
+ -- <like-test-1.13>
+ <= /span>})
+
+test:do_execsql_test(
+ "like-test-1.14",
+ [[
+ SELECT str FROM t1 WHERE str LIKE 'abC%';
+= ]], {
+ -- <like-test-1.14>
+ 'abCDF'
+ -- <like-test-1.14>
+ })
+
+test:do_execsql_test(
<= div>+ "like-test-1.15",
+ [[
+ SELECT str FROM t1 WHERE str LIKE 'a_%= 9;;
+ ]], {
+ -- <like-test-1.15>
+= 'ab', 'abCDF'
+ -- <like-test-1.15>
+ })
+
= +test:do_execsql_test(
+ &= quot;like-test-1.16",
+ [[
+ DROP TABLE t1;
+ DROP TABLE t2;
= + DROP TABLE t;
+ ]], {
+=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.16>
+
+= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-- <like-test-1.16>
+ })
+
= +test:finish_test()
=C2=A0
--000000000000e8d9790571481f9a--