diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 4067304c8e1..b3533f2a834 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -52,6 +52,7 @@ hf@genie.(none) igor@hundin.mysql.fi igor@rurik.mysql.com ingo@mysql.com +jani@a80-186-24-72.elisa-laajakaista.fi jani@dsl-jkl1657.dial.inet.fi jani@dsl-kpogw4gb5.dial.inet.fi jani@hynda.(none) diff --git a/client/mysql.cc b/client/mysql.cc index 31f563d4116..fe6af909a5a 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -425,8 +425,9 @@ int main(int argc,char *argv[]) } #endif sprintf(buff, "%s", +#ifndef NOT_YET "Type 'help;' or '\\h' for help. Type '\\c' to clear the buffer.\n"); -#ifdef NOT_YET +#else "Type 'help [[%]function name[%]]' to get help on usage of function.\n"); #endif put_info(buff,INFO_INFO); diff --git a/client/mysqltest.c b/client/mysqltest.c index 00165ab4f45..be5dac1c9d9 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -2358,7 +2358,7 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags) if (display_metadata) { - dynstr_append(ds,"Catalog\tDatabase\tTable\tTable_alias\tColumn\tColumn_alias\tName\tType\tLength\tMax length\tIs_null\tFlags\tDecimals\n"); + dynstr_append(ds,"Catalog\tDatabase\tTable\tTable_alias\tColumn\tColumn_alias\tName\tType\tLength\tMax length\tIs_null\tFlags\tDecimals\tCharsetnr\n"); for (field= mysql_fetch_fields(res), field_end= field+num_fields ; field < field_end ; field++) @@ -2394,6 +2394,9 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags) dynstr_append_mem(ds, "\t", 1); int10_to_str((int) field->decimals, buff, 10); dynstr_append(ds, buff); + dynstr_append_mem(ds, "\t", 1); + int10_to_str((int) field->charsetnr, buff, 10); + dynstr_append(ds, buff); dynstr_append_mem(ds, "\n", 1); } } diff --git a/include/my_global.h b/include/my_global.h index 4a56741ddbc..e114aefecca 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1120,10 +1120,10 @@ typedef union { *((T)+1)=(((A) >> 16));\ *((T)+0)=(((A) >> 24)); } -#define doubleget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(double)) -#define doublestore(T,V) memcpy((byte*) (T),(byte*) &V,sizeof(double)) -#define longlongget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(ulonglong)) -#define longlongstore(T,V) memcpy((byte*) (T),(byte*) &V,sizeof(ulonglong)) +#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double)) +#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double)) +#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong)) +#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong)) #else diff --git a/include/mysql_com.h b/include/mysql_com.h index 4b94fc71c0c..578ef964d8d 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -119,7 +119,7 @@ enum enum_server_command #define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */ #define CLIENT_MULTI_STATEMENTS 65536 /* Enable/disable multi-stmt support */ #define CLIENT_MULTI_RESULTS 131072 /* Enable/disable multi-results */ -#define CLIENT_REMEMBER_OPTIONS ((ulong) (1L << 31)) +#define CLIENT_REMEMBER_OPTIONS (((ulong) 1) << 31) #define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ #define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index da58a711d22..0cfcf8b1c49 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -88,9 +88,9 @@ libmysqld.a: libmysqld_int.a $(INC_LIB) cd tmp ; \ for file in *.a ; do \ bfile=`basename $$file .a` ; \ - ar x $$file; \ + $(AR) x $$file; \ 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 ; \ done mv libmysqld_int2.a libmysqld.a diff --git a/libmysqld/emb_qcache.cc b/libmysqld/emb_qcache.cc index 4dac154ab80..0b6416632b7 100644 --- a/libmysqld/emb_qcache.cc +++ b/libmysqld/emb_qcache.cc @@ -428,7 +428,6 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src) *prev_row= row; row->data= columns; MYSQL_ROW col_end= columns + mysql->field_count; - uint len; for (; columns < col_end; columns++) src->load_column(&data->alloc, columns); diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 6fb23f8f00d..cfb50d3907a 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -332,10 +332,10 @@ char ** copy_arguments_ptr= 0; int init_embedded_server(int argc, char **argv, char **groups) { - char glob_hostname[FN_REFLEN]; - - /* This mess is to allow people to call the init function without - * having to mess with a fake argv */ + /* + This mess is to allow people to call the init function without + having to mess with a fake argv + */ int *argcp; char ***argvp; int fake_argc = 1; diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c index 816748d459a..b13ebfb4cad 100644 --- a/myisam/mi_locking.c +++ b/myisam/mi_locking.c @@ -286,6 +286,21 @@ void mi_copy_status(void* to,void *from) ((MI_INFO*) to)->state= &((MI_INFO*) from)->save_state; } + +/* + Check if should allow concurrent inserts + + IMPLEMENTATION + Don't allow concurrent inserts if we have a hole in the table. + + NOTES + Rtree indexes are disabled in mi_open() + + RETURN + 0 ok to use concurrent inserts + 1 not ok +*/ + my_bool mi_check_status(void* param) { MI_INFO *info=(MI_INFO*) param; diff --git a/myisam/mi_rnext.c b/myisam/mi_rnext.c index e1cf916d6d9..6e6056f98d9 100644 --- a/myisam/mi_rnext.c +++ b/myisam/mi_rnext.c @@ -57,47 +57,45 @@ int mi_rnext(MI_INFO *info, byte *buf, int inx) } else { - switch(info->s->keyinfo[inx].key_alg) - { - case HA_KEY_ALG_RTREE: + switch (info->s->keyinfo[inx].key_alg) { + case HA_KEY_ALG_RTREE: /* - Note that rtree doesn't support that the table - may be changed since last call, so we do need - to skip rows inserted by other threads like in btree + Note that rtree doesn't support that the table + may be changed since last call, so we do need + to skip rows inserted by other threads like in btree */ - error=rtree_get_next(info,inx,info->lastkey_length); - break; + error= rtree_get_next(info,inx,info->lastkey_length); + break; - case HA_KEY_ALG_BTREE: - default: - if (!changed) - { - error=_mi_search_next(info,info->s->keyinfo+inx,info->lastkey, - info->lastkey_length,flag, - info->s->state.key_root[inx]); - } - else - { - error=_mi_search(info,info->s->keyinfo+inx,info->lastkey, - USE_WHOLE_KEY,flag, info->s->state.key_root[inx]); - } - if (!error && info->s->concurrent_insert) - { - while (info->lastpos >= info->state->data_file_length) - { - /* Skip rows that are inserted by other threads since we got a lock */ - if ((error=_mi_search_next(info,info->s->keyinfo+inx,info->lastkey, - info->lastkey_length, - SEARCH_BIGGER, - info->s->state.key_root[inx]))) - break; - } - } + case HA_KEY_ALG_BTREE: + default: + if (!changed) + error= _mi_search_next(info,info->s->keyinfo+inx,info->lastkey, + info->lastkey_length,flag, + info->s->state.key_root[inx]); + else + error= _mi_search(info,info->s->keyinfo+inx,info->lastkey, + USE_WHOLE_KEY,flag, info->s->state.key_root[inx]); } } if (info->s->concurrent_insert) + { + if (!error) + { + while (info->lastpos >= info->state->data_file_length) + { + /* Skip rows inserted by other threads since we got a lock */ + if ((error=_mi_search_next(info,info->s->keyinfo+inx, + info->lastkey, + info->lastkey_length, + SEARCH_BIGGER, + info->s->state.key_root[inx]))) + break; + } + } rw_unlock(&info->s->key_root_lock[inx]); + } /* Don't clear if database-changed */ info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update|= HA_STATE_NEXT_FOUND; diff --git a/myisam/mi_rprev.c b/myisam/mi_rprev.c index 4807e636252..b787210e037 100644 --- a/myisam/mi_rprev.c +++ b/myisam/mi_rprev.c @@ -52,21 +52,22 @@ int mi_rprev(MI_INFO *info, byte *buf, int inx) error=_mi_search(info,share->keyinfo+inx,info->lastkey, USE_WHOLE_KEY, flag, share->state.key_root[inx]); - if (!error) - { - while (info->lastpos >= info->state->data_file_length) - { - /* Skip rows that are inserted by other threads since we got a lock */ - if ((error=_mi_search_next(info,share->keyinfo+inx,info->lastkey, - info->lastkey_length, - SEARCH_SMALLER, - share->state.key_root[inx]))) - break; - } - } - if (share->concurrent_insert) + { + if (!error) + { + while (info->lastpos >= info->state->data_file_length) + { + /* Skip rows that are inserted by other threads since we got a lock */ + if ((error=_mi_search_next(info,share->keyinfo+inx,info->lastkey, + info->lastkey_length, + SEARCH_SMALLER, + share->state.key_root[inx]))) + break; + } + } rw_unlock(&share->key_root_lock[inx]); + } info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update|= HA_STATE_PREV_FOUND; if (error) diff --git a/myisam/mi_write.c b/myisam/mi_write.c index 59819b40f96..c17f47fc1ae 100644 --- a/myisam/mi_write.c +++ b/myisam/mi_write.c @@ -917,7 +917,7 @@ int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows) DBUG_PRINT("enter",("cache_size: %lu", cache_size)); DBUG_ASSERT(!info->bulk_insert && - (!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT)); + (!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT)); for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++) { diff --git a/mysql-test/include/have_debug.inc b/mysql-test/include/have_debug.inc deleted file mode 100644 index 63c0c008b21..00000000000 --- a/mysql-test/include/have_debug.inc +++ /dev/null @@ -1,4 +0,0 @@ --- require r/have_debug.require -disable_query_log; -select instr(version(),convert('debug' using utf8))!=0; -enable_query_log; diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 5807bae6a06..dccd87e3d75 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -59,11 +59,16 @@ grp group_concat(d order by a desc) 1 a 2 b,a 3 c,d,d,b,b,a -select grp,group_concat(a order by a,d+c) from t1 group by grp; -grp group_concat(a order by a,d+c) +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-ascii(c)-a) 1 1 2 2,3 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; grp group_concat(c order by 1) 1 a @@ -136,17 +141,7 @@ grp ROUND(group_concat(a separator "")) 3 456789 drop table t1; create table t1 (grp int, c char(10)); -insert into t1 values (1,NULL); -insert into t1 values (2,"b"); -insert into t1 values (2,NULL); -insert into t1 values (3,"E"); -insert into t1 values (3,NULL); -insert into t1 values (3,"D"); -insert into t1 values (3,NULL); -insert into t1 values (3,NULL); -insert into t1 values (3,"D"); -insert into t1 values (4,""); -insert into t1 values (5,NULL); +insert into t1 values (1,NULL),(2,"b"),(2,NULL),(3,"E"),(3,NULL),(3,"D"),(3,NULL),(3,NULL),(3,"D"),(4,""),(5,NULL); select grp,group_concat(c order by c) from t1 group by grp; grp group_concat(c order by c) 1 NULL @@ -207,9 +202,21 @@ NULL drop table t1; drop table t2; create table t1 (bar varchar(32)); -insert into t1 values('test'),('test2'); -select * from t1 having group_concat(bar)=''; +insert into t1 values('test1'),('test2'); +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 +test1 drop table t1; create table t1 (a int, a1 varchar(10)); create table t2 (a0 int); @@ -222,3 +229,75 @@ select group_concat(a1 order by (t1.a)) from t1; group_concat(a1 order by (t1.a)) b,a,c drop table t1, t2; +CREATE TABLE t1 (id1 tinyint(4) NOT NULL, id2 tinyint(4) NOT NULL); +INSERT INTO t1 VALUES (1, 1),(1, 2),(1, 3),(1, 4),(1, 5),(2, 1),(2, 2),(2, 3); +CREATE TABLE t2 (id1 tinyint(4) NOT NULL); +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +SELECT t1.id1, GROUP_CONCAT(t1.id2 ORDER BY t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 AND t1.id1=1 GROUP BY t1.id1; +id1 concat_id +1 1,2,3,4,5 +SELECT t1.id1, GROUP_CONCAT(t1.id2 ORDER BY t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +id1 concat_id +1 1,2,3,4,5 +2 1,2,3 +SELECT t1.id1, GROUP_CONCAT(t1.id2 ORDER BY t1.id2 DESC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +id1 concat_id +1 5,4,3,2,1 +2 3,2,1 +SELECT t1.id1, GROUP_CONCAT(t1.id2 ORDER BY 6-t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +id1 concat_id +1 5,4,3,2,1 +2 3,2,1 +SELECT t1.id1, GROUP_CONCAT(t1.id2,6-t1.id2 ORDER BY 6-t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +id1 concat_id +1 51,42,33,24,15 +2 33,24,15 +SELECT t1.id1, GROUP_CONCAT(t1.id2,6-t1.id2 ORDER BY 6-t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +id1 concat_id +1 51,42,33,24,15 +2 33,24,15 +SELECT t1.id1, GROUP_CONCAT(t1.id2,"/",6-t1.id2 ORDER BY 1+0,6-t1.id2,t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +id1 concat_id +1 5/1,4/2,3/3,2/4,1/5 +2 3/3,2/4,1/5 +drop table t1,t2; +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); +select distinct s1 from t1 order by s2,s1; +s1 +c +a +b +select group_concat(distinct s1) from t1; +group_concat(distinct s1) +a,b,c +select group_concat(distinct s1 order by s2) from t1 where s2 < 4; +group_concat(distinct s1 order by s2) +c,b,a +select group_concat(distinct s1 order by s2) from t1; +group_concat(distinct s1 order by s2) +c,b,a,c +drop table t1; +create table t1 (a int, c int); +insert into t1 values (1, 2), (2, 3), (2, 4), (3, 5); +create table t2 (a int, c int); +insert into t2 values (1, 5), (2, 4), (3, 3), (3,3); +select group_concat(c) from t1; +group_concat(c) +2,3,4,5 +select group_concat(c order by (select c from t2 where t2.a=t1.a limit 1)) as grp from t1; +grp +5,4,3,2 +select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a)) as grp from t1; +grp +5,4,3,2 +select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a) desc) as grp from t1; +grp +2,4,3,5 +select a,c,(select group_concat(c order by a) from t2 where a=t1.a) as grp from t1 order by grp; +a c grp +3 5 3,3 +2 3 4 +2 4 4 +1 2 5 +drop table t1,t2; diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index 0b127188586..d0765e2721f 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -5,6 +5,9 @@ grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option; select current_user(); current_user() mysqltest_1@localhost +select current_user; +current_user +mysqltest_1@localhost grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option; grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option; ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'my_%' diff --git a/mysql-test/r/grant_cache.result b/mysql-test/r/grant_cache.result index fc4073d23b1..48068c0f68d 100644 --- a/mysql-test/r/grant_cache.result +++ b/mysql-test/r/grant_cache.result @@ -2,6 +2,12 @@ drop table if exists test.t1,mysqltest.t1,mysqltest.t2; drop database if exists mysqltest; reset query cache; flush status; +show grants for current_user; +Grants for root@localhost +GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +show grants; +Grants for root@localhost +GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION create database if not exists mysqltest; create table mysqltest.t1 (a int,b int,c int); create table mysqltest.t2 (a int,b int,c int); @@ -41,6 +47,10 @@ grant SELECT on mysqltest.* to mysqltest_1@localhost; grant SELECT on mysqltest.t1 to mysqltest_2@localhost; grant SELECT on test.t1 to mysqltest_2@localhost; grant SELECT(a) on mysqltest.t1 to mysqltest_3@localhost; +show grants for current_user(); +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 6 @@ -101,6 +111,9 @@ Qcache_hits 3 show status like "Qcache_not_cached"; Variable_name Value Qcache_not_cached 1 +show grants for current_user(); +Grants for @localhost +GRANT USAGE ON *.* TO ''@'localhost' select "user2"; user2 user2 @@ -158,6 +171,10 @@ Qcache_not_cached 7 select "user4"; user4 user4 +show grants; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' select a from t1; ERROR 3D000: No Database Selected select * from mysqltest.t1,test.t1; diff --git a/mysql-test/r/have_debug.require b/mysql-test/r/have_debug.require deleted file mode 100644 index 3ef51a3a6db..00000000000 --- a/mysql-test/r/have_debug.require +++ /dev/null @@ -1,2 +0,0 @@ -instr(version(),convert('debug' using utf8))!=0; -1 \ No newline at end of file diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result index 737d49fc340..c29d52ffffc 100644 --- a/mysql-test/r/lowercase_table2.result +++ b/mysql-test/r/lowercase_table2.result @@ -13,7 +13,7 @@ SHOW CREATE TABLE T1; Table Create Table T1 CREATE TABLE `T1` ( `a` int(11) default NULL -) TYPE=MyISAM +) ENGINE=MyISAM DEFAULT CHARSET=latin1 RENAME TABLE T1 TO T2; SHOW TABLES LIKE "T2"; Tables_in_test (T2) @@ -68,7 +68,7 @@ SHOW CREATE TABLE T1; Table Create Table T1 CREATE TABLE `T1` ( `a` int(11) default NULL -) TYPE=InnoDB +) ENGINE=InnoDB DEFAULT CHARSET=latin RENAME TABLE T1 TO T2; SHOW TABLES LIKE "T2"; Tables_in_test (T2) diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result index 59914447087..80a01a0ca90 100644 --- a/mysql-test/r/metadata.result +++ b/mysql-test/r/metadata.result @@ -1,36 +1,36 @@ drop table if exists t1,t2; select 1, 1.0, -1, "hello", NULL; -Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals -def 1 8 1 1 N 32769 0 -def 1.0 5 3 3 N 32769 1 -def -1 8 1 2 N 32769 0 -def hello 254 5 5 N 1 31 -def NULL 6 0 0 Y 32768 0 +Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr +def 1 8 1 1 N 32769 0 8 +def 1.0 5 3 3 N 32769 1 8 +def -1 8 1 2 N 32769 0 8 +def hello 254 5 5 N 1 31 8 +def NULL 6 0 0 Y 32768 0 8 1 1.0 -1 hello NULL 1 1.0 -1 hello NULL create table t1 (a tinyint, b smallint, c mediumint, d int, e bigint, f float(3,2), g double(4,3), h decimal(5,4), i year, j date, k timestamp, l datetime, m enum('a','b'), n set('a','b'), o char(10)); select * from t1; -Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals -def test t1 t1 a a 1 4 0 Y 32768 0 -def test t1 t1 b b 2 6 0 Y 32768 0 -def test t1 t1 c c 9 9 0 Y 32768 0 -def test t1 t1 d d 3 11 0 Y 32768 0 -def test t1 t1 e e 8 20 0 Y 32768 0 -def test t1 t1 f f 4 3 0 Y 32768 2 -def test t1 t1 g g 5 4 0 Y 32768 3 -def test t1 t1 h h 0 7 0 Y 32768 4 -def test t1 t1 i i 13 4 0 Y 32864 0 -def test t1 t1 j j 10 10 0 Y 0 0 -def test t1 t1 k k 7 19 0 N 1089 0 -def test t1 t1 l l 12 19 0 Y 0 0 -def test t1 t1 m m 254 1 0 Y 256 0 -def test t1 t1 n n 254 3 0 Y 2048 0 -def test t1 t1 o o 254 10 0 Y 0 0 +Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr +def test t1 t1 a a 1 4 0 Y 32768 0 63 +def test t1 t1 b b 2 6 0 Y 32768 0 63 +def test t1 t1 c c 9 9 0 Y 32768 0 63 +def test t1 t1 d d 3 11 0 Y 32768 0 63 +def test t1 t1 e e 8 20 0 Y 32768 0 63 +def test t1 t1 f f 4 3 0 Y 32768 2 63 +def test t1 t1 g g 5 4 0 Y 32768 3 63 +def test t1 t1 h h 0 7 0 Y 32768 4 63 +def test t1 t1 i i 13 4 0 Y 32864 0 63 +def test t1 t1 j j 10 10 0 Y 128 0 63 +def test t1 t1 k k 7 19 0 N 1217 0 63 +def test t1 t1 l l 12 19 0 Y 128 0 63 +def test t1 t1 m m 254 1 0 Y 256 0 8 +def test t1 t1 n n 254 3 0 Y 2048 0 8 +def test t1 t1 o o 254 10 0 Y 0 0 8 a b c d e f g h i j k l m n o select a b, b c from t1 as t2; -Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals -def test t1 t2 a b 1 4 0 Y 32768 0 -def test t1 t2 b c 2 6 0 Y 32768 0 +Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr +def test t1 t2 a b 1 4 0 Y 32768 0 63 +def test t1 t2 b c 2 6 0 Y 32768 0 63 b c drop table t1; CREATE TABLE t1 (id tinyint(3) default NULL, data varchar(255) default NULL); @@ -38,24 +38,24 @@ INSERT INTO t1 VALUES (1,'male'),(2,'female'); CREATE TABLE t2 (id tinyint(3) unsigned default NULL, data char(3) default '0'); INSERT INTO t2 VALUES (1,'yes'),(2,'no'); select t1.id, t1.data, t2.data from t1, t2 where t1.id = t2.id; -Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals -def test t1 t1 id id 1 3 1 Y 32768 0 -def test t1 t1 data data 253 255 6 Y 0 0 -def test t2 t2 data data 254 3 3 Y 0 0 +Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr +def test t1 t1 id id 1 3 1 Y 32768 0 63 +def test t1 t1 data data 253 255 6 Y 0 0 8 +def test t2 t2 data data 254 3 3 Y 0 0 8 id data data 1 male yes 2 female no select t1.id, t1.data, t2.data from t1, t2 where t1.id = t2.id order by t1.id; -Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals -def test t1 t1 id id 1 3 1 Y 32768 0 -def test t1 t1 data data 253 255 6 Y 0 0 -def test t2 t2 data data 254 3 3 Y 0 0 +Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr +def test t1 t1 id id 1 3 1 Y 32768 0 63 +def test t1 t1 data data 253 255 6 Y 0 0 8 +def test t2 t2 data data 254 3 3 Y 0 0 8 id data data 1 male yes 2 female no select t1.id from t1 union select t2.id from t2; -Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals -def test t1 t1 id id 1 3 1 Y 32768 0 +Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr +def test t1 t1 id id 1 3 1 Y 32768 0 63 id 1 2 diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 5a5eb025353..b54d4b5a342 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -362,3 +362,41 @@ t1 HEAP Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL t2 HEAP Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL t3 HEAP Fixed 0 9 # # # 9 NULL NULL NULL NULL latin1_swedish_ci NULL drop table t1, t2, t3; +create database test_$1; +show create database test_$1; +Database Create Database +test_$1 CREATE DATABASE `test_$1` /*!40100 DEFAULT CHARACTER SET latin1 */ +create table test_$1.t1(a int); +insert into test_$1.t1 values(1); +grant select on `test_$1`.* to mysqltest_1@localhost; +grant usage on `test_$1`.* to mysqltest_2@localhost; +grant drop on `test_$1`.* to mysqltest_3@localhost; +select * from t1; +a +1 +show create database test_$1; +Database Create Database +test_$1 CREATE DATABASE `test_$1` /*!40100 DEFAULT CHARACTER SET latin1 */ +drop table t1; +ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'test_$1' +drop database test_$1; +ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'test_$1' +select * from test_$1.t1; +ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' +show create database test_$1; +ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' +drop table test_$1.t1; +ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' +drop database test_$1; +ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' +select * from test_$1.t1; +ERROR 42000: Access denied for user: 'mysqltest_3'@'localhost' to database 'test_$1' +show create database test_$1; +ERROR 42000: Access denied for user: 'mysqltest_3'@'localhost' to database 'test_$1' +drop table test_$1.t1; +drop database test_$1; +delete from mysql.user +where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; +delete from mysql.db +where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; +flush privileges; diff --git a/mysql-test/r/synchronization.result b/mysql-test/r/synchronization.result index 87800939ed9..ad9443c86da 100644 --- a/mysql-test/r/synchronization.result +++ b/mysql-test/r/synchronization.result @@ -1,23 +1,162 @@ -CREATE TABLE t1 (a int); - CREATE TABLE t2 LIKE t1; -ALTER TABLE t1 add key(a); +CREATE TABLE t1 (x1 int); + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` int(11) default NULL + `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1, t2; -CREATE TABLE t1 (a int); - CREATE TABLE t2 LIKE t1; -CREATE TABLE t2 (b int); -let's take a look at result of create .. like : ------------ -ERROR HY000: Can't create/write to file './test/t2.frm' (Errcode: 17) ------------ - +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `b` int(11) default NULL + `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1, t2; +DROP TABLE t2; + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x1 x2 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; + ALTER TABLE t1 CHANGE x2 x1 int; +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `xx` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; +DROP TABLE t1; diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 91d53ce21d0..fbd4624a57c 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -693,7 +693,7 @@ testc show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `dt` char(19) default NULL + `dt` binary(19) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT dt from t2 UNION select sv from t2; @@ -704,7 +704,7 @@ testv show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `dt` char(19) default NULL + `dt` binary(19) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT sc from t2 UNION select sv from t2; @@ -726,7 +726,7 @@ tetetetetest show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `dt` longblob + `dt` blob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT sv from t2 UNION select b from t2; diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index d004c81f14e..9d99a57afe5 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -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(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(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 "c") from t1 group by grp; select grp,group_concat(distinct c order by c) from t1 group by grp; @@ -50,22 +51,12 @@ select grp,group_concat(c order by grp desc) from t1 group by grp order by grp; select grp, group_concat(a separator "")+0 from t1 group by grp; select grp, group_concat(a separator "")+0.0 from t1 group by grp; select grp, ROUND(group_concat(a separator "")) from t1 group by grp; +drop table t1; # Test NULL values -drop table t1; create table t1 (grp int, c char(10)); -insert into t1 values (1,NULL); -insert into t1 values (2,"b"); -insert into t1 values (2,NULL); -insert into t1 values (3,"E"); -insert into t1 values (3,NULL); -insert into t1 values (3,"D"); -insert into t1 values (3,NULL); -insert into t1 values (3,NULL); -insert into t1 values (3,"D"); -insert into t1 values (4,""); -insert into t1 values (5,NULL); +insert into t1 values (1,NULL),(2,"b"),(2,NULL),(3,"E"),(3,NULL),(3,"D"),(3,NULL),(3,NULL),(3,"D"),(4,""),(5,NULL); select grp,group_concat(c order by c) from t1 group by grp; # Test warnings @@ -118,8 +109,12 @@ drop table t2; # check having create table t1 (bar varchar(32)); -insert into t1 values('test'),('test2'); -select * from t1 having group_concat(bar)=''; +insert into t1 values('test1'),('test2'); +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; # ORDER BY fix_fields() @@ -129,4 +124,58 @@ insert into t1 values (0,"a"),(0,"b"),(1,"c"); insert into t2 values (1),(2),(3); select group_concat(a1 order by (t1.a IN (select a0 from t2))) from t1; select group_concat(a1 order by (t1.a)) from t1; -drop table t1, t2; \ No newline at end of file +drop table t1, t2; + +# +# Problem with GROUP BY (Bug #2695) +# + +CREATE TABLE t1 (id1 tinyint(4) NOT NULL, id2 tinyint(4) NOT NULL); +INSERT INTO t1 VALUES (1, 1),(1, 2),(1, 3),(1, 4),(1, 5),(2, 1),(2, 2),(2, 3); +CREATE TABLE t2 (id1 tinyint(4) NOT NULL); +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +SELECT t1.id1, GROUP_CONCAT(t1.id2 ORDER BY t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 AND t1.id1=1 GROUP BY t1.id1; +SELECT t1.id1, GROUP_CONCAT(t1.id2 ORDER BY t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +SELECT t1.id1, GROUP_CONCAT(t1.id2 ORDER BY t1.id2 DESC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +SELECT t1.id1, GROUP_CONCAT(t1.id2 ORDER BY 6-t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; + +# The following failed when it was run twice: +SELECT t1.id1, GROUP_CONCAT(t1.id2,6-t1.id2 ORDER BY 6-t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +SELECT t1.id1, GROUP_CONCAT(t1.id2,6-t1.id2 ORDER BY 6-t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; + +SELECT t1.id1, GROUP_CONCAT(t1.id2,"/",6-t1.id2 ORDER BY 1+0,6-t1.id2,t1.id2 ASC) AS concat_id FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1; +drop table t1,t2; + +# +# Problem with distinct (Bug #3381) +# + +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); +select distinct s1 from t1 order by s2,s1; +select group_concat(distinct s1) from t1; +select group_concat(distinct s1 order by s2) from t1 where s2 < 4; +# The following is wrong and needs to be fixed ASAP +select group_concat(distinct s1 order by s2) from t1; +drop table t1; + +# +# Test with subqueries (Bug #3319) +# + +create table t1 (a int, c int); +insert into t1 values (1, 2), (2, 3), (2, 4), (3, 5); +create table t2 (a int, c int); +insert into t2 values (1, 5), (2, 4), (3, 3), (3,3); +select group_concat(c) from t1; +select group_concat(c order by (select c from t2 where t2.a=t1.a limit 1)) as grp from t1; + +select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a)) as grp from t1; +select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a) desc) as grp from t1; + +# The following returns random results as we are sorting on blob addresses +# select group_concat(c order by (select group_concat(c order by a) from t2 where t2.a=t1.a)) as grp from t1; +# select group_concat(c order by (select group_concat(c) from t2 where a=t1.a)) as grp from t1; + +select a,c,(select group_concat(c order by a) from t2 where a=t1.a) as grp from t1 order by grp; +drop table t1,t2; diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index ce89cbe1b22..2bd4838f934 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -134,7 +134,6 @@ select max(t2.a1) from t1 left outer join t2 on t1.a2=t2.a1 and 1=0 where t2.a1= select max(t1.a2),max(t2.a1) from t1 left outer join t2 on t1.a1=10; drop table t1,t2; - # # Tests to check MIN/MAX query optimization # diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test index 148c4d3da21..1fc1ed78385 100644 --- a/mysql-test/t/grant2.test +++ b/mysql-test/t/grant2.test @@ -15,6 +15,7 @@ grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option; connect (user1,localhost,mysqltest_1,,); connection user1; select current_user(); +select current_user; grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option; --error 1044 grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option; diff --git a/mysql-test/t/grant_cache.test b/mysql-test/t/grant_cache.test index 5ebf621ff40..7806253124e 100644 --- a/mysql-test/t/grant_cache.test +++ b/mysql-test/t/grant_cache.test @@ -12,6 +12,8 @@ reset query cache; flush status; connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock); connection root; +show grants for current_user; +show grants; --disable_warnings create database if not exists mysqltest; --enable_warnings @@ -43,6 +45,7 @@ grant SELECT(a) on mysqltest.t1 to mysqltest_3@localhost; # The following queries should be fetched from cache connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,master.sock); connection user1; +show grants for current_user(); show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; show status like "Qcache_not_cached"; @@ -64,6 +67,10 @@ show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; show status like "Qcache_not_cached"; +connect (unkuser,localhost,,,,$MASTER_MYPORT,master.sock); +connection unkuser; +show grants for current_user(); + # The following queries should be fetched from cache connect (user2,localhost,mysqltest_2,,mysqltest,$MASTER_MYPORT,master.sock); connection user2; @@ -104,6 +111,7 @@ show status like "Qcache_not_cached"; connect (user4,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,master.sock); connection user4; select "user4"; +show grants; --error 1046 select a from t1; # The following query is not cached before (different database) diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 638626a7456..b0307af19bb 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -256,3 +256,51 @@ delete from t3 where a=5; show table status; drop table t1, t2, t3; + +# +# Test for bug #3342 SHOW CREATE DATABASE seems to require DROP privilege +# + +create database test_$1; +show create database test_$1; +create table test_$1.t1(a int); +insert into test_$1.t1 values(1); +grant select on `test_$1`.* to mysqltest_1@localhost; +grant usage on `test_$1`.* to mysqltest_2@localhost; +grant drop on `test_$1`.* to mysqltest_3@localhost; + +connect (con1,localhost,mysqltest_1,,test_$1); +connection con1; +select * from t1; +show create database test_$1; +--error 1044 +drop table t1; +--error 1044 +drop database test_$1; + +connect (con2,localhost,mysqltest_2,,test); +connection con2; +--error 1044 +select * from test_$1.t1; +--error 1044 +show create database test_$1; +--error 1044 +drop table test_$1.t1; +--error 1044 +drop database test_$1; + +connect (con3,localhost,mysqltest_3,,test); +connection con3; +--error 1044 +select * from test_$1.t1; +--error 1044 +show create database test_$1; +drop table test_$1.t1; +drop database test_$1; + +connection default; +delete from mysql.user +where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; +delete from mysql.db +where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; +flush privileges; diff --git a/mysql-test/t/synchronization-master.opt b/mysql-test/t/synchronization-master.opt deleted file mode 100644 index 710a0395d55..00000000000 --- a/mysql-test/t/synchronization-master.opt +++ /dev/null @@ -1 +0,0 @@ ---exit-info=2048 \ No newline at end of file diff --git a/mysql-test/t/synchronization.test b/mysql-test/t/synchronization.test index 695e405544a..7bdeaa8a740 100644 --- a/mysql-test/t/synchronization.test +++ b/mysql-test/t/synchronization.test @@ -1,45 +1,33 @@ --- source include/have_crypt.inc - # # Test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table # -connect (con_to_sleep,localhost,lock_controller,,); -connect (con_to_harm_sleeper,localhost,root,,); +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); # locking of source: -connection con_to_sleep; -CREATE TABLE t1 (a int); -send CREATE TABLE t2 LIKE t1; -connection con_to_harm_sleeper; -sleep 1; -ALTER TABLE t1 add key(a); - -connection con_to_sleep; -sleep 4; -SHOW CREATE TABLE t2; -drop table t1, t2; - -# locking of destination: -connection con_to_sleep; -CREATE TABLE t1 (a int); -send CREATE TABLE t2 LIKE t1; - -connection con_to_harm_sleeper; -sleep 1; -CREATE TABLE t2 (b int); -disable_query_log; -select "-----------" as "let's take a look at result of create .. like : "; -enable_query_log; - -connection con_to_sleep; -sleep 1; ---error 1 -reap; -disable_query_log; -select "" as "-----------"; -enable_query_log; -SHOW CREATE TABLE t2; - -drop table t1, t2; \ No newline at end of file +CREATE TABLE t1 (x1 int); +let $1= 10; +while ($1) +{ + connection con1; + send ALTER TABLE t1 CHANGE x1 x2 int; + connection con2; + CREATE TABLE t2 LIKE t1; + replace_result x1 xx x2 xx; + SHOW CREATE TABLE t2; + DROP TABLE t2; + connection con1; + reap; + send ALTER TABLE t1 CHANGE x2 x1 int; + connection con2; + CREATE TABLE t2 LIKE t1; + replace_result x1 xx x2 xx; + SHOW CREATE TABLE t2; + DROP TABLE t2; + connection con1; + reap; + dec $1; +} +DROP TABLE t1; diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 3165a01362c..a4f2b18fda8 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -4,12 +4,12 @@ use Getopt::Long; use POSIX qw(strftime); $|=1; -$VER="2.5"; +$VER="2.6"; $opt_config_file = undef(); $opt_example = 0; $opt_help = 0; -$opt_log = "/tmp/mysqld_multi.log"; +$opt_log = ""; $opt_mysqladmin = "@bindir@/mysqladmin"; $opt_mysqld = "@libexecdir@/mysqld"; $opt_no_log = 0; @@ -18,6 +18,9 @@ $opt_tcp_ip = 0; $opt_user = "root"; $opt_version = 0; +my $my_print_defaults_exists= 1; +my $logdir= undef(); + my ($mysqld, $mysqladmin, $groupids, $homedir, $my_progname); $homedir = $ENV{HOME}; @@ -42,7 +45,9 @@ sub main print "Please make sure you have this command available and\n"; print "in your path. The command is available from the latest\n"; print "MySQL distribution.\n"; + $my_print_defaults_exists= 0; } + init_log(); my @defops = `my_print_defaults mysqld_multi`; chop @defops; splice @ARGV, 0, 0, @defops; @@ -112,6 +117,56 @@ sub main } } +#### +#### Init log file. Check for appropriate place for log file, in the following +#### order my_print_defaults mysqld datadir, @datadir@, /var/log, /tmp +#### + +sub init_log +{ + if ($my_print_defaults_exists) + { + @mysqld_opts= `my_print_defaults mysqld`; + chomp @mysqld_opts; + foreach my $opt (@mysqld_opts) + { + if ($opt =~ m/^\-\-datadir[=](.*)/) + { + if (-d "$1" && -w "$1") + { + $logdir= $1; + } + } + } + } + if (!defined($logdir)) + { + $logdir= "@datadir@" if (-d "@datadir@" && -w "@datadir@"); + } + if (!defined($logdir)) + { + $logdir= "/var/log" if (-d "/var/log" && -w "/var/log"); + } + if (!defined($logdir)) + { + if (-d "/tmp" && -w "/tmp" && ! -e "/tmp/mysqld_multi.log") + { + $logdir= "/tmp"; + } + } + if (!defined($logdir)) + { + # We still couldn't get a default log file in place. Log file + # will be disabled unless user sets it with an option + + $opt_no_log= 1; + } + else + { + $opt_log= "$logdir/mysqld_multi.log"; + } +} + #### #### Report living and not running MySQL servers #### diff --git a/sql-bench/limits/mysql-4.0.cfg b/sql-bench/limits/mysql-4.0.cfg new file mode 100644 index 00000000000..feaa79e43e9 --- /dev/null +++ b/sql-bench/limits/mysql-4.0.cfg @@ -0,0 +1,7050 @@ +#This file is automaticly generated by crash-me 1.61 + +NEG=yes # update of column= -column + ###< create table crash_q (a integer) + ###> OK + ###< insert into crash_q values(10) + ###> OK + ###< update crash_q set a=-a + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +Need_cast_for_null=no # Need to cast NULL for arithmetic + ### Check if numeric_null (NULL) is 'NULL' +alter_add_col=yes # Alter table add column + ###< alter table crash_q add d integer + ###> OK + ### + ###As far as all queries returned OK, result is YES +alter_add_constraint=yes # Alter table add constraint + ###< alter table crash_q add constraint c2 check(a > b) + ###> OK + ### + ###As far as all queries returned OK, result is YES +alter_add_foreign_key=no # Alter table add foreign key + ###< alter table crash_q add constraint f1 foreign key(c1) + ###> 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 + ###< references crash_q1(c1) + ###> 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 'references crash_q1(c1)' at line 1 + ### + ###As far as some queries didnt return OK, result is NO +alter_add_multi_col=yes # Alter table add many columns + ###< alter table crash_q add (f integer,g integer) + ###> OK +alter_add_primary_key=with constraint # Alter table add primary key + ###< alter table crash_q1 add constraint p1 primary key(c1) + ###> OK +alter_add_unique=yes # Alter table add unique + ###< alter table crash_q add constraint u1 unique(c1) + ###> OK + ### + ###As far as all queries returned OK, result is YES +alter_alter_col=yes # Alter table alter column default + ###< alter table crash_q alter b set default 10 + ###> OK + ### + ###As far as all queries returned OK, result is YES +alter_change_col=yes # Alter table change column + ###< alter table crash_q change a e char(50) + ###> OK + ### + ###As far as all queries returned OK, result is YES +alter_drop_col=yes # Alter table drop column + ###< alter table crash_q drop column b + ###> OK +alter_drop_constraint=no # Alter table drop constraint + ###< alter table crash_q drop constraint c2 + ###> 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 c2' at line 1 + ### + ###< alter table crash_q drop constraint c2 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 c2 restrict' at line 1 +alter_drop_foreign_key=with drop foreign key # Alter table drop foreign key + ###< alter table crash_q drop constraint f1 + ###> 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 f1' at line 1 + ### + ###< alter table crash_q drop constraint f1 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 f1 restrict' at line 1 + ### + ###< alter table crash_q drop foreign key f1 + ###> OK +alter_drop_primary_key=drop primary key # Alter table drop primary key + ###< alter table crash_q1 drop constraint p1 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 p1 restrict' at line 1 + ### + ###< alter table crash_q1 drop primary key + ###> OK +alter_drop_unique=with drop key # Alter table drop unique + ###< alter table crash_q drop constraint u1 + ###> 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' at line 1 + ### + ###< 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 + ### + ###< alter table crash_q drop key c1 + ###> OK +alter_modify_col=yes # Alter table modify column + ###< alter table crash_q modify c1 CHAR(20) + ###> OK +alter_rename_table=yes # Alter table rename table + ###< alter table crash_q rename to crash_q1 + ###> OK + ### + ###As far as all queries returned OK, result is YES +atomic_updates=no # atomic updates + ###< create table crash_q (a integer not null,primary key (a)) + ###> OK + ###< insert into crash_q values (2) + ###> OK + ###< insert into crash_q values (3) + ###> OK + ###< insert into crash_q values (1) + ###> OK + ###< update crash_q set a=a+1 + ###> execute error:Duplicate entry '3' for key 1 + ###< drop table crash_q + ###> OK + ### + ###As far as some queries didnt return OK, result is NO +automatic_rowid=_rowid # Automatic row id + ###< create table crash_q (a int not null, primary key(a)) + ###> OK + ###< insert into crash_q values (1) + ###> OK + ###< select _rowid from crash_q + ###> OK + ###< drop table crash_q + ###> OK +binary_numbers=no # binary numbers (0b1001) + ###< select 0b1001 + ###> execute error:Unknown column '0b1001' in 'field list' + ### + ###As far as some queries didnt return OK, result is NO +binary_strings=no # binary strings (b'0110') + ###< select b'0110' + ###> execute error:Unknown column 'b' in 'field list' + ### + ###As far as some queries didnt return OK, result is NO +case_insensitive_strings=yes # Case insensitive compare + ### + ###aa + ###We expected 'a a ' but got 'aa' +column_alias=yes # Column alias + ###< select a as ab from crash_me + ###> OK + ### + ###As far as all queries returned OK, result is YES +columns_in_group_by=+64 # number of columns in group by + ###We are trying (example with N=5): + ###create table crash_q (q1 integer,q2 integer,q3 integer,q4 integer,q5 integer) + ###insert into crash_q values(1,1,1,1,1) + ###insert into crash_q values(1,1,1,1,1) + ###select q1,q2,q3,q4,q5 from crash_q group by q1,q2,q3,q4,q5 +columns_in_order_by=+64 # number of columns in order by + ###We are trying (example with N=5): + ###create table crash_q (q1 integer,q2 integer,q3 integer,q4 integer,q5 integer) + ###insert into crash_q values(1,1,1,1,1) + ###insert into crash_q values(1,1,1,1,1) + ###select * from crash_q order by q1,q2,q3,q4,q5 +comment_#=yes # # as comment + ###< select * from crash_me # Testing of comments + ###> OK + ### + ###As far as all queries returned OK, result is YES +comment_--=yes # -- as comment (ANSI) + ###< select * from crash_me -- Testing of comments + ###> OK + ### + ###As far as all queries returned OK, result is YES +comment_/**/=yes # /* */ as comment + ###< select * from crash_me /* Testing of comments */ + ###> OK + ### + ###As far as all queries returned OK, result is YES +comment_//=no # // as comment + ###< select * from crash_me // Testing of comments + ###> 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 '// Testing of comments' at line 1 + ### + ###As far as some queries didnt return OK, result is NO +compute=no # Compute + ###< select a from crash_me order by a compute sum(a) by 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 'compute sum(a) by a' at line 1 + ### + ###As far as some queries didnt return OK, result is NO +connections=101 # Simultaneous connections (installation default) +constraint_check=syntax only # Column constraints + ###< create table crash_q (a int check (a>0)) + ###> OK + ### + ###< insert into crash_q values(0) + ###> OK + ### + ###< drop table crash_q + ###> OK +constraint_check_named=syntax only # Named constraints + ###< create table crash_q (a int ,b int, constraint abc check (a>b)) + ###> OK + ### + ###< insert into crash_q values(0,0) + ###> OK + ### + ###< drop table crash_q + ###> OK +constraint_check_table=syntax only # Table constraints + ###< create table crash_q (a int ,b int, check (a>b)) + ###> OK + ### + ###< insert into crash_q values(0,0) + ###> OK + ### + ###< drop table crash_q + ###> OK +constraint_null=yes # NULL constraint (SyBase style) + ###< create table crash_q (a int null) + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +crash_me_safe=yes # crash me safe +crash_me_version=1.61 # crash me version +create_default=yes # default value for column + ###< create table crash_q (q integer default 10 not null) + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +create_default_func=no # default value function for column + ###< create table crash_q (q integer not null,q1 integer default (1+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 '(1+1))' at line 1 + ###< drop table crash_q + ###> execute error:Unknown table 'crash_q' + ### + ###As far as some queries didnt return OK, result is NO +create_if_not_exists=yes # create table if not exists + ###< create table crash_q (q integer) + ###> OK + ###< create table if not exists crash_q (q integer) + ###> OK + ### + ###As far as all queries returned OK, result is YES +create_index=yes # create index + ###< create index crash_q on crash_me (a) + ###> OK +create_schema=no # Create SCHEMA + ###< create schema crash_schema create table crash_q (a int) create table crash_q2(b int) + ###> 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 'schema crash_schema create table crash_q (a int) create table c + ###< drop schema crash_schema cascade + ###> 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 'schema crash_schema cascade' at line 1 + ### + ###As far as some queries didnt return OK, result is NO +create_table_select=yes # create table from select + ###< create table crash_q SELECT * from crash_me + ###> OK +cross_join=yes # cross join (same as from a,b) + ###< select crash_me.a from crash_me cross join crash_me3 + ###> OK + ### + ###As far as all queries returned OK, result is YES +date_as_string=yes # String functions on date columns + ###< create table crash_me2 (a date not null) + ###> OK + ###< insert into crash_me2 values ('1998-03-03') + ###> OK + ### + ###0000-00-00 + ###We expected '1963-08-16' but got '0000-00-00' + ### + ###< delete from crash_me_d + ###> OK +date_format_EUR_with_date=error # Supports DATE 'DD.MM.YYYY' (EUR) format + ###< insert into crash_me_d(a) values (DATE '16.08.1963') + ###> OK + ### + ###1963-08-16 + ### + ###< delete from crash_me_d + ###> OK +date_format_ISO_with_date=yes # Supports DATE 'YYYY-MM-DD' (ISO) format + ###< insert into crash_me_d(a) values (DATE '1963-08-16') + ###> OK + ### + ###0000-00-00 + ###We expected '1963-08-16' but got '0000-00-00' + ### + ###< delete from crash_me_d + ###> OK +date_format_USA_with_date=error # Supports DATE 'MM/DD/YYYY' format + ###< insert into crash_me_d(a) values (DATE '08/16/1963') + ###> OK + ### + ###1963-08-16 + ### + ###< delete from crash_me_d + ###> OK +date_format_YYYYMMDD_with_date=yes # Supports DATE 'YYYYMMDD' format + ###< insert into crash_me_d(a) values (DATE '19630816') + ###> OK + ### + ###0000-00-00 + ###We expected 'infinity' but got '0000-00-00' + ### + ###< drop table crash_me2 + ###> OK +date_last=yes # Supports 9999-12-31 dates + ###< create table crash_me2 (a date not null) + ###> OK + ###< insert into crash_me2 values ('9999-12-31') + ###> OK + ### + ###0001-01-01 + ### + ###< drop table crash_me2 + ###> OK +date_with_YY=yes # Supports YY-MM-DD 2000 compilant dates + ###< create table crash_me2 (a date not null) + ###> OK + ###< insert into crash_me2 values ('98-03-03') + ###> OK + ### + ###2010-03-03 + ### + ###< drop table crash_me2 + ###> OK +date_zero=yes # Supports 0000-00-00 dates + ###< create table crash_me2 (a date not null) + ###> OK + ###< insert into crash_me2 values ('0000-00-00') + ###> OK + ### + ###Walker's +drop_if_exists=yes # drop table if exists + ###< create table crash_q (q integer) + ###> OK + ###< drop table if exists crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +drop_index=with 'ON' # drop index + ###< drop index crash_q + ###> 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 + ### + ###< drop index crash_q 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 'from crash_me' at line 1 + ### + ###< drop index crash_q on crash_me + ###> OK +drop_requires_cascade=no # drop table require cascade/restrict + ###< create table crash_me (a integer not null) + ###> OK + ###< drop table crash_me + ###> OK +drop_restrict=yes # drop table with cascade/restrict + ###< create table crash_q (a int) + ###> OK + ###< drop table crash_q restrict + ###> OK + ### + ###As far as all queries returned OK, result is YES +end_colon=yes # allows end ';' + ###< select * from crash_me; + ###> OK + ### + ###As far as all queries returned OK, result is YES +except=no # except + ###< select * from crash_me except 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 + ### + ###As far as some queries didnt return OK, result is NO +except_all=no # except all + ###< select * from crash_me except all 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 'all select * from crash_me3' at line 1 + ### + ###As far as some queries didnt return OK, result is NO +except_all_incompat=no # except all (incompatible lists) + ###< select * from crash_me except all select * from crash_me2 + ###> 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 'all select * from crash_me2' at line 1 + ### + ###As far as some queries didnt return OK, result is NO +except_incompat=no # except (incompatible lists) + ###< select * from crash_me except select * from crash_me2 + ###> 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 +field_name_case=yes # case independent field names + ###< create table crash_q (q integer) + ###> OK + ###< insert into crash_q(Q) values (1) + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +float_int_expr=yes # mixing of integer and float in expression + ###< select 1+1.0 + ###> OK + ### + ###As far as all queries returned OK, result is YES +foreign_key=syntax only # foreign keys + ###< create table crash_me_qf (a integer not null,primary key (a)) + ###> OK + ### + ###< create table crash_me_qf2 (a integer not null,foreign key (a) references crash_me_qf (a)) + ###> OK + ### + ###< insert into crash_me_qf values (1) + ###> OK + ### + ###< insert into crash_me_qf2 values (2) + ###> OK + ### + ###< drop table crash_me_qf2 + ###> OK + ### + ###< drop table crash_me_qf + ###> OK +full_outer_join=no # full outer join + ###< select crash_me.a from crash_me full join crash_me2 ON + ### crash_me.a=crash_me2.a + ###> execute error:Unknown table 'crash_me' in field list + ### + ###As far as some queries didnt return OK, result is NO +func_extra_!=yes # Function NOT as '!' in SELECT + ### + ###3 +func_extra_&=yes # Function & (bitwise and) + ### + ###1 +func_extra_<>=yes # Function <> in SELECT + ### + ###1 +func_extra_add_months=no # Function ADD_MONTHS + ### + ### 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 +func_extra_addtime=no # Function ADDTIME + ### + ### 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â',2)' at line 1 +func_extra_and_or=yes # Function AND and OR in SELECT + ### + ### 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 '(65)' at line 1 +func_extra_ascii_code=no # Function ASCII_CODE + ### + ###97 + ###We expected 'a' but got '97' +func_extra_atn2=no # Function ATN2 + ### + ###a2 +func_extra_auto_string2num=yes # Function automatic string->num convert + ### + ###1 +func_extra_binary_shifts=yes # Function << and >> (bitwise shifts) + ### + ###2 +func_extra_ceil=yes # Function CEIL + ### + ### execute failed:Unknown column 'EUR' in 'field list' +func_extra_charindex=no # Function CHARINDEX + ### + ### 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 '(65)' at line 1 +func_extra_chr_str=no # Function CHR (any type to string) + ### + ###0 + ###We expected 'abcdef' but got '0' +func_extra_concat_list=yes # Function CONCAT(list) + ### + ### 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 '5)' at line 1 +func_extra_cosh=no # Function COSH + ### + ### 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 +func_extra_date_format=yes # Function DATE_FORMAT + ### + ### 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 '(day,3,'1997-11-30') from crash_me_d' at line 1 +func_extra_datediff=no # Function DATEDIFF + ### + ### 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 +func_extra_datename=no # Function DATENAME + ### + ### 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 + ### + ### 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,'S-103',2,'Leopard',3)' at line 1 +func_extra_ebcdic_string=no # Function EBCDIC in string cast + ### + ###TWO +func_extra_encrypt=yes # Function ENCRYPT + ### + ### 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',6)' at line 1 +func_extra_field=yes # Function FIELD + ### + ### 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 '(222.6666,10,2)' at line 1 +func_extra_float=no # Function FLOAT + ### + ###1,234.56 +func_extra_from_days=yes # Function FROM_DAYS + ### + ###1970-01-01 02:00:00 +func_extra_getdate=no # Function GETDATE + ### + ###HARRY +func_extra_hex=yes # Function HEX + ### + ###6 +func_extra_in_num=yes # Function IN on numbers in SELECT + ### + ###1 +func_extra_index=no # Function INDEX + ### + ### 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 '('the soap')' at line 1 +func_extra_instr=yes # Function LOCATE as INSTR + ### + ### 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,2)' at line 1 +func_extra_instrb=no # Function INSTRB + ### + ###5 +func_extra_last_day=no # Function LAST_DAY + ### + ###0 +func_extra_least=yes # Function LEAST + ### + ###1 + ###We expected '2' but got '1' +func_extra_lengthb=no # Function LENGTHB + ### + ### 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','.',6)' at line 1 +func_extra_like=yes # Function LIKE in SELECT + ### + ###1 +func_extra_ln=yes # Function LN + ### + ###2.000000 +func_extra_logn=no # Function LOGN + ### + ###??hi +func_extra_ltrim2arg=no # Function LTRIM (2 arg) + ### + ### 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 +func_extra_maketime=no # Function MAKETIME + ### + ### 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â')' at line 1 +func_extra_mdy=no # Function MDY + ### + ### 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 +func_extra_mid=yes # Function SUBSTRING as MID + ### + ### 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-02-02','1997-01-01') from crash_me_d' at line 1 +func_extra_noround=no # Function NOROUND + ###< select noround(22.6) + ###> 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 + ### + ###0 +func_extra_not_like=yes # Function NOT LIKE in SELECT + ### + ### 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 '('2123')' at line 1 +func_extra_odbc_convert=no # Function ODBC CONVERT + ### + ###70de51425df9d787 +func_extra_paste=no # Function PASTE + ### + ### 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%','crash')' at line 1 +func_extra_period_add=yes # Function PERIOD_ADD + ### + ###13 +func_extra_pow=yes # Function POW + ### + ### 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)' at line 1 +func_extra_regexp=yes # Function REGEXP in SELECT + ### + ### 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_replicate=no # Function REPLICATE + ### + ###dcba +func_extra_rfill3arg=no # Function RFILL (3 arg) + ### + ### 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 '(4)' at line 1 +func_extra_round1=yes # Function ROUND(1 arg) + ### + ###hi?? +func_extra_rpad4arg=no # Function RPAD (4 arg) + ### + ### 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_sec_to_time=yes # Function SEC_TO_TIME + ### + ### 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_str=no # Function STR + ### + ###-1 +func_extra_stuff=no # Function STUFF + ### + ### 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 +func_extra_substr2arg=no # Function SUBSTR (2 arg) + ### + ### 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 +func_extra_substrb=no # Function SUBSTRB + ### + ###tcx.se +func_extra_subtime=no # Function SUBTIME + ### + ###2003-08-27 19:55:21 +func_extra_tail=no # Function TAIL + ### + ### 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 + ### + ###5001 +func_extra_timediff=no # Function TIMEDIFF + ### + ### 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 +func_extra_to_days=yes # Function TO_DAYS + ### + ### 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','bc','de')' at line 1 +func_extra_trim1arg=yes # Function TRIM (1 arg) + ### + ### 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_trim_many_char=error # Function TRIM; Many char extension + ### + ###abc +func_extra_trunc=no # Function TRUNC + ### + ### 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 '(222.6)' at line 1 +func_extra_uid=no # Function UID + ### + ###1062003321 +func_extra_userenv=no # Function USERENV + ### + ### 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 '(NULL,'WALRUS')' at line 1 +func_extra_version=yes # Function VERSION + ### + ###5 +func_extra_weekofyear=no # Function WEEKOFYEAR + ### + ###3 +func_extra_||=yes # Function OR as '||' + ### + ### 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 '~* 'HI'' at line 1 +func_odbc_abs=yes # Function ABS + ### + ###1.570796 +func_odbc_ascii=yes # Function ASCII + ### + ###1.570796 +func_odbc_atan=yes # Function ATAN + ### + ###1.570796 +func_odbc_ceiling=yes # Function CEILING + ### + ###A +func_odbc_concat=yes # Function CONCAT(2 arg) + ### + ###1.000000 +func_odbc_cot=yes # Function COT + ### + ###2003-08-27 +func_odbc_curtime=yes # Function CURTIME + ### + ###test +func_odbc_dayname=yes # Function DAYNAME + ###< insert into crash_me_d values('1997-02-01') + ### + ###1 +func_odbc_dayofweek=yes # Function DAYOFWEEK + ###< insert into crash_me_d values('1997-02-01') + ### + ###32 +func_odbc_degrees=yes # Function DEGREES + ### + ### 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','abe')' at line 1 + ### + ###2.718282 +func_odbc_floor=yes # Function FLOOR + ### + ###c +func_odbc_hour=yes # Function HOUR + ###< insert into crash_me_t values(20:08:16) + ### + ###12 +func_odbc_ifnull=yes # Function IFNULL + ### + ###aefd +func_odbc_lcase=yes # Function LCASE + ### + ###ab +func_odbc_length=yes # Function REAL LENGTH + ### + ###5 + ###We expected '4' but got '5' + ### + ###2 +func_odbc_locate_3=yes # Function LOCATE(3 arg) + ### + ###0.693147 +func_odbc_log10=yes # Function LOG10 + ### + ###abcd +func_odbc_minute=yes # Function MINUTE + ###< insert into crash_me_t values(20:08:16) + ### + ###4 +func_odbc_month=yes # Function MONTH + ###< insert into crash_me_d values('1997-02-01') + ### + ###February +func_odbc_now=yes # Function NOW + ### + ###3.141593 +func_odbc_power=yes # Function POWER + ### + ###1 +func_odbc_radians=yes # Function RADIANS + ### + ###0.40540353712198 +func_odbc_repeat=yes # Function REPEAT + ### + ###bababa +func_odbc_right=yes # Function RIGHT + ### + ###5.63 +func_odbc_rtrim=yes # Function RTRIM + ### + ###14 +func_odbc_sign=yes # Function SIGN + ### + ###0.841471 +func_odbc_soundex=yes # Function SOUNDEX + ### + ### +func_odbc_sqrt=yes # Function SQRT + ### + ###cd +func_odbc_tan=yes # Function TAN + ### + ### 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 '(SQL_TSI_SECOND,1,'1997-01-01 00:00:00')' 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 '(SQL_TSI_SECOND,'1997-01-01 00:00:02', '1997-01-01 00:00:01')' + ### + ###10 +func_odbc_ucase=yes # Function UCASE + ### + ###monty@localhost +func_odbc_week=USA # WEEK + ###1997 +func_sql_+=yes # Function +, -, * and / + ### + ###24 +func_sql_cast=yes # Function CAST + ### + ###1 + ###We expected '10' but got '1' +func_sql_char_length(constant)=yes # Function CHAR_LENGTH(constant) + ### + ###4 +func_sql_coalesce=yes # Function COALESCE + ### + ###0 + ###We expected 'abcdef' but got '0' +func_sql_current_date=yes # Function CURRENT_DATE + ### + ###19:55:21 +func_sql_current_timestamp=yes # Function CURRENT_TIMESTAMP + ### + ###43 +func_sql_localtime=yes # Function LOCALTIME + ### + ###2003-08-27 19:55:21 +func_sql_lower=yes # Function LOWER + ### + ### +func_sql_nullif_string=yes # Function NULLIF with strings + ### + ###3 +func_sql_position=yes # Function POSITION + ### + ### 2 then 'false' when 2 > 1 then 'true' end + ###>true +func_sql_session_user=with_parenthesis # SESSION_USER + ###< select SESSION_USER + ###> execute error:Unknown column 'SESSION_USER' in 'field list' + ### + ###< select SESSION_USER() + ###> OK +func_sql_simple_case=yes # Function simple CASE + ### + ###bc +func_sql_system_user=with_parenthesis # SYSTEM_USER + ###< select SYSTEM_USER + ###> execute error:Unknown column 'SYSTEM_USER' in 'field list' + ### + ###< select SYSTEM_USER() + ###> OK +func_sql_trim=yes # Function TRIM + ### + ###ABC +func_sql_user=with_parenthesis # USER + ###< select USER + ###> execute error:Unknown column 'USER' in 'field list' + ### + ###< select USER() + ###> OK +func_where_between=yes # Function BETWEEN + ### + ### 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 +func_where_eq_any=no # Function = ANY + ### + ### 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 +func_where_exists=no # Function EXISTS + ### + ###1 +func_where_like=yes # Function LIKE + ### + ###1 +func_where_match=no # Function MATCH + ### + ### 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 'match unique (select a from crash_me)' at line 1 +func_where_matches=no # Function MATCHES + ### + ###1 +func_where_not_exists=no # Function NOT EXISTS + ### + ###1 +func_where_not_unique=no # Function NOT UNIQUE + ### + ### 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 'unique (select * from crash_me)' at line 1 +functions=yes # Functions + ###< select 1+1 + ###> OK + ### + ###As far as all queries returned OK, result is YES +group_by=yes # Group by + ###< select a from crash_me group by a + ###> OK + ### + ###As far as all queries returned OK, result is YES +group_by_alias=yes # Group by alias + ###< select a as ab from crash_me group by ab + ###> OK + ### + ###As far as all queries returned OK, result is YES +group_by_null=yes # Group on column with null values + ###< create table crash_q (s char(10)) + ###> OK + ###< insert into crash_q values(null) + ###> OK + ###< insert into crash_q values(null) + ###> OK + ### + ###1 +group_func_extra_bit_or=yes # Group function BIT_OR + ### + ###1 +group_func_extra_std=yes # Group function STD + ### + ###0.0000 +group_func_extra_variance=no # Group function VARIANCE + ### + ### 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 +group_func_sql_avg=yes # Group function AVG + ### + ###1 +group_func_sql_count_column=yes # Group function COUNT column name + ### + ###1 +group_func_sql_every=no # Group function EVERY + ### + ###1 +group_func_sql_max_str=yes # Group function MAX on strings + ### + ###1 +group_func_sql_min_str=yes # Group function MIN on strings + ### + ### 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 +group_func_sql_sum=yes # Group function SUM + ### + ### 0 + ###>1 + ### + ###a +index_in_create=yes # index in create table + ###< create table crash_q (q integer not null,index (q)) + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +index_namespace=yes # different namespace for index + ###< create index crash_me on crash_me (b) + ###> OK + ###< drop index crash_me on crash_me + ###> OK + ### + ###As far as all queries returned OK, result is YES +index_parts=yes # index on column part (extension) + ###< create index crash_q on crash_me (b(5)) + ###> OK + ###< drop index crash_q on crash_me + ###> OK + ### + ###As far as all queries returned OK, result is YES +inner_join=yes # inner join + ###< select crash_me.a from crash_me inner join crash_me2 ON crash_me.a=crash_me2.a + ###> OK + ### + ###As far as all queries returned OK, result is YES +insert_default_values=no # INSERT DEFAULT VALUES + ###< create table crash_me_q (a int) + ###> OK + ###< insert into crash_me_q DEFAULT VALUES + ###> 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 'DEFAULT VALUES' at line 1 + ###< drop table crash_me_q + ###> OK + ### + ###As far as some queries didnt return OK, result is NO +insert_empty_string=yes # insert empty string + ###< create table crash_q (a char(10) not null,b char(10)) + ###> OK + ###< insert into crash_q values ('','') + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +insert_multi_value=yes # INSERT with Value lists + ###< create table crash_q (s char(10)) + ###> OK + ###< insert into crash_q values ('a'),('b') + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +insert_select=yes # insert INTO ... SELECT ... + ###< create table crash_q (a int) + ###> OK + ###< insert into crash_q (a) SELECT crash_me.a from crash_me + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +insert_with_default=yes # INSERT with DEFAULT + ###< create table crash_me_q (a int) + ###> OK + ###< insert into crash_me_q (a) values (DEFAULT) + ###> OK + ###< drop table crash_me_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +insert_with_empty_value_list=no # INSERT with empty value list + ###< create table crash_me_q (a int) + ###> OK + ###< insert into crash_me_q (a) values () + ###> execute error:Column count doesn't match value count at row 1 + ###< drop table crash_me_q + ###> OK + ### + ###As far as some queries didnt return OK, result is NO +insert_with_set=yes # INSERT with set syntax + ###< create table crash_q (a integer) + ###> OK + ###< insert into crash_q SET a=1 + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +intersect=no # intersect + ###< select * from crash_me intersect 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 + ### + ###As far as some queries didnt return OK, result is NO +intersect_all=no # intersect all + ###< select * from crash_me intersect all 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 'all select * from crash_me3' at line 1 + ### + ###As far as some queries didnt return OK, result is NO +intersect_all_incompat=no # intersect all (incompatible lists) + ###< select * from crash_me intersect all select * from crash_me2 + ###> 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 'all select * from crash_me2' at line 1 + ### + ###As far as some queries didnt return OK, result is NO +intersect_incompat=no # intersect (incompatible lists) + ###< select * from crash_me intersect select * from crash_me2 + ###> 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 +join_tables=31 # tables in join + ###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 + ### 32:FAIL 7:OK 19:OK 25:OK 28:OK 30:OK 31:FAIL +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 + ###> OK + ### + ###As far as all queries returned OK, result is YES +left_outer_join_using=yes # left outer join using + ###< select c1 from crash_me left join crash_me2 using (a) + ###> OK + ### + ###As far as all queries returned OK, result is YES +length_of_varchar_field=actual length # CHARACTER_LENGTH(varchar_field) + ###< CREATE TABLE crash_me1 (S1 VARCHAR(100)) + ###> OK + ###< INSERT INTO crash_me1 VALUES ('X') + ###> OK + ### + ###< SELECT CHARACTER_LENGTH(S1) FROM crash_me1 + ### > 1 + ###< drop table crash_me1 + ###> OK +like_with_column=yes # column LIKE column + ###< create table crash_q (a char(10),b char(10)) + ###> OK + ###< insert into crash_q values('abc','abc') + ###> OK + ###< select * from crash_q where a like b + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +like_with_number=yes # LIKE on numbers + ###< create table crash_q (a int,b int) + ###> OK + ###< insert into crash_q values(10,10) + ###> OK + ###< select * from crash_q where a like '10' + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +lock_tables=yes # lock table + ###< lock table crash_me READ + ###> OK + ###< unlock tables + ###> OK + ### + ###As far as all queries returned OK, result is YES +logical_value=1 # Value of logical operation (1=1) + ###2 +multi_drop=yes # many tables to drop table + ###< create table crash_q (a int) + ###> OK + ###< create table crash_q2 (a int) + ###> OK + ###< drop table crash_q,crash_q2 + ###> OK + ### + ###As far as all queries returned OK, result is YES +multi_null_in_unique=yes # null in unique index + ###< create table crash_q (q integer, x integer,unique (q)) + ###> OK + ###< insert into crash_q(x) values(1) + ###> OK + ###< insert into crash_q(x) values(2) + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +multi_strings=yes # Multiple line strings + ### + ###a + ### + ###< drop table crash_q + ###> OK +natural_join=yes # natural join + ###< select * from crash_me natural join crash_me3 + ###> OK + ### + ###As far as all queries returned OK, result is YES +natural_join_incompat=yes # natural join (incompatible lists) + ###< select c1 from crash_me natural join crash_me2 + ###> OK + ### + ###As far as all queries returned OK, result is YES +natural_left_outer_join=yes # natural left outer join + ###< select c1 from crash_me natural left join crash_me2 + ###> OK + ### + ###As far as all queries returned OK, result is YES +no_primary_key=yes # Tables without primary key + ###< create table crash_me (a integer not null,b char(10) not null) + ###> OK + ###< insert into crash_me (a,b) values (1,'a') + ###> OK +not_id_between=no # NOT ID BETWEEN interprets as ID NOT BETWEEN + ###< create table crash_me_b (i int) + ###> OK + ###< insert into crash_me_b values(2) + ###> OK + ###< insert into crash_me_b values(5) + ###> OK + ### + ### +null_in_index=yes # null in index + ###< create table crash_q (a char(10),index (a)) + ###> OK + ###< insert into crash_q values (NULL) + ###> OK + ### + ### +nulls_in_unique=yes # null combination in unique index + ###< create table crash_q (q integer,q1 integer,unique (q,q1)) + ###> OK + ###< insert into crash_q (q,q1) values(1,NULL) + ###> OK + ###< insert into crash_q (q,q1) values(1,NULL) + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +odbc_left_outer_join=yes # left outer join odbc style + ###< select crash_me.a from { oj crash_me left outer join crash_me2 ON crash_me.a=crash_me2.a } + ###> OK + ### + ###As far as all queries returned OK, result is YES +operating_system=Linux 2.4.20-64GB-SMP i686 # crash-me tested on +order_by=yes # Order by + ###< select a from crash_me order by a + ###> OK + ### + ###As far as all queries returned OK, result is YES +order_by_alias=yes # Order by alias + ###< select a as ab from crash_me order by ab + ###> OK + ### + ###As far as all queries returned OK, result is YES +order_by_function=yes # Order by function + ###< select a from crash_me order by a+1 + ###> OK + ### + ###As far as all queries returned OK, result is YES +order_by_position=yes # Order by position + ###< select a from crash_me order by 1 + ###> OK + ### + ###As far as all queries returned OK, result is YES +order_on_unused=yes # Order by on unused column + ###< select b from crash_me order by a + ###> OK + ### + ###As far as all queries returned OK, result is YES +position_of_null=first # Where is null values in sorted recordset + ###< insert into crash_me_n (i) values(1) + ###> OK + ###< insert into crash_me_n values(2,2) + ###> OK + ###< insert into crash_me_n values(3,3) + ###> OK + ###< insert into crash_me_n values(4,4) + ###> OK + ###< insert into crash_me_n (i) values(5) + ###> OK + ### + ###< select r from crash_me_n order by r + ###> + ###> + ###> 2 + ###> 3 + ###> 4 +position_of_null_desc=last # Where is null values in sorted recordset (DESC) + ###< select r from crash_me_n order by r desc + ###> 4 + ###> 3 + ###> 2 + ###> + ###> +primary_key_in_create=yes # primary key in create table + ###< create table crash_q (q integer not null,primary key (q)) + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +psm_functions=no # PSM functions (ANSI SQL) + ###< create table crash_q (a int) + ###> OK + ###< create function crash_func(in a1 int, in b1 int) returns int language sql deterministic contains sql begin return a1 * b1; end + ###> 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 '(in a1 int, in b1 int) returns int language sql deterministic c + ###< insert into crash_q values(crash_func(2,4)) + ###> 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 '(2,4))' at line 1 + ###< select a,crash_func(a,2) from crash_q + ###> 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 '(a,2) from crash_q' at line 1 + ###< drop function crash_func cascade + ###> 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 'cascade' at line 1 + ###< drop table crash_q + ###> OK + ### + ###As far as some queries didnt return OK, result is NO +psm_modules=no # PSM modules (ANSI SQL) + ###< create table crash_q (a int,b int) + ###> OK + ###< create module crash_m declare procedure crash_proc(in a1 int, in b1 int) language sql modifies sql data begin declare c1 int; set c1 = a1 + b1; insert into crash_q(a,b) values (a1,c1); end; declare procedure crash_proc2(INOUT a int, in b int) contains sql set a = b + 10; end module + ###> 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 'module crash_m declare procedure crash_proc(in a1 int, in b1 in + ###< call crash_proc(1,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 'call crash_proc(1,10)' at line 1 + ###< drop module crash_m cascade + ###> 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 'module crash_m cascade' at line 1 + ###< drop table crash_q cascade + ###> OK + ### + ###As far as some queries didnt return OK, result is NO +psm_procedures=no # PSM procedures (ANSI SQL) + ###< create table crash_q (a int,b int) + ###> OK + ###< create procedure crash_proc(in a1 int, in b1 int) language sql modifies sql data begin declare c1 int; set c1 = a1 + b1; insert into crash_q(a,b) values (a1,c1); end + ###> 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 'procedure crash_proc(in a1 int, in b1 int) language sql modifie + ###< call crash_proc(1,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 'call crash_proc(1,10)' at line 1 + ###< drop procedure crash_proc + ###> 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 'procedure crash_proc' at line 1 + ###< drop table crash_q + ###> OK + ### + ###As far as some queries didnt return OK, result is NO +psm_trigger=no # Triggers (ANSI SQL) + ###< create table crash_q (a int ,b int) + ###> OK + ###< create trigger crash_trigger after insert on crash_q referencing new table as new_a when (localtime > time '18:00:00') begin atomic end + ###> 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 'trigger crash_trigger after insert on crash_q referencing new t + ###< insert into crash_q values(1,2) + ###> OK + ###< drop trigger crash_trigger + ###> 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 'trigger crash_trigger' at line 1 + ###< drop table crash_q + ###> OK + ### + ###As far as some queries didnt return OK, result is NO +query_size=1048574 # query size +quote_ident_with_"=error # " as identifier quote (ANSI SQL) + ### + ### 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] from crash_me' at line 1 +quote_ident_with_`=yes # ` as identifier quote + ### + ###hello + ###We expected 'hello ' but got 'hello' + ### + ###< drop table crash_q + ###> OK +remember_end_space_varchar=no # Remembers end space in varchar() + ###< create table crash_q (a varchar(10)) + ###> OK + ###< insert into crash_q values('hello ') + ###> OK + ### + ###0 + ###We expected '1' but got '0' +select_constants=yes # Select constants + ###< select 1 + ###> OK + ### + ###As far as all queries returned OK, result is YES +select_limit=with LIMIT # LIMIT number of rows + ###< select * from crash_me limit 1 + ###> OK +select_limit2=yes # SELECT with LIMIT #,# + ###< select * from crash_me limit 1,1 + ###> OK + ### + ###As far as all queries returned OK, result is YES +select_limit3=yes # SELECT with LIMIT # OFFSET # + ###< select * from crash_me limit 1 offset 1 + ###> OK + ### + ###As far as all queries returned OK, result is YES +select_string_size=1048565 # constant string size in SELECT + ###We are trying (example with N=5): + ###select 'aaaaa' +select_table_update=no # Update with sub select + ###< create table crash_q (a integer,b char(10)) + ###> OK + ###< insert into crash_q values(1,'c') + ###> OK + ###< 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 + ### + ###< drop table crash_q + ###> OK +select_without_from=yes # SELECT without FROM + ###< select 1 + ###> OK + ### + ###As far as all queries returned OK, result is YES +server_version=MySQL 4.0.15 debug log/ # server version +simple_joins=yes # ANSI SQL simple joins + ###< select crash_me.a from crash_me, crash_me t0 + ###> OK + ### + ###As far as all queries returned OK, result is YES +sorted_group_by=yes # Group by always sorted + ###< create table crash_me_t1 (a int not null, b int not null) + ###> OK + ###< insert into crash_me_t1 values (1,1) + ###> OK + ###< insert into crash_me_t1 values (1,2) + ###> OK + ###< insert into crash_me_t1 values (3,1) + ###> OK + ###< insert into crash_me_t1 values (3,2) + ###> OK + ###< insert into crash_me_t1 values (2,2) + ###> OK + ###< insert into crash_me_t1 values (2,1) + ###> OK + ###< create table crash_me_t2 (a int not null, b int not null) + ###> OK + ###< create index crash_me_t2_ind on crash_me_t2 (a) + ###> OK + ###< insert into crash_me_t2 values (1,3) + ###> OK + ###< insert into crash_me_t2 values (3,1) + ###> OK + ###< insert into crash_me_t2 values (2,2) + ###> OK + ###< insert into crash_me_t2 values (1,1) + ###> OK + ### + ###< select crash_me_t1.a,crash_me_t2.b from crash_me_t1,crash_me_t2 where crash_me_t1.a=crash_me_t2.a group by crash_me_t1.a,crash_me_t2.b + ### > 1,1 + ### > 1,3 + ### > 2,2 + ### > 3,1 + ### + ### Check recordset: + ### 1,1 expected: 1,1 + ### 1,3 expected: 1,3 + ### 2,2 expected: 2,2 + ### 3,1 expected: 3,1 + ### Recordset corresponds with template + ###< drop table crash_me_t1 + ###> OK + ###< drop table crash_me_t2 + ###> OK +storage_of_float=round # Storage of float values + ###< create table crash_q (q1 float(4,1)) + ###> OK + ###< insert into crash_q values(1.14) + ###> OK + ### + ###1.2 + ###We expected '1.1' but got '1.2' + ### + ###< drop table crash_q + ###> OK + ### + ###< create table crash_q (q1 float(4,1)) + ###> OK + ###< insert into crash_q values(1.14) + ###> OK + ### + ###1.2 + ### + ###< drop table crash_q + ###> OK +subqueries=no # subqueries + ###< 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 + ### + ###As far as some queries didnt return OK, result is NO +table_alias=yes # Table alias + ###< select b.a from crash_me as b + ###> OK + ### + ###As far as all queries returned OK, result is YES +table_name_case=no # case independent table names + ###< create table crash_q (q integer) + ###> OK + ###< drop table CRASH_Q + ###> execute error:Unknown table 'CRASH_Q' + ### + ###As far as some queries didnt return OK, result is NO +table_wildcard=yes # Select table_name.* + ###< select crash_me.* from crash_me + ###> OK + ### + ###As far as all queries returned OK, result is YES +temporary_table=yes # temporary tables + ###< create temporary table crash_q (q integer not null) + ###> OK + ###< drop table crash_q + ###> OK + ### + ###As far as all queries returned OK, result is YES +time_format_EUR=error # Supports HH.MM.SS (EUR) time format + ###< insert into crash_me_t(a) values ('20.08.16') + ###> OK + ### + ###20:08:16 + ### + ###< delete from crash_me_t + ###> OK +time_format_ISO=yes # Supports HH:MM:SS (ISO) time format + ###< insert into crash_me_t(a) values ('20:08:16') + ###> OK + ### + ###08:08:16 + ###We expected '20:08:16' but got '08:08:16' + ### + ###< delete from crash_me_t + ###> OK +time_format_inresult=iso # Time format in result + ###< insert into crash_me_t values(CURRENT_TIME) + ###> OK + ### + ###< select a from crash_me_t + ###> 19:55:21 + ###< delete from crash_me_t + ###> OK +transactions=yes # transactions + ### execute failed:Unknown column 'FALSE' in 'field list' +value_of_true=not supported # Value of TRUE + ### 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 ### ### 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 ### ### 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 ### ### 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 ### ### 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 ### ###5 -func_extra_last_day=no # Function LAST_DAY +func_extra_last_day=yes # Function LAST_DAY ### ### 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 ### ### 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 ### ### 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 ### ###1 func_extra_not_between=yes # Function NOT BETWEEN in SELECT ### @@ -879,7 +879,7 @@ func_extra_odbc_convert=no # Function ODBC CONVERT func_extra_password=yes # Function PASSWORD ### ### 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 ### ### 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 -func_extra_substr3arg=no # Function SUBSTR (3 arg) + ###>bcd +func_extra_substr3arg=yes # Function SUBSTR (3 arg) ### ###tcx.se -func_extra_subtime=no # Function SUBTIME +func_extra_subtime=yes # Function SUBTIME ### ###2003-08-27 19:55:21 + ###>2004-04-06 13:49:05 func_extra_tail=no # Function TAIL ### ### 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 ### ### 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 -func_extra_timestamp=no # Function TIMESTAMP + ###>00:00:03 +func_extra_timestamp=error # Function TIMESTAMP ### ###1062003321 + ###>1081248545 func_extra_userenv=no # Function USERENV ### ###5 -func_extra_weekofyear=no # Function WEEKOFYEAR +func_extra_weekofyear=yes # Function WEEKOFYEAR ### ###2003-08-27 + ###>2004-04-06 func_odbc_curtime=yes # Function CURTIME ### ###2003-08-27 19:55:21 + ###>2004-04-06 13:49:04 func_odbc_pi=yes # Function PI ### ###19:55:21 + ###>13:49:04 func_sql_current_timestamp=yes # Function CURRENT_TIMESTAMP ### ###2003-08-27 19:55:21 + ###>2004-04-06 13:49:04 func_sql_localtimestamp=yes # Function LOCALTIMESTAMP ### ###1 -func_where_eq_all=no # Function = ALL +func_where_eq_all=yes # Function = ALL ### ### 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 -func_where_eq_some=no # Function = SOME + ###>1 +func_where_eq_some=yes # Function = SOME ### ### 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 ### ### 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 ### ### 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 ### ### 0 ###>1 @@ -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 ### ###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): ###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 ###< select crash_me.a from crash_me left join crash_me2 ON crash_me.a=crash_me2.a ###> OK @@ -1890,39 +1888,39 @@ logical_value=1 # Value of logical operation (1=1) ###>1 max_big_expressions=10 # big expressions ###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 -max_char_size=255 # max char() size +max_char_size=1048543 # max char() size ###We are trying (example with N=5): ###create table crash_q (q char(5)) ###insert into crash_q values ('aaaaa') ###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 ###We are trying (example with N=5): ###create table crash_q (qaaaaa integer) ###insert into crash_q (qaaaaa) values(1) ###select qaaaaa from crash_q ### 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): ###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 ###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' ### 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): ###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_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): ###create table crash_q (q0 char(5) not null,unique (q0)) ###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 ###We are trying (example with N=5): ###create index crash_qaaaaa on crash_me (a) @@ -1932,6 +1930,7 @@ max_index_part_length=255 # max index part length ###create table crash_q (q char(5) not null,unique(q)) ###insert into crash_q (q) values ('aaaaa') ###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 ###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) @@ -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)) ###insert into crash_q (q) values ('aaaaa') ###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) ###We are trying (example with N=5): ###create table crash_q (q0 char(5) not null) ###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) ###We are trying (example with N=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) max_select_alias_name=+512 # select alias name length ###We are trying (example with N=5): ###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): ###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 ###We are trying (example with N=5): ###select aaaaa.b from crash_me aaaaa @@ -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) ###select q from crash_q ### 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): ###create table crash_q (q varchar(5)) ###insert into crash_q values ('aaaaa') ###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 ###< 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 @@ -2129,7 +2129,7 @@ odbc_left_outer_join=yes # left outer join odbc style ###> OK ### ###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 ###< select a from crash_me order by a ###> OK @@ -2267,6 +2267,9 @@ quote_with_"=yes # Allows ' and " as string markers ###> OK ### ###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() ###< create table crash_q (a char(10)) ###> OK @@ -2300,10 +2303,10 @@ rename_table=yes # rename table ###> OK ### ###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): ###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 ###< create table crash_me10 (ABSOLUTE int not null) ###> OK @@ -2416,13 +2419,13 @@ reserved_word_ansi-92/99_authorization=no # Keyword AUTHORIZATION ###> OK ### ###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) - ###> 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 - ###> 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 ###< create table crash_me10 (BEGIN int not null) ###> OK @@ -2535,13 +2538,13 @@ reserved_word_ansi-92/99_close=no # Keyword CLOSE ###> OK ### ###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) - ###> 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 - ###> 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 ###< create table crash_me10 (COLLATION int not null) ###> OK @@ -2913,13 +2916,13 @@ reserved_word_ansi-92/99_external=no # Keyword EXTERNAL ###> OK ### ###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) - ###> 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 - ###> 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 ###< create table crash_me10 (FETCH int not null) ###> OK @@ -3223,7 +3226,7 @@ reserved_word_ansi-92/99_level=no # Keyword LEVEL ###As far as all queries returned OK, result is NO reserved_word_ansi-92/99_like=yes # Keyword LIKE ###< 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 ###> execute error:Unknown table 'crash_me10' ### @@ -3466,13 +3469,13 @@ reserved_word_ansi-92/99_parameters=no # Keyword PARAMETERS ###> OK ### ###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) - ###> 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 - ###> 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 ###< 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 @@ -3900,13 +3903,13 @@ reserved_word_ansi-92/99_trigger=no # Keyword TRIGGER ###> OK ### ###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) - ###> 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 - ###> 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 ###< create table crash_me10 (UNDER int not null) ###> OK @@ -4124,13 +4127,13 @@ reserved_word_ansi92_coalesce=no # Keyword COALESCE ###> OK ### ###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) - ###> 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 - ###> 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 ###< create table crash_me10 (COUNT int not null) ###> OK @@ -5321,13 +5324,13 @@ reserved_word_extra_low_priority=yes # Keyword LOW_PRIORITY ###> execute error:Unknown table 'crash_me10' ### ###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) - ###> 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 - ###> 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 ###< create table crash_me10 (MAXEXTENTS int not null) ###> OK @@ -5720,13 +5723,13 @@ reserved_word_extra_soname=yes # Keyword SONAME ###> execute error:Unknown table 'crash_me10' ### ###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) - ###> 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 - ###> 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 ###< 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 @@ -6038,13 +6041,16 @@ select_limit3=yes # SELECT with LIMIT # OFFSET # select_string_size=1048565 # constant string size in SELECT ###We are trying (example with N=5): ###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)) ###> OK ###< insert into crash_q values(1,'c') ###> OK ###< 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 + ### + ### execute failed:Unknown column 'FALSE' in 'field list' -value_of_true=not supported # Value of TRUE + ###>0 +value_of_true=1 # Value of TRUE ###