mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-21 11:13:54 +03:00
Small performance increase and size reduction in the implementation of the
LIKE and GLOB operators. FossilOrigin-Name: f97626f921dafe596b615a168ef31987f4a1c0b52956443e1a5c1148b49cab74
This commit is contained in:
@@ -843,8 +843,6 @@ static void likeFunc(
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
zB = sqlite3_value_text(argv[0]);
|
||||
zA = sqlite3_value_text(argv[1]);
|
||||
|
||||
/* Limit the length of the LIKE or GLOB pattern to avoid problems
|
||||
** of deep recursion and N*N behavior in patternCompare().
|
||||
@@ -856,8 +854,6 @@ static void likeFunc(
|
||||
sqlite3_result_error(context, "LIKE or GLOB pattern too complex", -1);
|
||||
return;
|
||||
}
|
||||
assert( zB==sqlite3_value_text(argv[0]) ); /* Encoding did not change */
|
||||
|
||||
if( argc==3 ){
|
||||
/* The escape character string must consist of a single UTF-8 character.
|
||||
** Otherwise, return an error.
|
||||
@@ -873,6 +869,8 @@ static void likeFunc(
|
||||
}else{
|
||||
escape = pInfo->matchSet;
|
||||
}
|
||||
zB = sqlite3_value_text(argv[0]);
|
||||
zA = sqlite3_value_text(argv[1]);
|
||||
if( zA && zB ){
|
||||
#ifdef SQLITE_TEST
|
||||
sqlite3_like_count++;
|
||||
|
Reference in New Issue
Block a user