added more test cases
This commit is contained in:
@ -32,7 +32,7 @@ int main(int argc, char** argv)
|
|||||||
fprintf(stderr,"Usage: classify <input> <expected output>");
|
fprintf(stderr,"Usage: classify <input> <expected output>");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
int rd = 0,buffsz = getpagesize(),strsz = 0;
|
int rd = 0,buffsz = getpagesize(),strsz = 0,ex_val = 0;
|
||||||
char buffer[buffsz], *strbuff = (char*)calloc(buffsz,sizeof(char));
|
char buffer[buffsz], *strbuff = (char*)calloc(buffsz,sizeof(char));
|
||||||
FILE *input,*expected;
|
FILE *input,*expected;
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
if(strcmp(qtypestr,expbuff) != 0){
|
if(strcmp(qtypestr,expbuff) != 0){
|
||||||
printf("Error in output: '%s' was expected but got '%s'",expbuff,qtypestr);
|
printf("Error in output: '%s' was expected but got '%s'",expbuff,qtypestr);
|
||||||
//return 1;
|
ex_val = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
gwbuf_free(buff);
|
gwbuf_free(buff);
|
||||||
@ -171,5 +171,5 @@ int main(int argc, char** argv)
|
|||||||
fclose(input);
|
fclose(input);
|
||||||
fclose(expected);
|
fclose(expected);
|
||||||
free(strbuff);
|
free(strbuff);
|
||||||
return 0;
|
return ex_val;
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,13 @@
|
|||||||
QUERY_TYPE_READ
|
QUERY_TYPE_READ
|
||||||
QUERY_TYPE_READ
|
QUERY_TYPE_READ
|
||||||
QUERY_TYPE_READ
|
|
||||||
QUERY_TYPE_READ
|
|
||||||
QUERY_TYPE_READ
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
|
||||||
QUERY_TYPE_WRITE
|
QUERY_TYPE_WRITE
|
||||||
QUERY_TYPE_WRITE
|
QUERY_TYPE_WRITE
|
||||||
|
QUERY_TYPE_CREATE_TMP_TABLE
|
||||||
|
QUERY_TYPE_GSYSVAR_WRITE
|
||||||
|
QUERY_TYPE_SYSVAR_READ
|
||||||
|
QUERY_TYPE_USERVAR_READ
|
||||||
|
QUERY_TYPE_COMMIT
|
||||||
|
QUERY_TYPE_DISABLE_AUTOCOMMIT
|
||||||
|
QUERY_TYPE_BEGIN_TRX
|
||||||
|
QUERY_TYPE_ROLLBACK
|
||||||
|
QUERY_TYPE_COMMIT
|
||||||
|
@ -1,19 +1,13 @@
|
|||||||
select sleep(2);
|
select sleep(2);
|
||||||
select * from tst where lname='Doe';
|
|
||||||
select 1,2,3,4,5,6 from tst;
|
|
||||||
select * from tst where fname like '%a%';
|
|
||||||
select * from tst where lname like '%e%' order by fname;
|
select * from tst where lname like '%e%' order by fname;
|
||||||
insert into tst values ("John"," Doe"),("Donald","Duck"),("Plato",""),("Richard","Stallman");
|
|
||||||
insert into tst values ("Jane"," Doe"),("Daisy","Duck"),("Marie","Curie");
|
|
||||||
insert into tst values ("John","Doe"),("Donald","Duck"),("Plato",""),("Richard","Stallman");
|
|
||||||
insert into tst values ("Jane","Doe"),("Daisy","Duck"),("Marie","Curie");
|
|
||||||
insert into tst values ("John","Doe"),("Donald","Duck"),("Plato",""),("Richard","Stallman");
|
|
||||||
insert into tst values ("Jane","Doe"),("Daisy","Duck"),("Marie","Curie");
|
insert into tst values ("Jane","Doe"),("Daisy","Duck"),("Marie","Curie");
|
||||||
update tst set fname="Farmer", lname="McDonald" where lname="%Doe" and fname="John";
|
update tst set fname="Farmer", lname="McDonald" where lname="%Doe" and fname="John";
|
||||||
update tst set fname="John" where lname="Doe";
|
create temporary table tmp as select * from t1;
|
||||||
update tst set lname="Philosopher" where fname="Plato";
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
update tst set fname="Human" where fname like 'Richard%';
|
select @@server_id;
|
||||||
update tst set lname="Creature" where lname like '%man%';
|
select @OLD_SQL_NOTES;
|
||||||
update tst set fname="Jane" where lname="%Doe";
|
SET autocommit=1;
|
||||||
update tst set lname="Human" where fname like '%a%' or lname like '%a%';
|
SET autocommit=0;
|
||||||
|
BEGIN;
|
||||||
|
ROLLBACK;
|
||||||
|
COMMIT;
|
||||||
|
Reference in New Issue
Block a user