Commit e9447881 authored by unknown's avatar unknown

Portability fixes

Fixed problems with group_concat() and HAVING
Updated crash-me values


sql-bench/limits/mysql-4.0.cfg:
  Rename: sql-bench/limits/mysql.cfg -> sql-bench/limits/mysql-4.0.cfg
include/my_global.h:
  Safety fix
libmysqld/Makefile.am:
  Portability fix (For AIX 64 bit)
mysql-test/r/func_gconcat.result:
  More tests
mysql-test/t/func_gconcat.test:
  More tests
sql/field.cc:
  Cleanups
sql/init.cc:
  moved thread_stack_min to right place
sql/item_sum.cc:
  Fixed problems with group_concat() and HAVING
  Removed some not needed variables
sql/item_sum.h:
  Fixed problems with group_concat() and HAVING
  Removed some not needed variables
sql/mysqld.cc:
  Moved thread_stack_min to right place to handle case where we didn't get as much stack space as we asked for
sql/sql_parse.cc:
  More debugging
sql/sql_select.cc:
  Cleanup
sql/sql_yacc.yy:
  Fixed handling of Item_group_concat() in having. (Arguments should not be handled as refs)
parent 2d5635e3
...@@ -1120,10 +1120,10 @@ typedef union { ...@@ -1120,10 +1120,10 @@ typedef union {
*((T)+1)=(((A) >> 16));\ *((T)+1)=(((A) >> 16));\
*((T)+0)=(((A) >> 24)); } *((T)+0)=(((A) >> 24)); }
#define doubleget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(double)) #define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
#define doublestore(T,V) memcpy((byte*) (T),(byte*) &V,sizeof(double)) #define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
#define longlongget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(ulonglong)) #define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong))
#define longlongstore(T,V) memcpy((byte*) (T),(byte*) &V,sizeof(ulonglong)) #define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong))
#else #else
......
...@@ -88,9 +88,9 @@ libmysqld.a: libmysqld_int.a $(INC_LIB) ...@@ -88,9 +88,9 @@ libmysqld.a: libmysqld_int.a $(INC_LIB)
cd tmp ; \ cd tmp ; \
for file in *.a ; do \ for file in *.a ; do \
bfile=`basename $$file .a` ; \ bfile=`basename $$file .a` ; \
ar x $$file; \ $(AR) x $$file; \
for obj in *.o ; do mv $$obj $${bfile}_$$obj ; done ; \ for obj in *.o ; do mv $$obj $${bfile}_$$obj ; done ; \
ar q ../libmysqld_int2.a *.o ; \ $(AR) q ../libmysqld_int2.a *.o ; \
rm -f *.o ; \ rm -f *.o ; \
done done
mv libmysqld_int2.a libmysqld.a mv libmysqld_int2.a libmysqld.a
......
...@@ -59,11 +59,16 @@ grp group_concat(d order by a desc) ...@@ -59,11 +59,16 @@ grp group_concat(d order by a desc)
1 a 1 a
2 b,a 2 b,a
3 c,d,d,b,b,a 3 c,d,d,b,b,a
select grp,group_concat(a order by a,d+c) from t1 group by grp; select grp,group_concat(a order by a,d+c-ascii(c)-a) from t1 group by grp;
grp group_concat(a order by a,d+c) grp group_concat(a order by a,d+c-ascii(c)-a)
1 1 1 1
2 2,3 2 2,3
3 4,5,6,7,8,9 3 4,5,6,7,8,9
select grp,group_concat(a order by d+c-ascii(c),a) from t1 group by grp;
grp group_concat(a order by d+c-ascii(c),a)
1 1
2 3,2
3 7,8,4,6,9,5
select grp,group_concat(c order by 1) from t1 group by grp; select grp,group_concat(c order by 1) from t1 group by grp;
grp group_concat(c order by 1) grp group_concat(c order by 1)
1 a 1 a
...@@ -197,9 +202,21 @@ NULL ...@@ -197,9 +202,21 @@ NULL
drop table t1; drop table t1;
drop table t2; drop table t2;
create table t1 (bar varchar(32)); create table t1 (bar varchar(32));
insert into t1 values('test'),('test2'); insert into t1 values('test1'),('test2');
select * from t1 having group_concat(bar)=''; select group_concat(bar order by concat(bar,bar)) from t1;
group_concat(bar order by concat(bar,bar))
test1,test2
select group_concat(bar order by concat(bar,bar) desc) from t1;
group_concat(bar order by concat(bar,bar) desc)
test2,test1
select bar from t1 having group_concat(bar)='';
bar
select bar from t1 having instr(group_concat(bar), "test") > 0;
bar
test1
select bar from t1 having instr(group_concat(bar order by concat(bar,bar) desc), "test2,test1") > 0;
bar bar
test1
drop table t1; drop table t1;
create table t1 (a int, a1 varchar(10)); create table t1 (a int, a1 varchar(10));
create table t2 (a0 int); create table t2 (a0 int);
...@@ -246,7 +263,7 @@ id1 concat_id ...@@ -246,7 +263,7 @@ id1 concat_id
drop table t1,t2; drop table t1,t2;
create table t1 (s1 char(10), s2 int not null); create table t1 (s1 char(10), s2 int not null);
insert into t1 values ('a',2),('b',2),('c',1),('a',3),('b',4),('c',4); insert into t1 values ('a',2),('b',2),('c',1),('a',3),('b',4),('c',4);
select distinct s1 from t1 order by s2; select distinct s1 from t1 order by s2,s1;
s1 s1
c c
a a
......
...@@ -29,7 +29,8 @@ select grp,group_concat(c order by c) from t1 group by grp; ...@@ -29,7 +29,8 @@ select grp,group_concat(c order by c) from t1 group by grp;
select grp,group_concat(c order by c desc) from t1 group by grp; select grp,group_concat(c order by c desc) from t1 group by grp;
select grp,group_concat(d order by a) from t1 group by grp; select grp,group_concat(d order by a) from t1 group by grp;
select grp,group_concat(d order by a desc) from t1 group by grp; select grp,group_concat(d order by a desc) from t1 group by grp;
select grp,group_concat(a order by a,d+c) from t1 group by grp; select grp,group_concat(a order by a,d+c-ascii(c)-a) from t1 group by grp;
select grp,group_concat(a order by d+c-ascii(c),a) from t1 group by grp;
select grp,group_concat(c order by 1) from t1 group by grp; select grp,group_concat(c order by 1) from t1 group by grp;
select grp,group_concat(c order by "c") from t1 group by grp; select grp,group_concat(c order by "c") from t1 group by grp;
select grp,group_concat(distinct c order by c) from t1 group by grp; select grp,group_concat(distinct c order by c) from t1 group by grp;
...@@ -108,8 +109,12 @@ drop table t2; ...@@ -108,8 +109,12 @@ drop table t2;
# check having # check having
create table t1 (bar varchar(32)); create table t1 (bar varchar(32));
insert into t1 values('test'),('test2'); insert into t1 values('test1'),('test2');
select * from t1 having group_concat(bar)=''; select group_concat(bar order by concat(bar,bar)) from t1;
select group_concat(bar order by concat(bar,bar) desc) from t1;
select bar from t1 having group_concat(bar)='';
select bar from t1 having instr(group_concat(bar), "test") > 0;
select bar from t1 having instr(group_concat(bar order by concat(bar,bar) desc), "test2,test1") > 0;
drop table t1; drop table t1;
# ORDER BY fix_fields() # ORDER BY fix_fields()
...@@ -147,7 +152,7 @@ drop table t1,t2; ...@@ -147,7 +152,7 @@ drop table t1,t2;
create table t1 (s1 char(10), s2 int not null); create table t1 (s1 char(10), s2 int not null);
insert into t1 values ('a',2),('b',2),('c',1),('a',3),('b',4),('c',4); insert into t1 values ('a',2),('b',2),('c',1),('a',3),('b',4),('c',4);
select distinct s1 from t1 order by s2; select distinct s1 from t1 order by s2,s1;
select group_concat(distinct s1) from t1; select group_concat(distinct s1) from t1;
select group_concat(distinct s1 order by s2) from t1 where s2 < 4; select group_concat(distinct s1 order by s2) from t1 where s2 < 4;
# The following is wrong and needs to be fixed ASAP # The following is wrong and needs to be fixed ASAP
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -82,7 +82,7 @@ alter_drop_unique=with drop key # Alter table drop unique ...@@ -82,7 +82,7 @@ alter_drop_unique=with drop key # Alter table drop unique
###< alter table crash_q drop constraint u1 restrict ###< alter table crash_q drop constraint u1 restrict
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'constraint u1 restrict' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'constraint u1 restrict' at line 1
### ###
###< alter table crash_q drop key c1 ###< alter table crash_q drop key u1
###> OK ###> OK
alter_modify_col=yes # Alter table modify column alter_modify_col=yes # Alter table modify column
###< alter table crash_q modify c1 CHAR(20) ###< alter table crash_q modify c1 CHAR(20)
...@@ -345,7 +345,7 @@ date_format_inresult=iso # Date format in result ...@@ -345,7 +345,7 @@ date_format_inresult=iso # Date format in result
###> OK ###> OK
### ###
###< select a from crash_me_d ###< select a from crash_me_d
###> 2003-08-27 ###> 2004-04-06
###< delete from crash_me_d ###< delete from crash_me_d
###> OK ###> OK
date_infinity=error # Supports 'infinity dates date_infinity=error # Supports 'infinity dates
...@@ -558,14 +558,14 @@ func_extra_add_months=no # Function ADD_MONTHS ...@@ -558,14 +558,14 @@ func_extra_add_months=no # Function ADD_MONTHS
### ###
###<select add_months('1997-01-01',1) from crash_me_d ###<select add_months('1997-01-01',1) from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('1997-01-01',1) from crash_me_d' at line 1 ###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('1997-01-01',1) from crash_me_d' at line 1
func_extra_adddate=no # Function ADDDATE func_extra_adddate=yes # Function ADDDATE
### ###
###<select ADDDATE('2002-12-01',3) from crash_me_d ###<select ADDDATE('2002-12-01',3) from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '3) from crash_me_d' at line 1 ###>2002-12-04
func_extra_addtime=no # Function ADDTIME func_extra_addtime=yes # Function ADDTIME
### ###
###<select ADDTIME('20:02:12','00:00:03') ###<select ADDTIME('20:02:12','00:00:03')
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('20:02:12','00:00:03')' at line 1 ###>20:02:15
func_extra_alpha=no # Function ALPHA func_extra_alpha=no # Function ALPHA
### ###
###<select alpha('A',2) ###<select alpha('A',2)
...@@ -648,10 +648,10 @@ func_extra_cosh=no # Function COSH ...@@ -648,10 +648,10 @@ func_extra_cosh=no # Function COSH
### ###
###<select cosh(0) ###<select cosh(0)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(0)' at line 1 ###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(0)' at line 1
func_extra_date=no # Function DATE func_extra_date=yes # Function DATE
### ###
###<select date('1963-08-16') from crash_me_d ###<select date('1963-08-16') from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('1963-08-16') from crash_me_d' at line 1 ###>1963-08-16
func_extra_date_format=yes # Function DATE_FORMAT func_extra_date_format=yes # Function DATE_FORMAT
### ###
###<select date_format('1997-01-02 03:04:05','M W D Y y m d h i s w') from crash_me_d ###<select date_format('1997-01-02 03:04:05','M W D Y y m d h i s w') from crash_me_d
...@@ -663,11 +663,11 @@ func_extra_dateadd=no # Function DATEADD ...@@ -663,11 +663,11 @@ func_extra_dateadd=no # Function DATEADD
func_extra_datediff=no # Function DATEDIFF func_extra_datediff=no # Function DATEDIFF
### ###
###<select datediff(month,'Oct 21 1997','Nov 30 1997') from crash_me_d ###<select datediff(month,'Oct 21 1997','Nov 30 1997') from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(month,'Oct 21 1997','Nov 30 1997') from crash_me_d' at line 1 ###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''Nov 30 1997') from crash_me_d' at line 1
func_extra_datediff2arg=no # Function DATEDIFF (2 arg) func_extra_datediff2arg=yes # Function DATEDIFF (2 arg)
### ###
###<select DATEDIFF('2002-12-04','2002-12-01') from crash_me_d ###<select DATEDIFF('2002-12-04','2002-12-01') from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('2002-12-04','2002-12-01') from crash_me_d' at line 1 ###>3
func_extra_datename=no # Function DATENAME func_extra_datename=no # Function DATENAME
### ###
###<select datename(month,'Nov 30 1997') from crash_me_d ###<select datename(month,'Nov 30 1997') from crash_me_d
...@@ -676,10 +676,10 @@ func_extra_datepart=no # Function DATEPART ...@@ -676,10 +676,10 @@ func_extra_datepart=no # Function DATEPART
### ###
###<select datepart(month,'July 20 1997') from crash_me_d ###<select datepart(month,'July 20 1997') from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(month,'July 20 1997') from crash_me_d' at line 1 ###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(month,'July 20 1997') from crash_me_d' at line 1
func_extra_day=no # Function DAY func_extra_day=yes # Function DAY
### ###
###<select DAY('2002-12-01') from crash_me_d ###<select DAY('2002-12-01') from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('2002-12-01') from crash_me_d' at line 1 ###>1
func_extra_decode=no # Function DECODE func_extra_decode=no # Function DECODE
### ###
###<select DECODE('S-103','T72',1,'S-103',2,'Leopard',3) ###<select DECODE('S-103','T72',1,'S-103',2,'Leopard',3)
...@@ -695,7 +695,7 @@ func_extra_elt=yes # Function ELT ...@@ -695,7 +695,7 @@ func_extra_elt=yes # Function ELT
func_extra_encrypt=yes # Function ENCRYPT func_extra_encrypt=yes # Function ENCRYPT
### ###
###<select encrypt('hello') ###<select encrypt('hello')
###>tHrzZO8Aq1FG6 ###>VNeu3dE4DbVJY
func_extra_expand2arg=no # Function EXPAND func_extra_expand2arg=no # Function EXPAND
### ###
###<select expand('abcd',6) ###<select expand('abcd',6)
...@@ -772,10 +772,10 @@ func_extra_interval=yes # Function INTERVAL ...@@ -772,10 +772,10 @@ func_extra_interval=yes # Function INTERVAL
### ###
###<select interval(55,10,20,30,40,50,60,70,80,90,100) ###<select interval(55,10,20,30,40,50,60,70,80,90,100)
###>5 ###>5
func_extra_last_day=no # Function LAST_DAY func_extra_last_day=yes # Function LAST_DAY
### ###
###<select last_day('1997-04-01') from crash_me_d ###<select last_day('1997-04-01') from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('1997-04-01') from crash_me_d' at line 1 ###>1997-04-30
func_extra_last_insert_id=yes # Function LAST_INSERT_ID func_extra_last_insert_id=yes # Function LAST_INSERT_ID
### ###
###<select last_insert_id() ###<select last_insert_id()
...@@ -825,14 +825,14 @@ func_extra_ltrim2arg=no # Function LTRIM (2 arg) ...@@ -825,14 +825,14 @@ func_extra_ltrim2arg=no # Function LTRIM (2 arg)
### ###
###<select ltrim('..abcd..','.') ###<select ltrim('..abcd..','.')
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''.')' at line 1 ###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''.')' at line 1
func_extra_makedate=no # Function MAKEDATE func_extra_makedate=yes # Function MAKEDATE
### ###
###<select MAKEDATE(1963,228) from crash_me_d ###<select MAKEDATE(1963,228) from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(1963,228) from crash_me_d' at line 1 ###>1963-08-16
func_extra_maketime=no # Function MAKETIME func_extra_maketime=yes # Function MAKETIME
### ###
###<select MAKETIME(20,02,12) ###<select MAKETIME(20,02,12)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(20,02,12)' at line 1 ###>20:02:12
func_extra_mapchar=no # Function MAPCHAR func_extra_mapchar=no # Function MAPCHAR
### ###
###<select mapchar('A') ###<select mapchar('A')
...@@ -841,10 +841,10 @@ func_extra_mdy=no # Function MDY ...@@ -841,10 +841,10 @@ func_extra_mdy=no # Function MDY
### ###
###<select mdy(7,1,1998) from crash_me_d ###<select mdy(7,1,1998) from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(7,1,1998) from crash_me_d' at line 1 ###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(7,1,1998) from crash_me_d' at line 1
func_extra_microsecond=no # Function MICROSECOND func_extra_microsecond=yes # Function MICROSECOND
### ###
###<select MICROSECOND('19630816200212111111') ###<select MICROSECOND('19630816200212111111')
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('19630816200212111111')' at line 1 ###>110000
func_extra_mid=yes # Function SUBSTRING as MID func_extra_mid=yes # Function SUBSTRING as MID
### ###
###<select mid('hello',3,2) ###<select mid('hello',3,2)
...@@ -858,7 +858,7 @@ func_extra_noround=no # Function NOROUND ...@@ -858,7 +858,7 @@ func_extra_noround=no # Function NOROUND
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(22.6)' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(22.6)' at line 1
func_extra_not=yes # Function NOT in SELECT func_extra_not=yes # Function NOT in SELECT
### ###
###<select not 0 ###<select not false
###>1 ###>1
func_extra_not_between=yes # Function NOT BETWEEN in SELECT func_extra_not_between=yes # Function NOT BETWEEN in SELECT
### ###
...@@ -879,7 +879,7 @@ func_extra_odbc_convert=no # Function ODBC CONVERT ...@@ -879,7 +879,7 @@ func_extra_odbc_convert=no # Function ODBC CONVERT
func_extra_password=yes # Function PASSWORD func_extra_password=yes # Function PASSWORD
### ###
###<select password('hello') ###<select password('hello')
###>70de51425df9d787 ###>*6B4F89A54E2D27ECD7E8DA05B4AB8FD9D1D8B119
func_extra_paste=no # Function PASTE func_extra_paste=no # Function PASTE
### ###
###<select paste('ABCDEFG',3,2,'1234') ###<select paste('ABCDEFG',3,2,'1234')
...@@ -964,18 +964,18 @@ func_extra_stuff=no # Function STUFF ...@@ -964,18 +964,18 @@ func_extra_stuff=no # Function STUFF
### ###
###<select stuff('abc',2,3,'xyz') ###<select stuff('abc',2,3,'xyz')
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('abc',2,3,'xyz')' at line 1 ###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('abc',2,3,'xyz')' at line 1
func_extra_subdate=no # Function SUBDATE func_extra_subdate=yes # Function SUBDATE
### ###
###<select SUBDATE('2002-12-04',3) from crash_me_d ###<select SUBDATE('2002-12-04',3) from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '3) from crash_me_d' at line 1 ###>2002-12-01
func_extra_substr2arg=no # Function SUBSTR (2 arg) func_extra_substr2arg=yes # Function SUBSTR (2 arg)
### ###
###<select substr('abcd',2) ###<select substr('abcd',2)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('abcd',2)' at line 1 ###>bcd
func_extra_substr3arg=no # Function SUBSTR (3 arg) func_extra_substr3arg=yes # Function SUBSTR (3 arg)
### ###
###<select substr('abcd',2,2) ###<select substr('abcd',2,2)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('abcd',2,2)' at line 1 ###>bc
func_extra_substrb=no # Function SUBSTRB func_extra_substrb=no # Function SUBSTRB
### ###
###<select SUBSTRB('ABCDEFG',5,4.2) ###<select SUBSTRB('ABCDEFG',5,4.2)
...@@ -984,14 +984,14 @@ func_extra_substring_index=yes # Function SUBSTRING_INDEX ...@@ -984,14 +984,14 @@ func_extra_substring_index=yes # Function SUBSTRING_INDEX
### ###
###<select substring_index('www.tcx.se','.',-2) ###<select substring_index('www.tcx.se','.',-2)
###>tcx.se ###>tcx.se
func_extra_subtime=no # Function SUBTIME func_extra_subtime=yes # Function SUBTIME
### ###
###<select SUBTIME('20:02:15','00:00:03') ###<select SUBTIME('20:02:15','00:00:03')
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('20:02:15','00:00:03')' at line 1 ###>20:02:12
func_extra_sysdate=yes # Function SYSDATE func_extra_sysdate=yes # Function SYSDATE
### ###
###<select sysdate() ###<select sysdate()
###>2003-08-27 19:55:21 ###>2004-04-06 13:49:05
func_extra_tail=no # Function TAIL func_extra_tail=no # Function TAIL
### ###
###<select tail('ABCDEFG',3) ###<select tail('ABCDEFG',3)
...@@ -1000,22 +1000,23 @@ func_extra_tanh=no # Function TANH ...@@ -1000,22 +1000,23 @@ func_extra_tanh=no # Function TANH
### ###
###<select tanh(1) ###<select tanh(1)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(1)' at line 1 ###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(1)' at line 1
func_extra_time=no # Function TIME func_extra_time=yes # Function TIME
### ###
###<select time('20:02:12') ###<select time('20:02:12')
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('20:02:12')' at line 1 ###>20:02:12
func_extra_time_to_sec=yes # Function TIME_TO_SEC func_extra_time_to_sec=yes # Function TIME_TO_SEC
### ###
###<select time_to_sec('01:23:21') ###<select time_to_sec('01:23:21')
###>5001 ###>5001
func_extra_timediff=no # Function TIMEDIFF func_extra_timediff=yes # Function TIMEDIFF
### ###
###<select TIMEDIFF('20:02:15','20:02:12') ###<select TIMEDIFF('20:02:15','20:02:12')
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('20:02:15','20:02:12')' at line 1 ###>00:00:03
func_extra_timestamp=no # Function TIMESTAMP func_extra_timestamp=error # Function TIMESTAMP
### ###
###<select timestamp('19630816','00200212') ###<select timestamp('19630816','00200212')
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('19630816','00200212')' at line 1 ###>1963-08-16 20:02:12
###We expected '19630816200212000000' but got '1963-08-16 20:02:12'
func_extra_to_days=yes # Function TO_DAYS func_extra_to_days=yes # Function TO_DAYS
### ###
###<select to_days('1996-01-01') from crash_me_d ###<select to_days('1996-01-01') from crash_me_d
...@@ -1056,7 +1057,7 @@ func_extra_uid=no # Function UID ...@@ -1056,7 +1057,7 @@ func_extra_uid=no # Function UID
func_extra_unix_timestamp=yes # Function UNIX_TIMESTAMP func_extra_unix_timestamp=yes # Function UNIX_TIMESTAMP
### ###
###<select unix_timestamp() ###<select unix_timestamp()
###>1062003321 ###>1081248545
func_extra_userenv=no # Function USERENV func_extra_userenv=no # Function USERENV
### ###
###<select userenv ###<select userenv
...@@ -1068,15 +1069,15 @@ func_extra_value=no # Function VALUE ...@@ -1068,15 +1069,15 @@ func_extra_value=no # Function VALUE
func_extra_version=yes # Function VERSION func_extra_version=yes # Function VERSION
### ###
###<select version() ###<select version()
###>4.0.15-debug-log ###>4.1.2-alpha
func_extra_weekday=yes # Function WEEKDAY func_extra_weekday=yes # Function WEEKDAY
### ###
###<select weekday('1997-11-29') from crash_me_d ###<select weekday('1997-11-29') from crash_me_d
###>5 ###>5
func_extra_weekofyear=no # Function WEEKOFYEAR func_extra_weekofyear=yes # Function WEEKOFYEAR
### ###
###<select WEEKOFYEAR('1963-08-16') from crash_me_d ###<select WEEKOFYEAR('1963-08-16') from crash_me_d
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '('1963-08-16') from crash_me_d' at line 1 ###>33
func_extra_|=yes # Function | (bitwise or) func_extra_|=yes # Function | (bitwise or)
### ###
###<select 1 | 2 ###<select 1 | 2
...@@ -1136,11 +1137,11 @@ func_odbc_cot=yes # Function COT ...@@ -1136,11 +1137,11 @@ func_odbc_cot=yes # Function COT
func_odbc_curdate=yes # Function CURDATE func_odbc_curdate=yes # Function CURDATE
### ###
###<select curdate() ###<select curdate()
###>2003-08-27 ###>2004-04-06
func_odbc_curtime=yes # Function CURTIME func_odbc_curtime=yes # Function CURTIME
### ###
###<select curtime() ###<select curtime()
###>19:55:21 ###>13:49:04
func_odbc_database=yes # Function DATABASE func_odbc_database=yes # Function DATABASE
### ###
###<select database() ###<select database()
...@@ -1269,7 +1270,7 @@ func_odbc_monthname=yes # Function MONTHNAME ...@@ -1269,7 +1270,7 @@ func_odbc_monthname=yes # Function MONTHNAME
func_odbc_now=yes # Function NOW func_odbc_now=yes # Function NOW
### ###
###<select now() ###<select now()
###>2003-08-27 19:55:21 ###>2004-04-06 13:49:04
func_odbc_pi=yes # Function PI func_odbc_pi=yes # Function PI
### ###
###<select pi() ###<select pi()
...@@ -1416,20 +1417,17 @@ func_sql_concat_as_||=error # Function concatenation with || ...@@ -1416,20 +1417,17 @@ func_sql_concat_as_||=error # Function concatenation with ||
func_sql_current_date=yes # Function CURRENT_DATE func_sql_current_date=yes # Function CURRENT_DATE
### ###
###<select current_date ###<select current_date
###>2003-08-27 ###>2004-04-06
func_sql_current_time=yes # Function CURRENT_TIME func_sql_current_time=yes # Function CURRENT_TIME
### ###
###<select current_time ###<select current_time
###>19:55:21 ###>13:49:04
func_sql_current_timestamp=yes # Function CURRENT_TIMESTAMP func_sql_current_timestamp=yes # Function CURRENT_TIMESTAMP
### ###
###<select current_timestamp ###<select current_timestamp
###>2003-08-27 19:55:21 ###>2004-04-06 13:49:04
func_sql_current_user=with_parenthesis # CURRENT_USER func_sql_current_user=yes # CURRENT_USER
###< select CURRENT_USER ###< select CURRENT_USER
###> execute error:Unknown column 'CURRENT_USER' in 'field list'
###
###< select CURRENT_USER()
###> OK ###> OK
func_sql_extract_sql=yes # Function EXTRACT func_sql_extract_sql=yes # Function EXTRACT
### ###
...@@ -1438,11 +1436,11 @@ func_sql_extract_sql=yes # Function EXTRACT ...@@ -1438,11 +1436,11 @@ func_sql_extract_sql=yes # Function EXTRACT
func_sql_localtime=yes # Function LOCALTIME func_sql_localtime=yes # Function LOCALTIME
### ###
###<select localtime ###<select localtime
###>2003-08-27 19:55:21 ###>2004-04-06 13:49:04
func_sql_localtimestamp=yes # Function LOCALTIMESTAMP func_sql_localtimestamp=yes # Function LOCALTIMESTAMP
### ###
###<select localtimestamp ###<select localtimestamp
###>2003-08-27 19:55:21 ###>2004-04-06 13:49:04
func_sql_lower=yes # Function LOWER func_sql_lower=yes # Function LOWER
### ###
###<select LOWER('ABC') ###<select LOWER('ABC')
...@@ -1505,22 +1503,22 @@ func_where_between=yes # Function BETWEEN ...@@ -1505,22 +1503,22 @@ func_where_between=yes # Function BETWEEN
### ###
###<select a from crash_me where 5 between 4 and 6 ###<select a from crash_me where 5 between 4 and 6
###>1 ###>1
func_where_eq_all=no # Function = ALL func_where_eq_all=yes # Function = ALL
### ###
###<select a from crash_me where b =all (select b from crash_me) ###<select a from crash_me where b =all (select b from crash_me)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'all (select b from crash_me)' at line 1 ###>1
func_where_eq_any=no # Function = ANY func_where_eq_any=yes # Function = ANY
### ###
###<select a from crash_me where b =any (select b from crash_me) ###<select a from crash_me where b =any (select b from crash_me)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(select b from crash_me)' at line 1 ###>1
func_where_eq_some=no # Function = SOME func_where_eq_some=yes # Function = SOME
### ###
###<select a from crash_me where b =some (select b from crash_me) ###<select a from crash_me where b =some (select b from crash_me)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(select b from crash_me)' at line 1 ###>1
func_where_exists=no # Function EXISTS func_where_exists=yes # Function EXISTS
### ###
###<select a from crash_me where exists (select * from crash_me) ###<select a from crash_me where exists (select * from crash_me)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'exists (select * from crash_me)' at line 1 ###>1
func_where_in_num=yes # Function IN on numbers func_where_in_num=yes # Function IN on numbers
### ###
###<select a from crash_me where 2 in (3,2,5,9,5,1) ###<select a from crash_me where 2 in (3,2,5,9,5,1)
...@@ -1549,10 +1547,10 @@ func_where_not_between=yes # Function NOT BETWEEN ...@@ -1549,10 +1547,10 @@ func_where_not_between=yes # Function NOT BETWEEN
### ###
###<select a from crash_me where 7 not between 4 and 6 ###<select a from crash_me where 7 not between 4 and 6
###>1 ###>1
func_where_not_exists=no # Function NOT EXISTS func_where_not_exists=yes # Function NOT EXISTS
### ###
###<select a from crash_me where not exists (select * from crash_me where a = 2) ###<select a from crash_me where not exists (select * from crash_me where a = 2)
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'exists (select * from crash_me where a = 2)' at line 1 ###>1
func_where_not_like=yes # Function NOT LIKE func_where_not_like=yes # Function NOT LIKE
### ###
###<select a from crash_me where b not like 'b%' ###<select a from crash_me where b not like 'b%'
...@@ -1623,10 +1621,10 @@ group_func_extra_stddev=yes # Group function STDDEV ...@@ -1623,10 +1621,10 @@ group_func_extra_stddev=yes # Group function STDDEV
### ###
###<select stddev(a),a from crash_me group by a ###<select stddev(a),a from crash_me group by a
###>0.0000 ###>0.0000
group_func_extra_variance=no # Group function VARIANCE group_func_extra_variance=yes # Group function VARIANCE
### ###
###<select variance(a),a from crash_me group by a ###<select variance(a),a from crash_me group by a
###> execute failed:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(a),a from crash_me group by a' at line 1 ###>0.0000
group_func_sql_any=no # Group function ANY group_func_sql_any=no # Group function ANY
### ###
###<select any(a),a from crash_me group by a ###<select any(a),a from crash_me group by a
...@@ -1690,9 +1688,9 @@ group_on_unused=yes # Group on unused column ...@@ -1690,9 +1688,9 @@ group_on_unused=yes # Group on unused column
###> OK ###> OK
### ###
###As far as all queries returned OK, result is YES ###As far as all queries returned OK, result is YES
has_true_false=no # TRUE and FALSE has_true_false=yes # TRUE and FALSE
###< select (1=1)=true ###< select (1=1)=true
###> execute error:Unknown column 'true' in 'field list' ###> OK
having=yes # Having having=yes # Having
###<select a from crash_me group by a having a > 0 ###<select a from crash_me group by a having a > 0
###>1 ###>1
...@@ -1832,10 +1830,10 @@ intersect_incompat=no # intersect (incompatible lists) ...@@ -1832,10 +1830,10 @@ intersect_incompat=no # intersect (incompatible lists)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select * from crash_me2' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select * from crash_me2' at line 1
### ###
###As far as some queries didnt return OK, result is NO ###As far as some queries didnt return OK, result is NO
join_tables=31 # tables in join join_tables=61 # tables in join
###We are trying (example with N=5): ###We are trying (example with N=5):
###select crash_me.a,t0.a,t1.a,t2.a,t3.a,t4.a from crash_me,crash_me t0,crash_me t1,crash_me t2,crash_me t3,crash_me t4 ###select crash_me.a,t0.a,t1.a,t2.a,t3.a,t4.a from crash_me,crash_me t0,crash_me t1,crash_me t2,crash_me t3,crash_me t4
### 32:FAIL 7:OK 19:OK 25:OK 28:OK 30:OK 31:FAIL ### 32:OK 48:OK 56:OK 60:OK 62:FAIL 61:FAIL
left_outer_join=yes # left outer join left_outer_join=yes # left outer join
###< select crash_me.a from crash_me left join crash_me2 ON crash_me.a=crash_me2.a ###< select crash_me.a from crash_me left join crash_me2 ON crash_me.a=crash_me2.a
###> OK ###> OK
...@@ -1890,39 +1888,39 @@ logical_value=1 # Value of logical operation (1=1) ...@@ -1890,39 +1888,39 @@ logical_value=1 # Value of logical operation (1=1)
###>1 ###>1
max_big_expressions=10 # big expressions max_big_expressions=10 # big expressions
###We are trying (example with N=5): ###We are trying (example with N=5):
###select 0+(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+...(14308) ###select 0+(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+...(8168)
### 50:FAIL 10:OK 30:FAIL 14:FAIL 11:FAIL ### 50:FAIL 10:OK 30:FAIL 14:FAIL 11:FAIL
max_char_size=255 # max char() size max_char_size=1048543 # max char() size
###We are trying (example with N=5): ###We are trying (example with N=5):
###create table crash_q (q char(5)) ###create table crash_q (q char(5))
###insert into crash_q values ('aaaaa') ###insert into crash_q values ('aaaaa')
###select * from crash_q ###select * from crash_q
### 524287:FAIL 104858:FAIL 20972:FAIL 4195:FAIL 839:FAIL 168:OK 503:FAIL 235:OK 369:FAIL 262:FAIL 241:OK 251:OK 256:FAIL 252:OK 254:OK 255:OK ### 524287:OK 786431:OK 917503:OK 983039:OK 1015807:OK 1032191:OK 1040383:OK 1044479:OK 1046527:OK 1047551:OK 1048063:OK 1048319:OK 1048447:OK 1048511:OK 1048543:OK 1048559:FAIL 1048546:FAIL 1048544:FAIL
max_column_name=64 # column name length max_column_name=64 # column name length
###We are trying (example with N=5): ###We are trying (example with N=5):
###create table crash_q (qaaaaa integer) ###create table crash_q (qaaaaa integer)
###insert into crash_q (qaaaaa) values(1) ###insert into crash_q (qaaaaa) values(1)
###select qaaaaa from crash_q ###select qaaaaa from crash_q
### 256:FAIL 51:OK 153:FAIL 72:FAIL 55:OK 63:OK 67:FAIL 64:FAIL ### 256:FAIL 51:OK 153:FAIL 72:FAIL 55:OK 63:OK 67:FAIL 64:FAIL
max_columns=3398 # Columns in table max_columns=2599 # Columns in table
###We are trying (example with N=5): ###We are trying (example with N=5):
###create table crash_q (a integer ,a0 integer,a1 integer,a2 integer,a3 integer,a4 integer) ###create table crash_q (a integer ,a0 integer,a1 integer,a2 integer,a3 integer,a4 integer)
### 4096:FAIL 819:OK 2457:OK 3276:OK 3686:FAIL 3358:OK 3522:FAIL 3391:OK 3456:FAIL 3404:FAIL 3394:OK 3399:FAIL 3395:OK 3397:OK 3398:FAIL ### 4096:FAIL 819:OK 2457:OK 3276:FAIL 2621:FAIL 2490:OK 2555:OK 2588:OK 2604:FAIL 2591:OK 2597:OK 2600:FAIL 2598:OK 2599:FAIL
max_conditions=85660 # OR and AND in WHERE max_conditions=85660 # OR and AND in WHERE
###We are trying (example with N=5): ###We are trying (example with N=5):
###select a from crash_me where a=1 and b='a' or a=0 and b='0' or a=1 and b='1' or a=2 and b='2' or a=3 and b='3' or a=4 and b='4' ###select a from crash_me where a=1 and b='a' or a=0 and b='0' or a=1 and b='1' or a=2 and b='2' or a=3 and b='3' or a=4 and b='4'
### 27592:OK 41389:OK 48287:FAIL 42769:OK 45528:FAIL 43321:FAIL 42880:FAIL 42791:OK 42835:FAIL 42800:OK 42817:OK 42826:OK 42830:OK 42832:FAIL 42831:FAIL ### 27592:OK 41389:OK 48287:FAIL 42769:OK 45528:FAIL 43321:FAIL 42880:FAIL 42791:OK 42835:FAIL 42800:OK 42817:OK 42826:OK 42830:OK 42832:FAIL 42831:FAIL
max_expressions=1450 # simple expressions max_expressions=836 # simple expressions
###We are trying (example with N=5): ###We are trying (example with N=5):
###select 1+1+1+1+1+1 ###select 1+1+1+1+1+1
### 5000:FAIL 1000:OK 3000:FAIL 1400:OK 2200:FAIL 1560:FAIL 1432:OK 1496:FAIL 1445:OK 1470:FAIL 1450:OK 1460:FAIL 1452:FAIL 1451:FAIL ### 5000:FAIL 1000:FAIL 200:OK 600:OK 800:OK 900:FAIL 820:OK 860:FAIL 828:OK 844:FAIL 831:OK 837:FAIL 832:OK 834:OK 835:OK 836:OK
max_index=32 # max index max_index=32 # max index
### max_unique_index=32 ,so max_index must be same ### max_unique_index=32 ,so max_index must be same
max_index_length=500 # index length max_index_length=1000 # index length
###We are trying (example with N=5): ###We are trying (example with N=5):
###create table crash_q (q0 char(5) not null,unique (q0)) ###create table crash_q (q0 char(5) not null,unique (q0))
###insert into crash_q values('aaaaa') ###insert into crash_q values('aaaaa')
### 4096:FAIL 819:FAIL 164:OK 491:OK 655:FAIL 524:FAIL 498:OK 511:FAIL 501:FAIL 499:OK 500:OK ### 4096:FAIL 819:OK 2457:FAIL 1147:FAIL 885:OK 1016:FAIL 911:OK 963:OK 989:OK 1002:FAIL 992:OK 997:OK 999:OK 1000:OK 1001:FAIL
max_index_name=64 # index name length max_index_name=64 # index name length
###We are trying (example with N=5): ###We are trying (example with N=5):
###create index crash_qaaaaa on crash_me (a) ###create index crash_qaaaaa on crash_me (a)
...@@ -1932,6 +1930,7 @@ max_index_part_length=255 # max index part length ...@@ -1932,6 +1930,7 @@ max_index_part_length=255 # max index part length
###create table crash_q (q char(5) not null,unique(q)) ###create table crash_q (q char(5) not null,unique(q))
###insert into crash_q (q) values ('aaaaa') ###insert into crash_q (q) values ('aaaaa')
###select q from crash_q ###select q from crash_q
### 524271:FAIL 104854:FAIL 20971:FAIL 4194:FAIL 839:FAIL 168:OK 503:FAIL 235:OK 369:FAIL 262:FAIL 241:OK 251:OK 256:FAIL 252:OK 254:OK 255:OK
max_index_parts=16 # index parts max_index_parts=16 # index parts
###We are trying (example with N=5): ###We are trying (example with N=5):
###create table crash_q (q0 integer not null,q1 integer not null,q2 integer not null,q3 integer not null,q4 integer not nul...(1263) ###create table crash_q (q0 integer not null,q1 integer not null,q2 integer not null,q3 integer not null,q4 integer not nul...(1263)
...@@ -1943,11 +1942,12 @@ max_index_varchar_part_length=255 # index varchar part length ...@@ -1943,11 +1942,12 @@ max_index_varchar_part_length=255 # index varchar part length
###create table crash_q (q varchar(5) not null,unique(q)) ###create table crash_q (q varchar(5) not null,unique(q))
###insert into crash_q (q) values ('aaaaa') ###insert into crash_q (q) values ('aaaaa')
###select q from crash_q ###select q from crash_q
### 524271:FAIL 104854:FAIL 20971:FAIL 4194:FAIL 839:FAIL 168:OK 503:FAIL 235:OK 369:FAIL 262:FAIL 241:OK 251:OK 256:FAIL 252:OK 254:OK 255:OK
max_row_length=65534 # max table row length (without blobs) max_row_length=65534 # max table row length (without blobs)
###We are trying (example with N=5): ###We are trying (example with N=5):
###create table crash_q (q0 char(5) not null) ###create table crash_q (q0 char(5) not null)
###insert into crash_q values ('aaaaa') ###insert into crash_q values ('aaaaa')
### 433245:FAIL 86649:FAIL 17330:OK 51989:OK 69319:FAIL 55455:OK 62387:OK 65853:FAIL 63080:OK 64466:OK 65159:OK 65506:OK 65679:FAIL 65541:FAIL 65513:OK 65527:OK 65534:OK 65537:FAIL 65535:FAIL ### 331372:FAIL 66275:FAIL 13255:OK 39765:OK 53020:OK 59647:OK 62961:OK 64618:OK 65446:OK 65860:FAIL 65529:OK 65694:FAIL 65562:FAIL 65536:FAIL 65531:OK 65533:OK 65534:OK 65535:FAIL
max_row_length_with_null=65502 # table row length with nulls (without blobs) max_row_length_with_null=65502 # table row length with nulls (without blobs)
###We are trying (example with N=5): ###We are trying (example with N=5):
###create table crash_q (q0 char(5) ) ###create table crash_q (q0 char(5) )
...@@ -1956,10 +1956,10 @@ max_row_length_with_null=65502 # table row length with nulls (without blobs) ...@@ -1956,10 +1956,10 @@ max_row_length_with_null=65502 # table row length with nulls (without blobs)
max_select_alias_name=+512 # select alias name length max_select_alias_name=+512 # select alias name length
###We are trying (example with N=5): ###We are trying (example with N=5):
###select b as aaaaa from crash_me ###select b as aaaaa from crash_me
max_stack_expression=1450 # stacked expressions max_stack_expression=836 # stacked expressions
###We are trying (example with N=5): ###We are trying (example with N=5):
###select 1+(1+(1+(1+(1+(1))))) ###select 1+(1+(1+(1+(1+(1)))))
### 1000:OK 1500:FAIL 1100:OK 1300:OK 1400:OK 1450:OK 1475:FAIL 1455:FAIL 1451:FAIL ### 1000:FAIL 200:OK 600:OK 800:OK 900:FAIL 820:OK 860:FAIL 828:OK 844:FAIL 831:OK 837:FAIL 832:OK 834:OK 835:OK 836:OK
max_table_alias_name=+512 # table alias name length max_table_alias_name=+512 # table alias name length
###We are trying (example with N=5): ###We are trying (example with N=5):
###select aaaaa.b from crash_me aaaaa ###select aaaaa.b from crash_me aaaaa
...@@ -1981,12 +1981,12 @@ max_unique_index=32 # unique indexes ...@@ -1981,12 +1981,12 @@ max_unique_index=32 # unique indexes
###insert into crash_q (q,q1,q2,q3,q4,q5) values (1,1,1,1,1,1) ###insert into crash_q (q,q1,q2,q3,q4,q5) values (1,1,1,1,1,1)
###select q from crash_q ###select q from crash_q
### 32:OK 48:FAIL 35:FAIL 33:FAIL ### 32:OK 48:FAIL 35:FAIL 33:FAIL
max_varchar_size=255 # max varchar() size max_varchar_size=1048543 # max varchar() size
###We are trying (example with N=5): ###We are trying (example with N=5):
###create table crash_q (q varchar(5)) ###create table crash_q (q varchar(5))
###insert into crash_q values ('aaaaa') ###insert into crash_q values ('aaaaa')
###select * from crash_q ###select * from crash_q
### 524287:FAIL 104858:FAIL 20972:FAIL 4195:FAIL 839:FAIL 168:OK 503:FAIL 235:OK 369:FAIL 262:FAIL 241:OK 251:OK 256:FAIL 252:OK 254:OK 255:OK ### 524287:OK 786431:OK 917503:OK 983039:OK 1015807:OK 1032191:OK 1040383:OK 1044479:OK 1046527:OK 1047551:OK 1048063:OK 1048319:OK 1048447:OK 1048511:OK 1048543:OK 1048559:FAIL 1048546:FAIL 1048544:FAIL
minus=no # minus minus=no # minus
###< select * from crash_me minus select * from crash_me3 ###< select * from crash_me minus select * from crash_me3
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select * from crash_me3' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select * from crash_me3' at line 1
...@@ -2129,7 +2129,7 @@ odbc_left_outer_join=yes # left outer join odbc style ...@@ -2129,7 +2129,7 @@ odbc_left_outer_join=yes # left outer join odbc style
###> OK ###> OK
### ###
###As far as all queries returned OK, result is YES ###As far as all queries returned OK, result is YES
operating_system=Linux 2.4.20-64GB-SMP i686 # crash-me tested on operating_system=Linux 2.4.21-199-smp4G i686 # crash-me tested on
order_by=yes # Order by order_by=yes # Order by
###< select a from crash_me order by a ###< select a from crash_me order by a
###> OK ###> OK
...@@ -2267,6 +2267,9 @@ quote_with_"=yes # Allows ' and " as string markers ...@@ -2267,6 +2267,9 @@ quote_with_"=yes # Allows ' and " as string markers
###> OK ###> OK
### ###
###As far as all queries returned OK, result is YES ###As far as all queries returned OK, result is YES
recursive_subqueries=+64 # recursive subqueries
###We are trying (example with N=5):
###select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from c...(82)
remember_end_space=no # Remembers end space in char() remember_end_space=no # Remembers end space in char()
###< create table crash_q (a char(10)) ###< create table crash_q (a char(10))
###> OK ###> OK
...@@ -2300,10 +2303,10 @@ rename_table=yes # rename table ...@@ -2300,10 +2303,10 @@ rename_table=yes # rename table
###> OK ###> OK
### ###
###As far as all queries returned OK, result is YES ###As far as all queries returned OK, result is YES
repeat_string_size=1047552 # return string size from function repeat_string_size=1048576 # return string size from function
###We are trying (example with N=5): ###We are trying (example with N=5):
###select repeat('a',5) ###select repeat('a',5)
### 4000000:FAIL 800000:OK 2400000:FAIL 1120000:FAIL 864000:OK 992000:OK 1056000:FAIL 1004800:OK 1030400:OK 1043200:OK 1049600:FAIL 1044480:OK 1047040:OK 1048320:FAIL 1047296:OK 1047808:FAIL 1047399:OK 1047603:FAIL 1047440:OK 1047521:OK 1047562:FAIL 1047529:OK 1047545:OK 1047553:FAIL 1047547:OK 1047550:OK 1047551:OK 1047552:OK ### 4000000:FAIL 800000:OK 2400000:FAIL 1120000:FAIL 864000:OK 992000:OK 1056000:FAIL 1004800:OK 1030400:OK 1043200:OK 1049600:FAIL 1044480:OK 1047040:OK 1048320:OK 1048960:FAIL 1048448:OK 1048704:FAIL 1048499:OK 1048601:FAIL 1048520:OK 1048560:OK 1048580:FAIL 1048564:OK 1048572:OK 1048576:OK 1048578:FAIL 1048577:FAIL
reserved_word_ansi-92/99_absolute=no # Keyword ABSOLUTE reserved_word_ansi-92/99_absolute=no # Keyword ABSOLUTE
###< create table crash_me10 (ABSOLUTE int not null) ###< create table crash_me10 (ABSOLUTE int not null)
###> OK ###> OK
...@@ -2416,13 +2419,13 @@ reserved_word_ansi-92/99_authorization=no # Keyword AUTHORIZATION ...@@ -2416,13 +2419,13 @@ reserved_word_ansi-92/99_authorization=no # Keyword AUTHORIZATION
###> OK ###> OK
### ###
###As far as all queries returned OK, result is NO ###As far as all queries returned OK, result is NO
reserved_word_ansi-92/99_before=no # Keyword BEFORE reserved_word_ansi-92/99_before=yes # Keyword BEFORE
###< create table crash_me10 (BEFORE int not null) ###< create table crash_me10 (BEFORE int not null)
###> OK ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'BEFORE int not null)' at line 1
###< drop table crash_me10 ###< drop table crash_me10
###> OK ###> execute error:Unknown table 'crash_me10'
### ###
###As far as all queries returned OK, result is NO ###As far as some queries didnt return OK, result is YES
reserved_word_ansi-92/99_begin=no # Keyword BEGIN reserved_word_ansi-92/99_begin=no # Keyword BEGIN
###< create table crash_me10 (BEGIN int not null) ###< create table crash_me10 (BEGIN int not null)
###> OK ###> OK
...@@ -2535,13 +2538,13 @@ reserved_word_ansi-92/99_close=no # Keyword CLOSE ...@@ -2535,13 +2538,13 @@ reserved_word_ansi-92/99_close=no # Keyword CLOSE
###> OK ###> OK
### ###
###As far as all queries returned OK, result is NO ###As far as all queries returned OK, result is NO
reserved_word_ansi-92/99_collate=no # Keyword COLLATE reserved_word_ansi-92/99_collate=yes # Keyword COLLATE
###< create table crash_me10 (COLLATE int not null) ###< create table crash_me10 (COLLATE int not null)
###> OK ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLLATE int not null)' at line 1
###< drop table crash_me10 ###< drop table crash_me10
###> OK ###> execute error:Unknown table 'crash_me10'
### ###
###As far as all queries returned OK, result is NO ###As far as some queries didnt return OK, result is YES
reserved_word_ansi-92/99_collation=no # Keyword COLLATION reserved_word_ansi-92/99_collation=no # Keyword COLLATION
###< create table crash_me10 (COLLATION int not null) ###< create table crash_me10 (COLLATION int not null)
###> OK ###> OK
...@@ -2913,13 +2916,13 @@ reserved_word_ansi-92/99_external=no # Keyword EXTERNAL ...@@ -2913,13 +2916,13 @@ reserved_word_ansi-92/99_external=no # Keyword EXTERNAL
###> OK ###> OK
### ###
###As far as all queries returned OK, result is NO ###As far as all queries returned OK, result is NO
reserved_word_ansi-92/99_false=no # Keyword FALSE reserved_word_ansi-92/99_false=yes # Keyword FALSE
###< create table crash_me10 (FALSE int not null) ###< create table crash_me10 (FALSE int not null)
###> OK ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FALSE int not null)' at line 1
###< drop table crash_me10 ###< drop table crash_me10
###> OK ###> execute error:Unknown table 'crash_me10'
### ###
###As far as all queries returned OK, result is NO ###As far as some queries didnt return OK, result is YES
reserved_word_ansi-92/99_fetch=no # Keyword FETCH reserved_word_ansi-92/99_fetch=no # Keyword FETCH
###< create table crash_me10 (FETCH int not null) ###< create table crash_me10 (FETCH int not null)
###> OK ###> OK
...@@ -3223,7 +3226,7 @@ reserved_word_ansi-92/99_level=no # Keyword LEVEL ...@@ -3223,7 +3226,7 @@ reserved_word_ansi-92/99_level=no # Keyword LEVEL
###As far as all queries returned OK, result is NO ###As far as all queries returned OK, result is NO
reserved_word_ansi-92/99_like=yes # Keyword LIKE reserved_word_ansi-92/99_like=yes # Keyword LIKE
###< create table crash_me10 (LIKE int not null) ###< create table crash_me10 (LIKE int not null)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE int not null)' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'int not null)' at line 1
###< drop table crash_me10 ###< drop table crash_me10
###> execute error:Unknown table 'crash_me10' ###> execute error:Unknown table 'crash_me10'
### ###
...@@ -3466,13 +3469,13 @@ reserved_word_ansi-92/99_parameters=no # Keyword PARAMETERS ...@@ -3466,13 +3469,13 @@ reserved_word_ansi-92/99_parameters=no # Keyword PARAMETERS
###> OK ###> OK
### ###
###As far as all queries returned OK, result is NO ###As far as all queries returned OK, result is NO
reserved_word_ansi-92/99_partial=yes # Keyword PARTIAL reserved_word_ansi-92/99_partial=no # Keyword PARTIAL
###< create table crash_me10 (PARTIAL int not null) ###< create table crash_me10 (PARTIAL int not null)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'PARTIAL int not null)' at line 1 ###> OK
###< drop table crash_me10 ###< drop table crash_me10
###> execute error:Unknown table 'crash_me10' ###> OK
### ###
###As far as some queries didnt return OK, result is YES ###As far as all queries returned OK, result is NO
reserved_word_ansi-92/99_precision=yes # Keyword PRECISION reserved_word_ansi-92/99_precision=yes # Keyword PRECISION
###< create table crash_me10 (PRECISION int not null) ###< create table crash_me10 (PRECISION int not null)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRECISION int not null)' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRECISION int not null)' at line 1
...@@ -3900,13 +3903,13 @@ reserved_word_ansi-92/99_trigger=no # Keyword TRIGGER ...@@ -3900,13 +3903,13 @@ reserved_word_ansi-92/99_trigger=no # Keyword TRIGGER
###> OK ###> OK
### ###
###As far as all queries returned OK, result is NO ###As far as all queries returned OK, result is NO
reserved_word_ansi-92/99_true=no # Keyword TRUE reserved_word_ansi-92/99_true=yes # Keyword TRUE
###< create table crash_me10 (TRUE int not null) ###< create table crash_me10 (TRUE int not null)
###> OK ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRUE int not null)' at line 1
###< drop table crash_me10 ###< drop table crash_me10
###> OK ###> execute error:Unknown table 'crash_me10'
### ###
###As far as all queries returned OK, result is NO ###As far as some queries didnt return OK, result is YES
reserved_word_ansi-92/99_under=no # Keyword UNDER reserved_word_ansi-92/99_under=no # Keyword UNDER
###< create table crash_me10 (UNDER int not null) ###< create table crash_me10 (UNDER int not null)
###> OK ###> OK
...@@ -4124,13 +4127,13 @@ reserved_word_ansi92_coalesce=no # Keyword COALESCE ...@@ -4124,13 +4127,13 @@ reserved_word_ansi92_coalesce=no # Keyword COALESCE
###> OK ###> OK
### ###
###As far as all queries returned OK, result is NO ###As far as all queries returned OK, result is NO
reserved_word_ansi92_convert=no # Keyword CONVERT reserved_word_ansi92_convert=yes # Keyword CONVERT
###< create table crash_me10 (CONVERT int not null) ###< create table crash_me10 (CONVERT int not null)
###> OK ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONVERT int not null)' at line 1
###< drop table crash_me10 ###< drop table crash_me10
###> OK ###> execute error:Unknown table 'crash_me10'
### ###
###As far as all queries returned OK, result is NO ###As far as some queries didnt return OK, result is YES
reserved_word_ansi92_count=no # Keyword COUNT reserved_word_ansi92_count=no # Keyword COUNT
###< create table crash_me10 (COUNT int not null) ###< create table crash_me10 (COUNT int not null)
###> OK ###> OK
...@@ -5321,13 +5324,13 @@ reserved_word_extra_low_priority=yes # Keyword LOW_PRIORITY ...@@ -5321,13 +5324,13 @@ reserved_word_extra_low_priority=yes # Keyword LOW_PRIORITY
###> execute error:Unknown table 'crash_me10' ###> execute error:Unknown table 'crash_me10'
### ###
###As far as some queries didnt return OK, result is YES ###As far as some queries didnt return OK, result is YES
reserved_word_extra_master_server_id=yes # Keyword MASTER_SERVER_ID reserved_word_extra_master_server_id=no # Keyword MASTER_SERVER_ID
###< create table crash_me10 (MASTER_SERVER_ID int not null) ###< create table crash_me10 (MASTER_SERVER_ID int not null)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'MASTER_SERVER_ID int not null)' at line 1 ###> OK
###< drop table crash_me10 ###< drop table crash_me10
###> execute error:Unknown table 'crash_me10' ###> OK
### ###
###As far as some queries didnt return OK, result is YES ###As far as all queries returned OK, result is NO
reserved_word_extra_maxextents=no # Keyword MAXEXTENTS reserved_word_extra_maxextents=no # Keyword MAXEXTENTS
###< create table crash_me10 (MAXEXTENTS int not null) ###< create table crash_me10 (MAXEXTENTS int not null)
###> OK ###> OK
...@@ -5720,13 +5723,13 @@ reserved_word_extra_soname=yes # Keyword SONAME ...@@ -5720,13 +5723,13 @@ reserved_word_extra_soname=yes # Keyword SONAME
###> execute error:Unknown table 'crash_me10' ###> execute error:Unknown table 'crash_me10'
### ###
###As far as some queries didnt return OK, result is YES ###As far as some queries didnt return OK, result is YES
reserved_word_extra_spatial=no # Keyword SPATIAL reserved_word_extra_spatial=yes # Keyword SPATIAL
###< create table crash_me10 (SPATIAL int not null) ###< create table crash_me10 (SPATIAL int not null)
###> OK ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'int not null)' at line 1
###< drop table crash_me10 ###< drop table crash_me10
###> OK ###> execute error:Unknown table 'crash_me10'
### ###
###As far as all queries returned OK, result is NO ###As far as some queries didnt return OK, result is YES
reserved_word_extra_sql_big_result=yes # Keyword SQL_BIG_RESULT reserved_word_extra_sql_big_result=yes # Keyword SQL_BIG_RESULT
###< create table crash_me10 (SQL_BIG_RESULT int not null) ###< create table crash_me10 (SQL_BIG_RESULT int not null)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL_BIG_RESULT int not null)' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL_BIG_RESULT int not null)' at line 1
...@@ -6038,13 +6041,16 @@ select_limit3=yes # SELECT with LIMIT # OFFSET # ...@@ -6038,13 +6041,16 @@ select_limit3=yes # SELECT with LIMIT # OFFSET #
select_string_size=1048565 # constant string size in SELECT select_string_size=1048565 # constant string size in SELECT
###We are trying (example with N=5): ###We are trying (example with N=5):
###select 'aaaaa' ###select 'aaaaa'
select_table_update=no # Update with sub select select_table_update=yes # Update with sub select
###< create table crash_q (a integer,b char(10)) ###< create table crash_q (a integer,b char(10))
###> OK ###> OK
###< insert into crash_q values(1,'c') ###< insert into crash_q values(1,'c')
###> OK ###> OK
###< update crash_q set b= (select b from crash_me where crash_q.a = crash_me.a) ###< update crash_q set b= (select b from crash_me where crash_q.a = crash_me.a)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select b from crash_me where crash_q.a = crash_me.a)' at line 1 ###> OK
###
###<select b from crash_q
###>a
### ###
###< drop table crash_q ###< drop table crash_q
###> OK ###> OK
...@@ -6053,7 +6059,7 @@ select_without_from=yes # SELECT without FROM ...@@ -6053,7 +6059,7 @@ select_without_from=yes # SELECT without FROM
###> OK ###> OK
### ###
###As far as all queries returned OK, result is YES ###As far as all queries returned OK, result is YES
server_version=MySQL 4.0.15 debug log/ # server version server_version=MySQL 4.1.2 alpha # server version
simple_joins=yes # ANSI SQL simple joins simple_joins=yes # ANSI SQL simple joins
###< select crash_me.a from crash_me, crash_me t0 ###< select crash_me.a from crash_me, crash_me t0
###> OK ###> OK
...@@ -6148,11 +6154,11 @@ storage_of_float=round # Storage of float values ...@@ -6148,11 +6154,11 @@ storage_of_float=round # Storage of float values
### ###
###< drop table crash_q ###< drop table crash_q
###> OK ###> OK
subqueries=no # subqueries subqueries=yes # subqueries
###< select a from crash_me where crash_me.a in (select max(a) from crash_me) ###< select a from crash_me where crash_me.a in (select max(a) from crash_me)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select max(a) from crash_me)' at line 1 ###> OK
### ###
###As far as some queries didnt return OK, result is NO ###As far as all queries returned OK, result is YES
table_alias=yes # Table alias table_alias=yes # Table alias
###< select b.a from crash_me as b ###< select b.a from crash_me as b
###> OK ###> OK
...@@ -6220,7 +6226,7 @@ time_format_inresult=iso # Time format in result ...@@ -6220,7 +6226,7 @@ time_format_inresult=iso # Time format in result
###> OK ###> OK
### ###
###< select a from crash_me_t ###< select a from crash_me_t
###> 19:55:21 ###> 13:49:05
###< delete from crash_me_t ###< delete from crash_me_t
###> OK ###> OK
transactions=yes # transactions transactions=yes # transactions
...@@ -6439,13 +6445,13 @@ type_extra_line=no # Type line ...@@ -6439,13 +6445,13 @@ type_extra_line=no # Type line
###> execute error:Unknown table 'crash_q' ###> execute error:Unknown table 'crash_q'
### ###
###As far as some queries didnt return OK, result is NO ###As far as some queries didnt return OK, result is NO
type_extra_long=no # Type long type_extra_long=yes # Type long
###< create table crash_q (q long) ###< create table crash_q (q long)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 ###> OK
###< drop table crash_q ###< drop table crash_q
###> execute error:Unknown table 'crash_q' ###> OK
### ###
###As far as some queries didnt return OK, result is NO ###As far as all queries returned OK, result is YES
type_extra_long_raw=no # Type long raw type_extra_long_raw=no # Type long raw
###< create table crash_q (q long raw) ###< create table crash_q (q long raw)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'raw)' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'raw)' at line 1
...@@ -6558,20 +6564,20 @@ type_extra_path=no # Type path ...@@ -6558,20 +6564,20 @@ type_extra_path=no # Type path
###> execute error:Unknown table 'crash_q' ###> execute error:Unknown table 'crash_q'
### ###
###As far as some queries didnt return OK, result is NO ###As far as some queries didnt return OK, result is NO
type_extra_point=no # Type point type_extra_point=yes # Type point
###< create table crash_q (q point) ###< create table crash_q (q point)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'point)' at line 1 ###> OK
###< drop table crash_q ###< drop table crash_q
###> execute error:Unknown table 'crash_q' ###> OK
### ###
###As far as some queries didnt return OK, result is NO ###As far as all queries returned OK, result is YES
type_extra_polygon=no # Type polygon type_extra_polygon=yes # Type polygon
###< create table crash_q (q polygon) ###< create table crash_q (q polygon)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'polygon)' at line 1 ###> OK
###< drop table crash_q ###< drop table crash_q
###> execute error:Unknown table 'crash_q' ###> OK
### ###
###As far as some queries didnt return OK, result is NO ###As far as all queries returned OK, result is YES
type_extra_raw(1_arg)=no # Type raw(1 arg) type_extra_raw(1_arg)=no # Type raw(1 arg)
###< create table crash_q (q raw(16)) ###< create table crash_q (q raw(16))
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'raw(16))' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'raw(16))' at line 1
...@@ -6593,13 +6599,13 @@ type_extra_rowid=no # Type rowid ...@@ -6593,13 +6599,13 @@ type_extra_rowid=no # Type rowid
###> execute error:Unknown table 'crash_q' ###> execute error:Unknown table 'crash_q'
### ###
###As far as some queries didnt return OK, result is NO ###As far as some queries didnt return OK, result is NO
type_extra_serial=no # Type serial type_extra_serial=yes # Type serial
###< create table crash_q (q serial) ###< create table crash_q (q serial)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'serial)' at line 1 ###> OK
###< drop table crash_q ###< drop table crash_q
###> execute error:Unknown table 'crash_q' ###> OK
### ###
###As far as some queries didnt return OK, result is NO ###As far as all queries returned OK, result is YES
type_extra_set(1_arg)=yes # Type set(1 arg) type_extra_set(1_arg)=yes # Type set(1 arg)
###< create table crash_q (q set('red')) ###< create table crash_q (q set('red'))
###> OK ###> OK
...@@ -6635,13 +6641,13 @@ type_extra_text=yes # Type text ...@@ -6635,13 +6641,13 @@ type_extra_text=yes # Type text
###> OK ###> OK
### ###
###As far as all queries returned OK, result is YES ###As far as all queries returned OK, result is YES
type_extra_text(1_arg)=no # Type text(1 arg) type_extra_text(1_arg)=yes # Type text(1 arg)
###< create table crash_q (q text(10)) ###< create table crash_q (q text(10))
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(10))' at line 1 ###> OK
###< drop table crash_q ###< drop table crash_q
###> execute error:Unknown table 'crash_q' ###> OK
### ###
###As far as some queries didnt return OK, result is NO ###As far as all queries returned OK, result is YES
type_extra_timespan=no # Type timespan type_extra_timespan=no # Type timespan
###< create table crash_q (q timespan) ###< create table crash_q (q timespan)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'timespan)' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'timespan)' at line 1
...@@ -6726,13 +6732,13 @@ type_sql_bit_varying(1_arg)=no # Type bit varying(1 arg) ...@@ -6726,13 +6732,13 @@ type_sql_bit_varying(1_arg)=no # Type bit varying(1 arg)
###> execute error:Unknown table 'crash_q' ###> execute error:Unknown table 'crash_q'
### ###
###As far as some queries didnt return OK, result is NO ###As far as some queries didnt return OK, result is NO
type_sql_boolean=no # Type boolean type_sql_boolean=yes # Type boolean
###< create table crash_q (q boolean) ###< create table crash_q (q boolean)
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'boolean)' at line 1 ###> OK
###< drop table crash_q ###< drop table crash_q
###> execute error:Unknown table 'crash_q' ###> OK
### ###
###As far as some queries didnt return OK, result is NO ###As far as all queries returned OK, result is YES
type_sql_char(1_arg)=yes # Type char(1 arg) type_sql_char(1_arg)=yes # Type char(1 arg)
###< create table crash_q (q char(1)) ###< create table crash_q (q char(1))
###> OK ###> OK
...@@ -7032,12 +7038,12 @@ unique_null_in_create=yes # unique null in create ...@@ -7032,12 +7038,12 @@ unique_null_in_create=yes # unique null in create
###> OK ###> OK
### ###
###As far as all queries returned OK, result is YES ###As far as all queries returned OK, result is YES
value_of_false=not supported # Value of FALSE value_of_false=0 # Value of FALSE
###<select FALSE ###<select FALSE
###> execute failed:Unknown column 'FALSE' in 'field list' ###>0
value_of_true=not supported # Value of TRUE value_of_true=1 # Value of TRUE
###<select TRUE ###<select TRUE
###> execute failed:Unknown column 'TRUE' in 'field list' ###>1
views=no # views views=no # views
###< create view crash_q as select a from crash_me ###< create view crash_q as select a from crash_me
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'view crash_q as select a from crash_me' at line 1 ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'view crash_q as select a from crash_me' at line 1
......
...@@ -2782,14 +2782,8 @@ int Field_double::cmp(const char *a_ptr, const char *b_ptr) ...@@ -2782,14 +2782,8 @@ int Field_double::cmp(const char *a_ptr, const char *b_ptr)
else else
#endif #endif
{ {
/* could this ALWAYS be 2 calls to doubleget() ?? */
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
doubleget(a, a_ptr); doubleget(a, a_ptr);
doubleget(b, b_ptr); doubleget(b, b_ptr);
#else
memcpy_fixed(&a,a_ptr,sizeof(double));
memcpy_fixed(&b,b_ptr,sizeof(double));
#endif
} }
return (a < b) ? -1 : (a > b) ? 1 : 0; return (a < b) ? -1 : (a > b) ? 1 : 0;
} }
...@@ -2809,12 +2803,7 @@ void Field_double::sort_string(char *to,uint length __attribute__((unused))) ...@@ -2809,12 +2803,7 @@ void Field_double::sort_string(char *to,uint length __attribute__((unused)))
} }
else else
#endif #endif
/* could this ALWAYS be 2 calls to doubleget() ?? */
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
doubleget(nr,ptr); doubleget(nr,ptr);
#else
memcpy_fixed(&nr,ptr,sizeof(nr));
#endif
change_double_for_sort(nr, (byte*) to); change_double_for_sort(nr, (byte*) to);
} }
......
...@@ -46,7 +46,5 @@ void unireg_init(ulong options) ...@@ -46,7 +46,5 @@ void unireg_init(ulong options)
log_10[i]= nr ; nr*= 10.0; log_10[i]= nr ; nr*= 10.0;
} }
specialflag|=options; /* Set options from argv */ specialflag|=options; /* Set options from argv */
thread_stack_min=thread_stack - STACK_MIN_SIZE;
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -1521,21 +1521,26 @@ String *Item_sum_udf_str::val_str(String *str) ...@@ -1521,21 +1521,26 @@ String *Item_sum_udf_str::val_str(String *str)
int group_concat_key_cmp_with_distinct(void* arg, byte* key1, int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
byte* key2) byte* key2)
{ {
Item_func_group_concat* item= (Item_func_group_concat*)arg; Item_func_group_concat* grp_item= (Item_func_group_concat*)arg;
uint *offset= item->field_offsets+ item->field_list_offset;
Item **field_item, **end; Item **field_item, **end;
char *record= (char*) grp_item->table->record[0];
for (field_item= item->args, end= field_item+item->arg_count_field; for (field_item= grp_item->args, end= field_item + grp_item->arg_count_field;
field_item < end; field_item < end;
field_item++) field_item++)
{ {
Field *field= (*field_item)->real_item()->get_tmp_table_field(); /*
We have to use get_tmp_table_field() instead of
real_item()->get_tmp_table_field() because we want the field in
the temporary table, not the original field
*/
Field *field= (*field_item)->get_tmp_table_field();
if (field) if (field)
{ {
int res; int res;
if ((res= field->key_cmp(key1 + *offset, key2 + *offset))) uint offset= (uint) (field->ptr - record);
if ((res= field->key_cmp(key1 + offset, key2 + offset)))
return res; return res;
offset++;
} }
} }
return 0; return 0;
...@@ -1549,26 +1554,33 @@ int group_concat_key_cmp_with_distinct(void* arg, byte* key1, ...@@ -1549,26 +1554,33 @@ int group_concat_key_cmp_with_distinct(void* arg, byte* key1,
int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2) int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2)
{ {
Item_func_group_concat* item= (Item_func_group_concat*)arg; Item_func_group_concat* grp_item= (Item_func_group_concat*) arg;
uint *offset= item->field_offsets;
ORDER **order_item, **end; ORDER **order_item, **end;
char *record= (char*) grp_item->table->record[0];
for (order_item= item->order, end=order_item+ item->arg_count_order; for (order_item= grp_item->order, end=order_item+ grp_item->arg_count_order;
order_item < end; order_item < end;
order_item++) order_item++)
{ {
Item *item= *(*order_item)->item; Item *item= *(*order_item)->item;
Field *field= item->real_item()->get_tmp_table_field(); /*
We have to use get_tmp_table_field() instead of
real_item()->get_tmp_table_field() because we want the field in
the temporary table, not the original field
*/
Field *field= item->get_tmp_table_field();
if (field) if (field)
{ {
int res= field->key_cmp(key1 + *offset, key2 + *offset); int res;
if (res) uint offset= (uint) (field->ptr - record);
if ((res= field->key_cmp(key1 + offset, key2 + offset)))
return (*order_item)->asc ? res : -res; return (*order_item)->asc ? res : -res;
offset++;
} }
} }
/* /*
We can't return 0 because tree class remove this item as double value. We can't return 0 because in that case the tree class would remove this
item as double value. This would cause problems for case-changes and
if the the returned values are not the same we do the sort on.
*/ */
return 1; return 1;
} }
...@@ -1601,10 +1613,10 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)), ...@@ -1601,10 +1613,10 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
Item_func_group_concat *item) Item_func_group_concat *item)
{ {
char buff[MAX_FIELD_WIDTH]; char buff[MAX_FIELD_WIDTH];
String tmp((char *)&buff,sizeof(buff),default_charset_info); String tmp((char*) &buff, sizeof(buff), default_charset_info);
String tmp2((char *)&buff,sizeof(buff),default_charset_info); String tmp2((char *) &buff, sizeof(buff), default_charset_info);
uint *field_offsets= (item->field_offsets + char *record= (char*) item->table->record[0];
item->field_list_offset);
tmp.length(0); tmp.length(0);
for (uint i= 0; i < item->arg_count_field; i++) for (uint i= 0; i < item->arg_count_field; i++)
...@@ -1612,12 +1624,20 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)), ...@@ -1612,12 +1624,20 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
Item *show_item= item->args[i]; Item *show_item= item->args[i];
if (!show_item->const_item()) if (!show_item->const_item())
{ {
Field *f= show_item->real_item()->get_tmp_table_field(); /*
char *sv= f->ptr; We have to use get_tmp_table_field() instead of
f->ptr= (char *) key + *(field_offsets++); real_item()->get_tmp_table_field() because we want the field in
String *res= f->val_str(&tmp,&tmp2); the temporary table, not the original field
*/
Field *field= show_item->get_tmp_table_field();
String *res;
char *save_ptr= field->ptr;
uint offset= (uint) (save_ptr - record);
DBUG_ASSERT(offset < item->table->reclength);
field->ptr= (char *) key + offset;
res= field->val_str(&tmp,&tmp2);
item->result.append(*res); item->result.append(*res);
f->ptr= sv; field->ptr= save_ptr;
} }
else else
{ {
...@@ -1660,7 +1680,7 @@ Item_func_group_concat::Item_func_group_concat(bool is_distinct, ...@@ -1660,7 +1680,7 @@ Item_func_group_concat::Item_func_group_concat(bool is_distinct,
SQL_LIST *is_order, SQL_LIST *is_order,
String *is_separator) String *is_separator)
:Item_sum(), tmp_table_param(0), max_elements_in_tree(0), warning(0), :Item_sum(), tmp_table_param(0), max_elements_in_tree(0), warning(0),
warning_available(0), key_length(0), rec_offset(0), warning_available(0), key_length(0),
tree_mode(0), distinct(is_distinct), warning_for_row(0), tree_mode(0), distinct(is_distinct), warning_for_row(0),
separator(is_separator), tree(&tree_base), table(0), separator(is_separator), tree(&tree_base), table(0),
order(0), tables_list(0), order(0), tables_list(0),
...@@ -1685,14 +1705,12 @@ Item_func_group_concat::Item_func_group_concat(bool is_distinct, ...@@ -1685,14 +1705,12 @@ Item_func_group_concat::Item_func_group_concat(bool is_distinct,
args - arg_count_field+arg_count_order args - arg_count_field+arg_count_order
(for possible order items in temporare tables) (for possible order items in temporare tables)
order - arg_count_order order - arg_count_order
field_offset For offset withing the key
*/ */
if (!(args= (Item**) sql_alloc((sizeof(Item*) + sizeof(uint)) * arg_count + if (!(args= (Item**) sql_alloc(sizeof(Item*) * arg_count +
sizeof(ORDER*)*arg_count_order))) sizeof(ORDER*)*arg_count_order)))
return; return;
order= (ORDER**)(args + arg_count); order= (ORDER**)(args + arg_count);
field_offsets= (uint*) (order+ arg_count_order);
/* fill args items of show and sort */ /* fill args items of show and sort */
List_iterator_fast<Item> li(*is_select); List_iterator_fast<Item> li(*is_select);
...@@ -1723,7 +1741,6 @@ Item_func_group_concat::Item_func_group_concat(THD *thd, ...@@ -1723,7 +1741,6 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
warning(item->warning), warning(item->warning),
warning_available(item->warning_available), warning_available(item->warning_available),
key_length(item->key_length), key_length(item->key_length),
rec_offset(item->rec_offset),
tree_mode(item->tree_mode), tree_mode(item->tree_mode),
distinct(item->distinct), distinct(item->distinct),
warning_for_row(item->warning_for_row), warning_for_row(item->warning_for_row),
...@@ -1731,7 +1748,6 @@ Item_func_group_concat::Item_func_group_concat(THD *thd, ...@@ -1731,7 +1748,6 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
tree(item->tree), tree(item->tree),
table(item->table), table(item->table),
order(item->order), order(item->order),
field_offsets(item->field_offsets),
tables_list(item->tables_list), tables_list(item->tables_list),
group_concat_max_len(item->group_concat_max_len), group_concat_max_len(item->group_concat_max_len),
show_elements(item->show_elements), show_elements(item->show_elements),
...@@ -1817,39 +1833,36 @@ void Item_func_group_concat::clear() ...@@ -1817,39 +1833,36 @@ void Item_func_group_concat::clear()
bool Item_func_group_concat::add() bool Item_func_group_concat::add()
{ {
bool record_is_null;
if (always_null) if (always_null)
return 0; return 0;
copy_fields(tmp_table_param); copy_fields(tmp_table_param);
copy_funcs(tmp_table_param->items_to_copy); copy_funcs(tmp_table_param->items_to_copy);
record_is_null= TRUE;
for (uint i= 0; i < arg_count_field; i++) for (uint i= 0; i < arg_count_field; i++)
{ {
Item *show_item= args[i]; Item *show_item= args[i];
if (!show_item->const_item()) if (!show_item->const_item())
{ {
/*
Here we use real_item as we want the original field data that should
be written to table->record[0]
*/
Field *f= show_item->real_item()->get_tmp_table_field(); Field *f= show_item->real_item()->get_tmp_table_field();
if (!f->is_null()) if (f->is_null())
{ return 0; // Skip row if it contains null
record_is_null= FALSE;
break;
}
} }
} }
if (record_is_null)
return 0;
null_value= FALSE; null_value= FALSE;
if (tree_mode) if (tree_mode)
{ {
if (!tree_insert(tree, table->record[0] + rec_offset, 0, tree->custom_arg)) if (!tree_insert(tree, table->record[0], 0, tree->custom_arg))
return 1; return 1;
} }
else else
{ {
if (result.length() <= group_concat_max_len && !warning_for_row) if (result.length() <= group_concat_max_len && !warning_for_row)
dump_leaf_key(table->record[0] + rec_offset, 1, this); dump_leaf_key(table->record[0], 1, this);
} }
return 0; return 0;
} }
...@@ -1906,8 +1919,8 @@ bool Item_func_group_concat::setup(THD *thd) ...@@ -1906,8 +1919,8 @@ bool Item_func_group_concat::setup(THD *thd)
{ {
List<Item> list; List<Item> list;
SELECT_LEX *select_lex= thd->lex->current_select; SELECT_LEX *select_lex= thd->lex->current_select;
Field **field, **field_end; uint const_fields;
uint offset, *offsets, const_fields; byte *record;
qsort_cmp2 compare_key; qsort_cmp2 compare_key;
DBUG_ENTER("Item_func_group_concat::setup"); DBUG_ENTER("Item_func_group_concat::setup");
...@@ -1967,21 +1980,11 @@ bool Item_func_group_concat::setup(THD *thd) ...@@ -1967,21 +1980,11 @@ bool Item_func_group_concat::setup(THD *thd)
table->file->extra(HA_EXTRA_NO_ROWS); table->file->extra(HA_EXTRA_NO_ROWS);
table->no_rows= 1; table->no_rows= 1;
field_end= (field= table->field) + table->fields; key_length= table->reclength;
offsets= field_offsets; record= table->record[0];
offset= 0;
for (key_length= 0; field < field_end; field++)
{
uint32 length= (*field)->pack_length();
(*offsets++)= offset;
offset+= length;
key_length += length;
}
/* Offset to first result field in table */ /* Offset to first result field in table */
field_list_offset= table->fields - (list.elements - const_fields); field_list_offset= table->fields - (list.elements - const_fields);
/* Offset to first field */
rec_offset= (uint) (table->field[0]->ptr - table->record[0]);
if (tree_mode) if (tree_mode)
delete_tree(tree); delete_tree(tree);
......
...@@ -681,7 +681,6 @@ class Item_func_group_concat : public Item_sum ...@@ -681,7 +681,6 @@ class Item_func_group_concat : public Item_sum
MYSQL_ERROR *warning; MYSQL_ERROR *warning;
bool warning_available; bool warning_available;
uint key_length; uint key_length;
int rec_offset;
bool tree_mode; bool tree_mode;
bool distinct; bool distinct;
bool warning_for_row; bool warning_for_row;
...@@ -704,7 +703,6 @@ class Item_func_group_concat : public Item_sum ...@@ -704,7 +703,6 @@ class Item_func_group_concat : public Item_sum
TREE *tree; TREE *tree;
TABLE *table; TABLE *table;
ORDER **order; ORDER **order;
uint *field_offsets;
TABLE_LIST *tables_list; TABLE_LIST *tables_list;
ulong group_concat_max_len; ulong group_concat_max_len;
uint show_elements; uint show_elements;
......
...@@ -2527,6 +2527,8 @@ int main(int argc, char **argv) ...@@ -2527,6 +2527,8 @@ int main(int argc, char **argv)
} }
} }
#endif #endif
thread_stack_min=thread_stack - STACK_MIN_SIZE;
(void) thr_setconcurrency(concurrency); // 10 by default (void) thr_setconcurrency(concurrency); // 10 by default
/* /*
......
...@@ -3717,6 +3717,10 @@ static bool check_db_used(THD *thd,TABLE_LIST *tables) ...@@ -3717,6 +3717,10 @@ static bool check_db_used(THD *thd,TABLE_LIST *tables)
#define used_stack(A,B) (long) (B - A) #define used_stack(A,B) (long) (B - A)
#endif #endif
#ifndef DBUG_OFF
long max_stack_used;
#endif
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
bool check_stack_overrun(THD *thd,char *buf __attribute__((unused))) bool check_stack_overrun(THD *thd,char *buf __attribute__((unused)))
{ {
...@@ -3729,6 +3733,9 @@ bool check_stack_overrun(THD *thd,char *buf __attribute__((unused))) ...@@ -3729,6 +3733,9 @@ bool check_stack_overrun(THD *thd,char *buf __attribute__((unused)))
thd->fatal_error(); thd->fatal_error();
return 1; return 1;
} }
#ifndef DBUG_OFF
max_stack_used= max(max_stack_used, stack_used);
#endif
return 0; return 0;
} }
#endif /* EMBEDDED_LIBRARY */ #endif /* EMBEDDED_LIBRARY */
......
...@@ -8402,12 +8402,11 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param, ...@@ -8402,12 +8402,11 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
Item *pos; Item *pos;
List_iterator_fast<Item> li(all_fields); List_iterator_fast<Item> li(all_fields);
Copy_field *copy; Copy_field *copy;
DBUG_ENTER("setup_copy_fields");
res_selected_fields.empty(); res_selected_fields.empty();
res_all_fields.empty(); res_all_fields.empty();
List_iterator_fast<Item> itr(res_all_fields); List_iterator_fast<Item> itr(res_all_fields);
uint i, border= all_fields.elements - elements; uint i, border= all_fields.elements - elements;
DBUG_ENTER("setup_copy_fields");
if (!(copy=param->copy_field= new Copy_field[param->field_count])) if (!(copy=param->copy_field= new Copy_field[param->field_count]))
goto err2; goto err2;
......
...@@ -3063,11 +3063,15 @@ sum_expr: ...@@ -3063,11 +3063,15 @@ sum_expr:
{ $$=new Item_sum_variance($3); } { $$=new Item_sum_variance($3); }
| SUM_SYM '(' in_sum_expr ')' | SUM_SYM '(' in_sum_expr ')'
{ $$=new Item_sum_sum($3); } { $$=new Item_sum_sum($3); }
| GROUP_CONCAT_SYM '(' opt_distinct expr_list opt_gorder_clause | GROUP_CONCAT_SYM '(' opt_distinct
opt_gconcat_separator ')' { Select->in_sum_expr++; }
expr_list opt_gorder_clause
opt_gconcat_separator
')'
{ {
$$=new Item_func_group_concat($3,$4,Select->gorder_list,$6); Select->in_sum_expr--;
$4->empty(); $$=new Item_func_group_concat($3,$5,Select->gorder_list,$7);
$5->empty();
}; };
opt_distinct: opt_distinct:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment