skygw_utils.cc:replace_literal: Fixed regular expression which, for example, accepted "200" with needle "2"

query_classifier.cc: fixed invalid argument list in logging command.
input.sql: added a few previously failed cases for canonical query test
This commit is contained in:
VilhoRaatikka
2014-08-26 11:08:05 +03:00
parent fd125f4a42
commit 69104d7dee
3 changed files with 5 additions and 2 deletions

View File

@ -672,7 +672,6 @@ static skygw_query_type_t resolve_query_type(
"%lu [resolve_query_type] " "%lu [resolve_query_type] "
"functype FUNC_SP, stored proc " "functype FUNC_SP, stored proc "
"or unknown function.", "or unknown function.",
"%s:%s",
pthread_self()))); pthread_self())));
break; break;
case Item_func::UDF_FUNC: case Item_func::UDF_FUNC:

View File

@ -1,3 +1,7 @@
select md5("200000foo") =10, sleep(2), rand(100);
select * from my1 where md5("110") =10;
select md5("100foo") =10;
select * from my1 where md5("100") =10;
select sleep(2); select sleep(2);
select * from tst where lname='Doe'; select * from tst where lname='Doe';
select 1,2,3,4,5,6 from tst; select 1,2,3,4,5,6 from tst;

View File

@ -1883,7 +1883,7 @@ char* replace_literal(
const char* replacement) const char* replacement)
{ {
const char* prefix = "[ ='\",\\(]"; /*< ' ','=','(',''',''"',',' are allowed before needle */ const char* prefix = "[ ='\",\\(]"; /*< ' ','=','(',''',''"',',' are allowed before needle */
const char* suffix = "[$^[:alnum:]]?"; /*< alpha-num chars aren't allowed after the needle */ const char* suffix = "[^[:alnum:]]"; /*< alpha-num chars aren't allowed after the needle */
char* search_re; char* search_re;
char* newstr; char* newstr;
regex_t re; regex_t re;