From ffebdee6426d8145b3aacd6274ca5e507103daab Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Jan 2006 13:58:28 +0400 Subject: [PATCH 01/65] Fix for bug #15756: incorrect ip address matching in ACL due to use of latin1 collation. Thanks Deomid Ryabkov for the great help! sql/hostname.cc: Fix for bug #15756: incorrect ip address matching in ACL due to use of latin1 collation. - use my_charset_bin instead of my_charset_latin1 to properly compare IP addresses. --- sql/hostname.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/hostname.cc b/sql/hostname.cc index 32e1d84fac3..32c4bb8533d 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -61,7 +61,7 @@ bool hostname_cache_init() if (!(hostname_cache=new hash_filo(HOST_CACHE_SIZE, offset, sizeof(struct in_addr),NULL, (hash_free_key) free, - &my_charset_latin1))) + &my_charset_bin))) return 1; hostname_cache->clear(); (void) pthread_mutex_init(&LOCK_hostname,MY_MUTEX_INIT_SLOW); From 7f02b0a01b64070562d5d768b5709127714732a4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 Feb 2006 12:11:29 +0100 Subject: [PATCH 02/65] Fixed BUG#16887: Cursor causes server segfault The problem was a code generation bug: cpop instructions were not generated when using ITERATE back to an outer block from a context with a declared cursor; this would make it push a new cursor without popping in-between, eventually overrunning the cursor stack with a crash as the result. Fixed the calculation of how many cursors to pop (in sp_pcontext.cc: diff_cursors()), and also corrected diff_cursors() and diff_handlers() to when doing a "leave"; don't include the last context we're leaving (we are then jumping to the appropriate pop instructions). mysql-test/r/sp.result: Updated result for new test case (BUG#16887) mysql-test/t/sp.test: New test case for BUG#16887 sql/sp_pcontext.cc: Added new parameter to sp_pcontext::diff_handlers() and diff_cursors(): They can either include (for iterate jumps) or exclude (for leave jumps) the outer context. Fixed bug in diff_cursors(); it was just plain wrong and would return zero in some situations when it shouldn't. sql/sp_pcontext.h: Added new parameter to sp_pcontext::diff_handlers() and diff_cursors(): They can either include (for iterate jumps) or exclude (for leave jumps) the outer context. sql/sql_yacc.yy: Added parameter to diff_handlers/diff_cursors depending on if it's an iterate or leave jump. For "leave", we don't have to include the last context we're leaving since we will jump to the appropriate pop instructions. --- mysql-test/r/sp.result | 56 ++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/sp.test | 54 ++++++++++++++++++++++++++++++++++++++++ sql/sp_pcontext.cc | 16 +++++++++--- sql/sp_pcontext.h | 10 +++++--- sql/sql_yacc.yy | 8 +++--- 5 files changed, 133 insertions(+), 11 deletions(-) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index bec2f049bc4..e4168f67125 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -4519,4 +4519,60 @@ Handler Inner drop procedure bug15011| drop table t3| +drop table if exists t3| +drop procedure if exists bug16887| +create table t3 ( c varchar(1) )| +insert into t3 values +(' '),('.'),(';'),(','),('-'),('_'),('('),(')'),('/'),('\\')| +create procedure bug16887() +begin +declare i int default 10; +again: +while i > 0 do +begin +declare breakchar varchar(1); +declare done int default 0; +declare t3_cursor cursor for select c from t3; +declare continue handler for not found set done = 1; +set i = i - 1; +select i; +if i = 3 then +iterate again; +end if; +open t3_cursor; +loop +fetch t3_cursor into breakchar; +if done = 1 then +begin +close t3_cursor; +iterate again; +end; +end if; +end loop; +end; +end while; +end| +call bug16887()| +i +9 +i +8 +i +7 +i +6 +i +5 +i +4 +i +3 +i +2 +i +1 +i +0 +drop table t3| +drop procedure bug16887| drop table t1,t2; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 53c15ffd05b..b86c39e3109 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -5311,6 +5311,60 @@ drop procedure bug15011| drop table t3| +# +# BUG#16887: Cursor causes server segfault +# +--disable_warnings +drop table if exists t3| +drop procedure if exists bug16887| +--enable_warnings + +create table t3 ( c varchar(1) )| + +insert into t3 values + (' '),('.'),(';'),(','),('-'),('_'),('('),(')'),('/'),('\\')| + +create procedure bug16887() +begin + declare i int default 10; + + again: + while i > 0 do + begin + declare breakchar varchar(1); + declare done int default 0; + declare t3_cursor cursor for select c from t3; + declare continue handler for not found set done = 1; + + set i = i - 1; + select i; + + if i = 3 then + iterate again; + end if; + + open t3_cursor; + + loop + fetch t3_cursor into breakchar; + + if done = 1 then + begin + close t3_cursor; + iterate again; + end; + end if; + end loop; + end; + end while; +end| + +call bug16887()| + +drop table t3| +drop procedure bug16887| + + # # BUG#NNNN: New bug synopsis # diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc index a8bd8cd2aa0..f69053a7c88 100644 --- a/sql/sp_pcontext.cc +++ b/sql/sp_pcontext.cc @@ -122,30 +122,38 @@ sp_pcontext::pop_context() } uint -sp_pcontext::diff_handlers(sp_pcontext *ctx) +sp_pcontext::diff_handlers(sp_pcontext *ctx, bool exclusive) { uint n= 0; sp_pcontext *pctx= this; + sp_pcontext *last_ctx= NULL; while (pctx && pctx != ctx) { n+= pctx->m_handlers; + last_ctx= pctx; pctx= pctx->parent_context(); } if (pctx) - return n; + return (exclusive && last_ctx ? n - last_ctx->m_handlers : n); return 0; // Didn't find ctx } uint -sp_pcontext::diff_cursors(sp_pcontext *ctx) +sp_pcontext::diff_cursors(sp_pcontext *ctx, bool exclusive) { + uint n= 0; sp_pcontext *pctx= this; + sp_pcontext *last_ctx= NULL; while (pctx && pctx != ctx) + { + n+= pctx->m_cursor.elements; + last_ctx= pctx; pctx= pctx->parent_context(); + } if (pctx) - return ctx->current_cursors() - pctx->current_cursors(); + return (exclusive && last_ctx ? n - last_ctx->m_cursor.elements : n); return 0; // Didn't find ctx } diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index d1cd7b964c2..872c7c1d505 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -119,11 +119,15 @@ class sp_pcontext : public Sql_alloc return m_parent; } + /* + Number of handlers/cursors to pop between this context and 'ctx'. + If 'exclusive' is true, don't count the last block we are leaving; + this is used for LEAVE where we will jump to the cpop/hpop instructions. + */ uint - diff_handlers(sp_pcontext *ctx); - + diff_handlers(sp_pcontext *ctx, bool exclusive); uint - diff_cursors(sp_pcontext *ctx); + diff_cursors(sp_pcontext *ctx, bool exclusive); // diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 4f4ec5e92de..b68b822b1ac 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2079,10 +2079,10 @@ sp_proc_stmt: uint ip= sp->instructions(); uint n; - n= ctx->diff_handlers(lab->ctx); + n= ctx->diff_handlers(lab->ctx, TRUE); /* Exclusive the dest. */ if (n) sp->add_instr(new sp_instr_hpop(ip++, ctx, n)); - n= ctx->diff_cursors(lab->ctx); + n= ctx->diff_cursors(lab->ctx, TRUE); /* Exclusive the dest. */ if (n) sp->add_instr(new sp_instr_cpop(ip++, ctx, n)); i= new sp_instr_jump(ip, ctx); @@ -2108,10 +2108,10 @@ sp_proc_stmt: uint ip= sp->instructions(); uint n; - n= ctx->diff_handlers(lab->ctx); + n= ctx->diff_handlers(lab->ctx, FALSE); /* Inclusive the dest. */ if (n) sp->add_instr(new sp_instr_hpop(ip++, ctx, n)); - n= ctx->diff_cursors(lab->ctx); + n= ctx->diff_cursors(lab->ctx, FALSE); /* Inclusive the dest. */ if (n) sp->add_instr(new sp_instr_cpop(ip++, ctx, n)); i= new sp_instr_jump(ip, ctx, lab->ip); /* Jump back */ From 31a7a0d64652c651c201f0c176f1401992d1714e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Feb 2006 10:09:59 +0100 Subject: [PATCH 03/65] Bug#10460 SHOW CREATE TABLE uses inconsistent upper/lower case mysql-test/r/alter_table.result: Update test result mysql-test/r/analyse.result: Update test result mysql-test/r/archive.result: Update test result mysql-test/r/archive_bitfield.result: Update test result mysql-test/r/archive_gis.result: Update test result mysql-test/r/bdb.result: Update test result mysql-test/r/bdb_gis.result: Update test result mysql-test/r/bigint.result: Update test result mysql-test/r/binary.result: Update test result mysql-test/r/case.result: Update test result mysql-test/r/cast.result: Update test result mysql-test/r/constraints.result: Update test result mysql-test/r/create.result: Update test result mysql-test/r/ctype_collate.result: Update test result mysql-test/r/ctype_create.result: Update test result mysql-test/r/ctype_latin1_de.result: Update test result mysql-test/r/ctype_many.result: Update test result mysql-test/r/ctype_mb.result: Update test result mysql-test/r/ctype_recoding.result: Update test result mysql-test/r/ctype_sjis.result: Update test result mysql-test/r/ctype_tis620.result: Update test result mysql-test/r/ctype_ucs.result: Update test result mysql-test/r/ctype_ujis.result: Update test result mysql-test/r/ctype_utf8.result: Update test result mysql-test/r/default.result: Update test result mysql-test/r/events.result: Update test result mysql-test/r/federated.result: Update test result mysql-test/r/fulltext.result: Update test result mysql-test/r/func_gconcat.result: Update test result mysql-test/r/func_group.result: Update test result mysql-test/r/func_math.result: Update test result mysql-test/r/func_misc.result: Update test result mysql-test/r/func_str.result: Update test result mysql-test/r/func_system.result: Update test result mysql-test/r/gis-rtree.result: Update test result mysql-test/r/heap.result: Update test result mysql-test/r/index_merge_innodb.result: Update test result mysql-test/r/information_schema.result: Update test result mysql-test/r/innodb.result: Update test result mysql-test/r/innodb_gis.result: Update test result mysql-test/r/key.result: Update test result mysql-test/r/merge.result: Update test result mysql-test/r/myisam.result: Update test result mysql-test/r/mysqldump-max.result: Update test result mysql-test/r/mysqldump.result: Update test result mysql-test/r/ndb_bitfield.result: Update test result mysql-test/r/ndb_gis.result: Update test result mysql-test/r/ndb_partition_key.result: Update test result mysql-test/r/null.result: Update test result mysql-test/r/partition.result: Update test result mysql-test/r/partition_02myisam.result: Update test result mysql-test/r/partition_mgm_err.result: Update test result mysql-test/r/partition_range.result: Update test result mysql-test/r/ps_2myisam.result: Update test result mysql-test/r/ps_3innodb.result: Update test result mysql-test/r/ps_4heap.result: Update test result mysql-test/r/ps_5merge.result: Update test result mysql-test/r/ps_6bdb.result: Update test result mysql-test/r/rpl_mixed_ddl_dml.result: Update test result mysql-test/r/rpl_multi_engine.result: Update test result mysql-test/r/rpl_ndb_UUID.result: Update test result mysql-test/r/show_check.result: Update test result mysql-test/r/sp-vars.result: Update test result mysql-test/r/sp.result: Update test result mysql-test/r/sql_mode.result: Update test result mysql-test/r/strict.result: Update test result mysql-test/r/subselect.result: Update test result mysql-test/r/symlink.result: Update test result mysql-test/r/synchronization.result: Update test result mysql-test/r/system_mysql_db.result: Update test result mysql-test/r/temp_table.result: Update test result mysql-test/r/trigger.result: Update test result mysql-test/r/type_binary.result: Update test result mysql-test/r/type_bit.result: Update test result mysql-test/r/type_bit_innodb.result: Update test result mysql-test/r/type_blob.result: Update test result mysql-test/r/type_decimal.result: Update test result mysql-test/r/type_enum.result: Update test result mysql-test/r/type_float.result: Update test result mysql-test/r/type_nchar.result: Update test result mysql-test/r/type_newdecimal.result: Update test result mysql-test/r/type_set.result: Update test result mysql-test/r/type_timestamp.result: Update test result mysql-test/r/type_varchar.result: Update test result mysql-test/r/union.result: Update test result mysql-test/r/user_var.result: Update test result mysql-test/r/variables.result: Update test result sql/sql_show.cc: Make ouput from SHOW CREATE TABLE use uppercase for "CHARACTER SET", "COLLATE", "DEFAULT", "ON UPDATE" and "AUTO_INCREMENT" --- mysql-test/r/alter_table.result | 14 +- mysql-test/r/analyse.result | 60 +- mysql-test/r/archive.result | 12 +- mysql-test/r/archive_bitfield.result | 4 +- mysql-test/r/archive_gis.result | 4 +- mysql-test/r/bdb.result | 54 +- mysql-test/r/bdb_gis.result | 4 +- mysql-test/r/bigint.result | 4 +- mysql-test/r/binary.result | 2 +- mysql-test/r/case.result | 38 +- mysql-test/r/cast.result | 22 +- mysql-test/r/constraints.result | 2 +- mysql-test/r/create.result | 82 +-- mysql-test/r/ctype_collate.result | 4 +- mysql-test/r/ctype_create.result | 12 +- mysql-test/r/ctype_latin1_de.result | 6 +- mysql-test/r/ctype_many.result | 18 +- mysql-test/r/ctype_mb.result | 16 +- mysql-test/r/ctype_recoding.result | 22 +- mysql-test/r/ctype_sjis.result | 2 +- mysql-test/r/ctype_tis620.result | 2 +- mysql-test/r/ctype_ucs.result | 10 +- mysql-test/r/ctype_ujis.result | 4 +- mysql-test/r/ctype_utf8.result | 18 +- mysql-test/r/default.result | 24 +- mysql-test/r/events.result | 30 +- mysql-test/r/federated.result | 2 +- mysql-test/r/fulltext.result | 4 +- mysql-test/r/func_gconcat.result | 2 +- mysql-test/r/func_group.result | 10 +- mysql-test/r/func_math.result | 2 +- mysql-test/r/func_misc.result | 4 +- mysql-test/r/func_str.result | 62 +- mysql-test/r/func_system.result | 10 +- mysql-test/r/gis-rtree.result | 4 +- mysql-test/r/heap.result | 56 +- mysql-test/r/index_merge_innodb.result | 4 +- mysql-test/r/information_schema.result | 26 +- mysql-test/r/innodb.result | 76 +-- mysql-test/r/innodb_gis.result | 4 +- mysql-test/r/key.result | 32 +- mysql-test/r/merge.result | 8 +- mysql-test/r/myisam.result | 54 +- mysql-test/r/mysqldump-max.result | 48 +- mysql-test/r/mysqldump.result | 774 ++++++++++++------------- mysql-test/r/ndb_bitfield.result | 2 +- mysql-test/r/ndb_gis.result | 8 +- mysql-test/r/ndb_partition_key.result | 8 +- mysql-test/r/null.result | 76 +-- mysql-test/r/partition.result | 10 +- mysql-test/r/partition_02myisam.result | 128 ++-- mysql-test/r/partition_mgm_err.result | 4 +- mysql-test/r/partition_range.result | 2 +- mysql-test/r/ps_2myisam.result | 38 +- mysql-test/r/ps_3innodb.result | 38 +- mysql-test/r/ps_4heap.result | 38 +- mysql-test/r/ps_5merge.result | 76 +-- mysql-test/r/ps_6bdb.result | 38 +- mysql-test/r/rpl_mixed_ddl_dml.result | 8 +- mysql-test/r/rpl_multi_engine.result | 192 +++--- mysql-test/r/rpl_ndb_UUID.result | 4 +- mysql-test/r/show_check.result | 88 +-- mysql-test/r/sp-vars.result | 4 +- mysql-test/r/sp.result | 12 +- mysql-test/r/sql_mode.result | 62 +- mysql-test/r/strict.result | 10 +- mysql-test/r/subselect.result | 14 +- mysql-test/r/symlink.result | 14 +- mysql-test/r/synchronization.result | 40 +- mysql-test/r/system_mysql_db.result | 284 ++++----- mysql-test/r/temp_table.result | 2 +- mysql-test/r/trigger.result | 2 +- mysql-test/r/type_binary.result | 4 +- mysql-test/r/type_bit.result | 4 +- mysql-test/r/type_bit_innodb.result | 14 +- mysql-test/r/type_blob.result | 10 +- mysql-test/r/type_decimal.result | 4 +- mysql-test/r/type_enum.result | 10 +- mysql-test/r/type_float.result | 10 +- mysql-test/r/type_nchar.result | 14 +- mysql-test/r/type_newdecimal.result | 52 +- mysql-test/r/type_set.result | 4 +- mysql-test/r/type_timestamp.result | 46 +- mysql-test/r/type_varchar.result | 24 +- mysql-test/r/union.result | 62 +- mysql-test/r/user_var.result | 4 +- mysql-test/r/variables.result | 16 +- sql/sql_show.cc | 10 +- 88 files changed, 1571 insertions(+), 1571 deletions(-) diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index ddec3ca4371..92c6cf052e3 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -468,25 +468,25 @@ delete from t1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) character set koi8r default NULL + `a` char(10) CHARACTER SET koi8r DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 DEFAULT CHARACTER SET latin1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) character set koi8r default NULL + `a` char(10) CHARACTER SET koi8r DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 CONVERT TO CHARACTER SET latin1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 DEFAULT CHARACTER SET cp1251; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) character set latin1 default NULL + `a` char(10) CHARACTER SET latin1 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 drop table t1; create table t1 (myblob longblob,mytext longtext) @@ -495,14 +495,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `myblob` longblob, - `mytext` longtext collate latin1_general_cs + `mytext` longtext COLLATE latin1_general_cs ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs alter table t1 character set latin2; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `myblob` longblob, - `mytext` longtext character set latin1 collate latin1_general_cs + `mytext` longtext CHARACTER SET latin1 COLLATE latin1_general_cs ) ENGINE=MyISAM DEFAULT CHARSET=latin2 drop table t1; CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE); @@ -511,7 +511,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` int(11) default NULL, + `b` int(11) DEFAULT NULL, UNIQUE KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ALTER TABLE t1 DROP PRIMARY KEY; diff --git a/mysql-test/r/analyse.result b/mysql-test/r/analyse.result index f4e547dbc66..3bb8e30fc0d 100644 --- a/mysql-test/r/analyse.result +++ b/mysql-test/r/analyse.result @@ -36,16 +36,16 @@ create table t2 select * from t1 where 0=1 procedure analyse(); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `Field_name` varbinary(255) NOT NULL default '', - `Min_value` varbinary(255) default NULL, - `Max_value` varbinary(255) default NULL, - `Min_length` bigint(11) NOT NULL default '0', - `Max_length` bigint(11) NOT NULL default '0', - `Empties_or_zeros` bigint(11) NOT NULL default '0', - `Nulls` bigint(11) NOT NULL default '0', - `Avg_value_or_avg_length` varbinary(255) NOT NULL default '', - `Std` varbinary(255) default NULL, - `Optimal_fieldtype` varbinary(64) NOT NULL default '' + `Field_name` varbinary(255) NOT NULL DEFAULT '', + `Min_value` varbinary(255) DEFAULT NULL, + `Max_value` varbinary(255) DEFAULT NULL, + `Min_length` bigint(11) NOT NULL DEFAULT '0', + `Max_length` bigint(11) NOT NULL DEFAULT '0', + `Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0', + `Nulls` bigint(11) NOT NULL DEFAULT '0', + `Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '', + `Std` varbinary(255) DEFAULT NULL, + `Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1 where 0=1 procedure analyse(); Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype @@ -55,16 +55,16 @@ create table t2 select * from t1 where 0=1 procedure analyse(); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `Field_name` varbinary(255) NOT NULL default '', - `Min_value` varbinary(255) default NULL, - `Max_value` varbinary(255) default NULL, - `Min_length` bigint(11) NOT NULL default '0', - `Max_length` bigint(11) NOT NULL default '0', - `Empties_or_zeros` bigint(11) NOT NULL default '0', - `Nulls` bigint(11) NOT NULL default '0', - `Avg_value_or_avg_length` varbinary(255) NOT NULL default '', - `Std` varbinary(255) default NULL, - `Optimal_fieldtype` varbinary(64) NOT NULL default '' + `Field_name` varbinary(255) NOT NULL DEFAULT '', + `Min_value` varbinary(255) DEFAULT NULL, + `Max_value` varbinary(255) DEFAULT NULL, + `Min_length` bigint(11) NOT NULL DEFAULT '0', + `Max_length` bigint(11) NOT NULL DEFAULT '0', + `Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0', + `Nulls` bigint(11) NOT NULL DEFAULT '0', + `Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '', + `Std` varbinary(255) DEFAULT NULL, + `Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t2; Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype @@ -78,16 +78,16 @@ create table t2 select * from t1 where 0=1 procedure analyse(); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `Field_name` varbinary(255) NOT NULL default '', - `Min_value` varbinary(255) default NULL, - `Max_value` varbinary(255) default NULL, - `Min_length` bigint(11) NOT NULL default '0', - `Max_length` bigint(11) NOT NULL default '0', - `Empties_or_zeros` bigint(11) NOT NULL default '0', - `Nulls` bigint(11) NOT NULL default '0', - `Avg_value_or_avg_length` varbinary(255) NOT NULL default '', - `Std` varbinary(255) default NULL, - `Optimal_fieldtype` varbinary(64) NOT NULL default '' + `Field_name` varbinary(255) NOT NULL DEFAULT '', + `Min_value` varbinary(255) DEFAULT NULL, + `Max_value` varbinary(255) DEFAULT NULL, + `Min_length` bigint(11) NOT NULL DEFAULT '0', + `Max_length` bigint(11) NOT NULL DEFAULT '0', + `Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0', + `Nulls` bigint(11) NOT NULL DEFAULT '0', + `Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '', + `Std` varbinary(255) DEFAULT NULL, + `Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t2; Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index fd4da80566b..0be99e071cd 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12340,12 +12340,12 @@ ALTER TABLE t2 DROP COLUMN fld6; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `auto` int(11) default NULL, - `fld1` int(6) unsigned zerofill NOT NULL default '000000', - `companynr` tinyint(2) unsigned zerofill NOT NULL default '00', - `fld3` char(30) NOT NULL default '', - `fld4` char(35) NOT NULL default '', - `fld5` char(35) NOT NULL default '' + `auto` int(11) DEFAULT NULL, + `fld1` int(6) unsigned zerofill NOT NULL DEFAULT '000000', + `companynr` tinyint(2) unsigned zerofill NOT NULL DEFAULT '00', + `fld3` char(30) NOT NULL DEFAULT '', + `fld4` char(35) NOT NULL DEFAULT '', + `fld5` char(35) NOT NULL DEFAULT '' ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 SELECT * FROM t2; auto fld1 companynr fld3 fld4 fld5 diff --git a/mysql-test/r/archive_bitfield.result b/mysql-test/r/archive_bitfield.result index 2cab369cd90..7e3b82a5caf 100644 --- a/mysql-test/r/archive_bitfield.result +++ b/mysql-test/r/archive_bitfield.result @@ -6,8 +6,8 @@ b bit(64) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL auto_increment, - `b` bit(64) default NULL, + `pk1` int(11) NOT NULL AUTO_INCREMENT, + `b` bit(64) DEFAULT NULL, PRIMARY KEY (`pk1`) ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 insert into t1 values diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 25a77bc9c75..20e427b91a9 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -11,8 +11,8 @@ CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY); SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) DEFAULT NULL, + `g` point DEFAULT NULL ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index bab945ccf50..f2d9c5704bb 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1366,40 +1366,40 @@ concat('*',v,'*',c,'*',t,'*') show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 create table t2 like t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 create table t3 select * from t1; show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 alter table t1 modify c varchar(10); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` varchar(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, `t` text ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 alter table t1 modify v char(10); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) default NULL, - `c` varchar(10) default NULL, + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, `t` text ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 alter table t1 modify t varchar(10); @@ -1408,9 +1408,9 @@ Note 1265 Data truncated for column 't' at row 2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) default NULL, - `c` varchar(10) default NULL, - `t` varchar(10) default NULL + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, + `t` varchar(10) DEFAULT NULL ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') @@ -1421,8 +1421,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10))); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `v` (`v`), KEY `c` (`c`), @@ -1640,8 +1640,8 @@ alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(300) default NULL, - `c` char(10) default NULL, + `v` varchar(300) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), @@ -1720,8 +1720,8 @@ alter table t1 drop key v, add key v (v(30)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(300) default NULL, - `c` char(10) default NULL, + `v` varchar(300) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), @@ -1800,8 +1800,8 @@ alter table t1 modify v varchar(600), drop key v, add key v (v); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(600) default NULL, - `c` char(10) default NULL, + `v` varchar(600) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), @@ -1878,8 +1878,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t( show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `v` (`v`(5)), KEY `c` (`c`(5)), @@ -1890,15 +1890,15 @@ create table t1 (v char(10) character set utf8); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) character set utf8 default NULL + `v` char(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 drop table t1; create table t1 (v varchar(10), c char(10)) row_format=fixed; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED insert into t1 values('a','a'),('a ','a '); select concat('*',v,'*',c,'*') from t1; @@ -1940,7 +1940,7 @@ Note 1246 Converting column 'v' from VARCHAR to TEXT show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` mediumtext character set utf8 + `v` mediumtext CHARACTER SET utf8 ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 drop table t1; set storage_engine=MyISAM; diff --git a/mysql-test/r/bdb_gis.result b/mysql-test/r/bdb_gis.result index c0e1682e485..0dadceed04e 100644 --- a/mysql-test/r/bdb_gis.result +++ b/mysql-test/r/bdb_gis.result @@ -11,8 +11,8 @@ CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY); SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) DEFAULT NULL, + `g` point DEFAULT NULL ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 3c8a70b7bde..039dc0980ce 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -174,14 +174,14 @@ create table t1 select 1 as 'a'; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(1) NOT NULL default '0' + `a` bigint(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 select 9223372036854775809 as 'a'; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(19) unsigned NOT NULL default '0' + `a` bigint(19) unsigned NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; a diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result index a8d6c3bf411..99d9c4dad02 100644 --- a/mysql-test/r/binary.result +++ b/mysql-test/r/binary.result @@ -138,6 +138,6 @@ create table t1 (a binary); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` binary(1) default NULL + `a` binary(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index ea80695ad7b..415ec1ac748 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -99,18 +99,18 @@ CASE WHEN 1 THEN 0.1e1 else '1' END AS c12 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '', - `c2` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '', - `c3` varbinary(1) NOT NULL default '', - `c4` varbinary(1) NOT NULL default '', - `c5` varbinary(3) NOT NULL default '', - `c6` varbinary(3) NOT NULL default '', - `c7` decimal(2,1) NOT NULL default '0.0', - `c8` decimal(2,1) NOT NULL default '0.0', - `c9` decimal(2,1) default NULL, - `c10` double NOT NULL default '0', - `c11` double NOT NULL default '0', - `c12` varbinary(5) NOT NULL default '' + `c1` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '', + `c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '', + `c3` varbinary(1) NOT NULL DEFAULT '', + `c4` varbinary(1) NOT NULL DEFAULT '', + `c5` varbinary(3) NOT NULL DEFAULT '', + `c6` varbinary(3) NOT NULL DEFAULT '', + `c7` decimal(2,1) NOT NULL DEFAULT '0.0', + `c8` decimal(2,1) NOT NULL DEFAULT '0.0', + `c9` decimal(2,1) DEFAULT NULL, + `c10` double NOT NULL DEFAULT '0', + `c11` double NOT NULL DEFAULT '0', + `c12` varbinary(5) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; SELECT CASE @@ -151,13 +151,13 @@ Note 1003 select coalesce(1) AS `COALESCE(1)`,coalesce(1.0) AS `COALESCE(1.0)`,c SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `COALESCE(1)` int(1) NOT NULL default '0', - `COALESCE(1.0)` decimal(2,1) unsigned NOT NULL default '0.0', - `COALESCE('a')` varchar(1) NOT NULL default '', - `COALESCE(1,1.0)` decimal(2,1) NOT NULL default '0.0', - `COALESCE(1,'1')` varbinary(1) NOT NULL default '', - `COALESCE(1.1,'1')` varbinary(3) NOT NULL default '', - `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) character set latin1 collate latin1_bin NOT NULL default '' + `COALESCE(1)` int(1) NOT NULL DEFAULT '0', + `COALESCE(1.0)` decimal(2,1) unsigned NOT NULL DEFAULT '0.0', + `COALESCE('a')` varchar(1) NOT NULL DEFAULT '', + `COALESCE(1,1.0)` decimal(2,1) NOT NULL DEFAULT '0.0', + `COALESCE(1,'1')` varbinary(1) NOT NULL DEFAULT '', + `COALESCE(1.1,'1')` varbinary(3) NOT NULL DEFAULT '', + `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; SELECT 'case+union+test' diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 8da18df1954..6d184da10e6 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -157,7 +157,7 @@ create table t1 select cast(_koi8r' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t` varchar(4) character set cp1251 NOT NULL default '' + `t` varchar(4) CHARACTER SET cp1251 NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select @@ -191,11 +191,11 @@ ab a ab a 6100 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(2) NOT NULL default '', - `c2` varbinary(2) NOT NULL default '', - `c3` varbinary(2) NOT NULL default '', - `c4` varbinary(2) NOT NULL default '', - `c5` varbinary(2) NOT NULL default '' + `c1` varbinary(2) NOT NULL DEFAULT '', + `c2` varbinary(2) NOT NULL DEFAULT '', + `c3` varbinary(2) NOT NULL DEFAULT '', + `c4` varbinary(2) NOT NULL DEFAULT '', + `c5` varbinary(2) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select @@ -224,11 +224,11 @@ c1 c2 c3 c4 c5 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(2) character set utf8 NOT NULL default '', - `c2` varchar(2) character set utf8 NOT NULL default '', - `c3` varchar(2) character set utf8 NOT NULL default '', - `c4` varchar(2) character set utf8 NOT NULL default '', - `c5` varchar(2) character set utf8 NOT NULL default '' + `c1` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT '', + `c2` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT '', + `c3` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT '', + `c4` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT '', + `c5` varchar(2) CHARACTER SET utf8 NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a binary(4), b char(4) character set koi8r); diff --git a/mysql-test/r/constraints.result b/mysql-test/r/constraints.result index d4d525c8991..116efe429d5 100644 --- a/mysql-test/r/constraints.result +++ b/mysql-test/r/constraints.result @@ -21,7 +21,7 @@ alter table t1 add constraint constraint_2 unique key_2(a); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) default NULL, + `a` int(11) DEFAULT NULL, UNIQUE KEY `constraint_1` (`a`), UNIQUE KEY `key_1` (`a`), UNIQUE KEY `key_2` (`a`) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 25ceafd2c69..acee1eb87c8 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -44,7 +44,7 @@ create table `a/a` (a int); show create table `a/a`; Table Create Table a/a CREATE TABLE `a/a` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t1 like `a/a`; drop table `a/a`; @@ -174,7 +174,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` int(11) default NULL, + `b` int(11) DEFAULT NULL, PRIMARY KEY (`a`), KEY `b` (`b`), KEY `b_2` (`b`), @@ -311,7 +311,7 @@ show create table t3; Table Create Table t3 CREATE TABLE `t3` ( `id` int(11) NOT NULL, - `name` char(20) default NULL + `name` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t3; id name @@ -334,7 +334,7 @@ show create table t3; Table Create Table t3 CREATE TABLE `t3` ( `id` int(11) NOT NULL, - `name` char(20) default NULL + `name` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t3; id name @@ -346,14 +346,14 @@ show create table t3; Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( `id` int(11) NOT NULL, - `name` char(20) default NULL + `name` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t2 like t3; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `id` int(11) NOT NULL, - `name` char(20) default NULL + `name` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t2; id name @@ -447,21 +447,21 @@ create table t2 select ifnull(a,a), ifnull(b,b), ifnull(c,c), ifnull(d,d), ifnul show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `ifnull(a,a)` tinyint(4) default NULL, - `ifnull(b,b)` smallint(6) default NULL, - `ifnull(c,c)` mediumint(8) default NULL, - `ifnull(d,d)` int(11) default NULL, - `ifnull(e,e)` bigint(20) default NULL, - `ifnull(f,f)` float(24,2) default NULL, - `ifnull(g,g)` double(53,3) default NULL, - `ifnull(h,h)` decimal(5,4) default NULL, - `ifnull(i,i)` year(4) default NULL, - `ifnull(j,j)` date default NULL, - `ifnull(k,k)` datetime NOT NULL default '0000-00-00 00:00:00', - `ifnull(l,l)` datetime default NULL, - `ifnull(m,m)` varchar(1) default NULL, - `ifnull(n,n)` varchar(3) default NULL, - `ifnull(o,o)` varchar(10) default NULL + `ifnull(a,a)` tinyint(4) DEFAULT NULL, + `ifnull(b,b)` smallint(6) DEFAULT NULL, + `ifnull(c,c)` mediumint(8) DEFAULT NULL, + `ifnull(d,d)` int(11) DEFAULT NULL, + `ifnull(e,e)` bigint(20) DEFAULT NULL, + `ifnull(f,f)` float(24,2) DEFAULT NULL, + `ifnull(g,g)` double(53,3) DEFAULT NULL, + `ifnull(h,h)` decimal(5,4) DEFAULT NULL, + `ifnull(i,i)` year(4) DEFAULT NULL, + `ifnull(j,j)` date DEFAULT NULL, + `ifnull(k,k)` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `ifnull(l,l)` datetime DEFAULT NULL, + `ifnull(m,m)` varchar(1) DEFAULT NULL, + `ifnull(n,n)` varchar(3) DEFAULT NULL, + `ifnull(o,o)` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2; create table t1(str varchar(10) default 'def',strnull varchar(10),intg int default '10',rel double default '3.14'); @@ -526,14 +526,14 @@ create table t1 (`primary` int, index(`primary`)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `primary` int(11) default NULL, + `primary` int(11) DEFAULT NULL, KEY `primary_2` (`primary`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t2 (`PRIMARY` int, index(`PRIMARY`)); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `PRIMARY` int(11) default NULL, + `PRIMARY` int(11) DEFAULT NULL, KEY `PRIMARY_2` (`PRIMARY`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t3 (a int); @@ -546,7 +546,7 @@ alter table t4 add index(`primary`); show create table t4; Table Create Table t4 CREATE TABLE `t4` ( - `primary` int(11) default NULL, + `primary` int(11) DEFAULT NULL, KEY `primary_2` (`primary`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t5 (`PRIMARY` int); @@ -554,7 +554,7 @@ alter table t5 add index(`PRIMARY`); show create table t5; Table Create Table t5 CREATE TABLE `t5` ( - `PRIMARY` int(11) default NULL, + `PRIMARY` int(11) DEFAULT NULL, KEY `PRIMARY_2` (`PRIMARY`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2, t3, t4, t5; @@ -642,7 +642,7 @@ primary key (a) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(112) character set utf8 collate utf8_bin NOT NULL, + `a` varchar(112) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -657,7 +657,7 @@ b int not null, primary key (a) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(12) character set utf8 collate utf8_bin NOT NULL, + `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `b` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -672,8 +672,8 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `b` int(11) NOT NULL, - `a` varchar(12) character set utf8 collate utf8_bin NOT NULL, - `c` bigint(1) NOT NULL default '0', + `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `c` bigint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -684,9 +684,9 @@ b int null, primary key (a) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `b` int(11) default NULL, - `a` varchar(12) character set utf8 collate utf8_bin NOT NULL, - `c` bigint(1) NOT NULL default '0', + `b` int(11) DEFAULT NULL, + `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `c` bigint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -697,7 +697,7 @@ b int not null, primary key (a) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(12) character set utf8 collate utf8_bin NOT NULL, + `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `b` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -709,7 +709,7 @@ b int not null, primary key (a) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(12) character set utf8 collate utf8_bin NOT NULL default '', + `a` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `b` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -745,28 +745,28 @@ select a1,a2 from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` int(11) default '3', - `b` int(11) default '3', - `a1` int(11) default NULL, - `a2` int(11) default NULL + `a` int(11) DEFAULT '3', + `b` int(11) DEFAULT '3', + `a1` int(11) DEFAULT NULL, + `a2` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; create table t1 (i int) engine=myisam max_rows=100000000000; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL + `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295 alter table t1 max_rows=100; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL + `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=100 alter table t1 max_rows=100000000000; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL + `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295 drop table t1; diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result index 66266d40fb3..f76096b3220 100644 --- a/mysql-test/r/ctype_collate.result +++ b/mysql-test/r/ctype_collate.result @@ -494,7 +494,7 @@ latin1_f CHAR(32) CHARACTER SET latin1 COLLATE latin1_bin; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `latin1_f` char(32) character set latin1 collate latin1_bin default NULL + `latin1_f` char(32) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW FIELDS FROM t1; Field Type Null Key Default Extra @@ -503,7 +503,7 @@ ALTER TABLE t1 CHARACTER SET latin1 COLLATE latin1_bin; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `latin1_f` char(32) collate latin1_bin default NULL + `latin1_f` char(32) COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin SHOW FIELDS FROM t1; Field Type Null Key Default Extra diff --git a/mysql-test/r/ctype_create.result b/mysql-test/r/ctype_create.result index 63bae33c6e1..8a81991ea78 100644 --- a/mysql-test/r/ctype_create.result +++ b/mysql-test/r/ctype_create.result @@ -12,7 +12,7 @@ CREATE TABLE mysqltest2.t1 (a char(10)); SHOW CREATE TABLE mysqltest2.t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin5 DROP TABLE mysqltest2.t1; ALTER DATABASE mysqltest2 DEFAULT CHARACTER SET latin7; @@ -20,7 +20,7 @@ CREATE TABLE mysqltest2.t1 (a char(10)); SHOW CREATE TABLE mysqltest2.t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin7 DROP DATABASE mysqltest2; CREATE DATABASE mysqltest2 CHARACTER SET latin2; @@ -28,7 +28,7 @@ CREATE TABLE mysqltest2.t1 (a char(10)); SHOW CREATE TABLE mysqltest2.t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DROP DATABASE mysqltest2; USE mysqltest1; @@ -36,14 +36,14 @@ CREATE TABLE t1 (a char(10)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 DROP TABLE t1; CREATE TABLE t1 (a char(10)) DEFAULT CHARACTER SET latin1; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (a char(10)) @@ -51,7 +51,7 @@ DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) collate latin1_german1_ci default NULL + `a` char(10) COLLATE latin1_german1_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci DROP TABLE t1; create table t1 (a char) character set latin1 character set latin2; diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result index f60dc175cd6..5733877237d 100644 --- a/mysql-test/r/ctype_latin1_de.result +++ b/mysql-test/r/ctype_latin1_de.result @@ -224,8 +224,8 @@ create table t1 (word varchar(255) not null, word2 varchar(255) not null default show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `word` varchar(255) collate latin1_german2_ci NOT NULL, - `word2` varchar(255) collate latin1_german2_ci NOT NULL default '', + `word` varchar(255) COLLATE latin1_german2_ci NOT NULL, + `word2` varchar(255) COLLATE latin1_german2_ci NOT NULL DEFAULT '', KEY `word` (`word`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci insert into t1 (word) values ('ss'),(0xDF),(0xE4),('ae'); @@ -299,7 +299,7 @@ s1 CHAR(5) CHARACTER SET latin1 COLLATE latin1_german2_ci show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `s1` char(5) collate latin1_german2_ci default NULL + `s1` char(5) COLLATE latin1_german2_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci INSERT INTO t1 VALUES (''); INSERT INTO t1 VALUES ('ue'); diff --git a/mysql-test/r/ctype_many.result b/mysql-test/r/ctype_many.result index 125a3fc4286..89e05bf4484 100644 --- a/mysql-test/r/ctype_many.result +++ b/mysql-test/r/ctype_many.result @@ -7,22 +7,22 @@ koi8_ru_f CHAR(32) CHARACTER SET koi8r NOT NULL default '' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `comment` char(32) character set latin1 NOT NULL, - `koi8_ru_f` char(32) character set koi8r NOT NULL default '' + `comment` char(32) CHARACTER SET latin1 NOT NULL, + `koi8_ru_f` char(32) CHARACTER SET koi8r NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin5 ALTER TABLE t1 CHANGE comment comment CHAR(32) CHARACTER SET latin2 NOT NULL; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `comment` char(32) character set latin2 NOT NULL, - `koi8_ru_f` char(32) character set koi8r NOT NULL default '' + `comment` char(32) CHARACTER SET latin2 NOT NULL, + `koi8_ru_f` char(32) CHARACTER SET koi8r NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin5 ALTER TABLE t1 ADD latin5_f CHAR(32) NOT NULL; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `comment` char(32) character set latin2 NOT NULL, - `koi8_ru_f` char(32) character set koi8r NOT NULL default '', + `comment` char(32) CHARACTER SET latin2 NOT NULL, + `koi8_ru_f` char(32) CHARACTER SET koi8r NOT NULL DEFAULT '', `latin5_f` char(32) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin5 ALTER TABLE t1 DEFAULT CHARSET=latin2; @@ -31,8 +31,8 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `comment` char(32) NOT NULL, - `koi8_ru_f` char(32) character set koi8r NOT NULL default '', - `latin5_f` char(32) character set latin5 NOT NULL, + `koi8_ru_f` char(32) CHARACTER SET koi8r NOT NULL DEFAULT '', + `latin5_f` char(32) CHARACTER SET latin5 NOT NULL, `latin2_f` char(32) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin2 ALTER TABLE t1 DROP latin2_f, DROP latin5_f; @@ -40,7 +40,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `comment` char(32) NOT NULL, - `koi8_ru_f` char(32) character set koi8r NOT NULL default '' + `koi8_ru_f` char(32) CHARACTER SET koi8r NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin2 INSERT INTO t1 (koi8_ru_f,comment) VALUES ('a','LAT SMALL A'); INSERT INTO t1 (koi8_ru_f,comment) VALUES ('b','LAT SMALL B'); diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result index f6e14e1a78f..aa5b4ae8189 100644 --- a/mysql-test/r/ctype_mb.result +++ b/mysql-test/r/ctype_mb.result @@ -3,17 +3,17 @@ CREATE TABLE t1 SELECT _utf8'test' as c1, _utf8'тест' as c2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) character set utf8 NOT NULL default '', - `c2` varchar(4) character set utf8 NOT NULL default '' + `c1` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '', + `c2` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DELETE FROM t1; ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(4) character set utf8 NOT NULL default '', - `c2` varchar(4) character set utf8 NOT NULL default '', - `c3` char(4) character set utf8 default NULL + `c1` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '', + `c2` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '', + `c3` char(4) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd'); Warnings: @@ -28,7 +28,7 @@ CREATE TABLE t1 (a CHAR(4) CHARACTER SET utf8, KEY key_a(a(3))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(4) character set utf8 default NULL, + `a` char(4) CHARACTER SET utf8 DEFAULT NULL, KEY `key_a` (`a`(3)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW KEYS FROM t1; @@ -38,7 +38,7 @@ ALTER TABLE t1 CHANGE a a CHAR(4); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(4) default NULL, + `a` char(4) DEFAULT NULL, KEY `key_a` (`a`(3)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW KEYS FROM t1; @@ -48,7 +48,7 @@ ALTER TABLE t1 CHANGE a a CHAR(4) CHARACTER SET utf8; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(4) character set utf8 default NULL, + `a` char(4) CHARACTER SET utf8 DEFAULT NULL, KEY `key_a` (`a`(3)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW KEYS FROM t1; diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result index 996f6fa8645..2042767c042 100644 --- a/mysql-test/r/ctype_recoding.result +++ b/mysql-test/r/ctype_recoding.result @@ -6,7 +6,7 @@ CREATE TABLE t2 (a CHAR(10) CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) character set cp1251 default NULL + `a` char(10) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT a FROM t1; a @@ -30,7 +30,7 @@ CREATE TABLE t2 (a TEXT CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text character set cp1251 + `a` text CHARACTER SET cp1251 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT HEX(a) FROM t1; HEX(a) @@ -50,7 +50,7 @@ Tables_in_test SHOW CREATE TABLE ; Table Create Table CREATE TABLE `` ( - `` char(32) character set koi8r NOT NULL COMMENT ' ' + `` char(32) CHARACTER SET koi8r NOT NULL COMMENT ' ' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=' ' SHOW FIELDS FROM ; Field Type Null Key Default Extra @@ -62,7 +62,7 @@ Tables_in_test SHOW CREATE TABLE ; Table Create Table CREATE TABLE `` ( - `` char(32) character set koi8r NOT NULL COMMENT ' ' + `` char(32) CHARACTER SET koi8r NOT NULL COMMENT ' ' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=' ' SHOW FIELDS FROM ; Field Type Null Key Default Extra @@ -74,7 +74,7 @@ Tables_in_test SHOW CREATE TABLE таблица; Table Create Table таблица CREATE TABLE `таблица` ( - `поле` char(32) character set koi8r NOT NULL COMMENT 'комментарий поля' + `поле` char(32) CHARACTER SET koi8r NOT NULL COMMENT 'комментарий поля' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='комментарий таблицы' SHOW FIELDS FROM таблица; Field Type Null Key Default Extra @@ -117,13 +117,13 @@ CREATE TABLE `тест` (`тест` int); SHOW CREATE TABLE `тест`; Table Create Table тест CREATE TABLE `тест` ( - `тест` int(11) default NULL + `тест` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SET NAMES utf8; SHOW CREATE TABLE `тест`; Table Create Table тест CREATE TABLE `тест` ( - `тест` int(11) default NULL + `тест` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE `тест`; SET NAMES binary; @@ -141,8 +141,8 @@ CREATE TABLE t1 (` SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `` char(128) default '', - `1` enum('1','2') default '2' + `` char(128) DEFAULT '', + `1` enum('1','2') DEFAULT '2' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW COLUMNS FROM t1; Field Type Null Key Default Extra @@ -152,8 +152,8 @@ SET NAMES binary; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `ä` char(128) default 'ä', - `ä1` enum('ä1','ä2') default 'ä2' + `ä` char(128) DEFAULT 'ä', + `ä1` enum('ä1','ä2') DEFAULT 'ä2' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW COLUMNS FROM t1; Field Type Null Key Default Extra diff --git a/mysql-test/r/ctype_sjis.result b/mysql-test/r/ctype_sjis.result index d1976a516d2..eaea2e7479a 100644 --- a/mysql-test/r/ctype_sjis.result +++ b/mysql-test/r/ctype_sjis.result @@ -51,7 +51,7 @@ create table t1(c enum(0x9353,0x9373) character set sjis); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` enum('S','s') character set sjis default NULL + `c` enum('S','s') CHARACTER SET sjis DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (0x9353); insert into t1 values (0x9373); diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result index b9ae25ab024..5699c044d70 100644 --- a/mysql-test/r/ctype_tis620.result +++ b/mysql-test/r/ctype_tis620.result @@ -120,7 +120,7 @@ PRIMARY KEY (recid) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `recid` int(11) NOT NULL auto_increment, + `recid` int(11) NOT NULL AUTO_INCREMENT, `dyninfo` text, PRIMARY KEY (`recid`) ) ENGINE=MyISAM DEFAULT CHARSET=tis620 diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 4f963441d55..15ff85866c1 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -74,8 +74,8 @@ RPAD(_ucs2 X'0420',10,_ucs2 X'0421') r; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `l` varchar(10) character set ucs2 NOT NULL default '', - `r` varchar(10) character set ucs2 NOT NULL default '' + `l` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '', + `r` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; create table t2(f1 Char(30)); @@ -523,7 +523,7 @@ create table t1 (a enum('x','y','z') character set ucs2); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('x','y','z') character set ucs2 default NULL + `a` enum('x','y','z') CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('x'); insert into t1 values ('y'); @@ -537,7 +537,7 @@ alter table t1 change a a enum('x','y','z','d','e',' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('x','y','z','d','e','','','') character set ucs2 default NULL + `a` enum('x','y','z','d','e','','','') CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('D'); insert into t1 values ('E '); @@ -559,7 +559,7 @@ create table t1 (a set ('x','y','z',' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` set('x','y','z','','','') character set ucs2 default NULL + `a` set('x','y','z','','','') CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('x'); insert into t1 values ('y'); diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result index fa47959579f..e1ce0fc6154 100644 --- a/mysql-test/r/ctype_ujis.result +++ b/mysql-test/r/ctype_ujis.result @@ -118,8 +118,8 @@ b enum(' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(1) NOT NULL default '', - `b` enum('','') default NULL + `a` char(1) NOT NULL DEFAULT '', + `b` enum('','') DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=ujis SHOW COLUMNS FROM t1; Field Type Null Key Default Extra diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 5fdab07e1d2..fe4dc9f1a66 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -124,7 +124,7 @@ create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d"); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varbinary(10) default NULL + `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; date_format("2004-01-19 10:10:10", "%Y-%m-%d") @@ -275,7 +275,7 @@ create table t1 (a enum('aaaa','проба') character set utf8); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('aaaa','проба') character set utf8 default NULL + `a` enum('aaaa','проба') CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('проба'); select * from t1; @@ -285,7 +285,7 @@ create table t2 select ifnull(a,a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `ifnull(a,a)` varchar(5) character set utf8 default NULL + `ifnull(a,a)` varchar(5) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t2; ifnull(a,a) @@ -411,7 +411,7 @@ unique key a using hash (c(1)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` char(10) character set utf8 default NULL, + `c` char(10) CHARACTER SET utf8 DEFAULT NULL, UNIQUE KEY `a` USING HASH (`c`(1)) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); @@ -447,7 +447,7 @@ unique key a using btree (c(1)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` char(10) character set utf8 default NULL, + `c` char(10) CHARACTER SET utf8 DEFAULT NULL, UNIQUE KEY `a` USING BTREE (`c`(1)) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); @@ -569,7 +569,7 @@ unique key a using hash (c(1)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` char(10) character set utf8 collate utf8_bin default NULL, + `c` char(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, UNIQUE KEY `a` USING HASH (`c`(1)) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); @@ -605,7 +605,7 @@ unique key a using btree (c(1)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` char(10) character set utf8 collate utf8_bin default NULL, + `c` char(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, UNIQUE KEY `a` USING BTREE (`c`(1)) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); @@ -809,8 +809,8 @@ create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(5) character set utf8 NOT NULL default '', - `b` varchar(15) character set utf8 NOT NULL default '' + `a` varchar(5) CHARACTER SET utf8 NOT NULL DEFAULT '', + `b` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; drop table t1; diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result index aef49af6c62..697b0976cee 100644 --- a/mysql-test/r/default.result +++ b/mysql-test/r/default.result @@ -67,9 +67,9 @@ ENGINE=MyISAM DEFAULT CHARACTER SET = latin1 COLLATE latin1_bin; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(30) collate latin1_bin NOT NULL default ' ', - `b` varchar(1) collate latin1_bin NOT NULL default ' ', - `c` varchar(4) collate latin1_bin NOT NULL default '0000', + `a` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ', + `b` varchar(1) COLLATE latin1_bin NOT NULL DEFAULT ' ', + `c` varchar(4) COLLATE latin1_bin NOT NULL DEFAULT '0000', `d` tinyblob, `e` tinyblob, `f` tinyblob, @@ -83,17 +83,17 @@ t2 CREATE TABLE `t2` ( `n` tinyblob, `o` tinyblob, `p` tinyblob, - `q` varchar(30) collate latin1_bin NOT NULL default ' ', - `r` varchar(30) collate latin1_bin NOT NULL default ' ', + `q` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ', + `r` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ', `s` tinyblob, - `t` varchar(4) collate latin1_bin NOT NULL default ' ', - `u` varchar(1) collate latin1_bin NOT NULL default ' ', - `v` varchar(30) collate latin1_bin NOT NULL default ' ', - `w` varchar(30) collate latin1_bin NOT NULL default ' ', + `t` varchar(4) COLLATE latin1_bin NOT NULL DEFAULT ' ', + `u` varchar(1) COLLATE latin1_bin NOT NULL DEFAULT ' ', + `v` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ', + `w` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ', `x` tinyblob, - `y` varchar(5) collate latin1_bin NOT NULL default ' ', - `z` varchar(20) collate latin1_bin NOT NULL default ' ', - `a1` varchar(30) collate latin1_bin NOT NULL default ' ', + `y` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT ' ', + `z` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT ' ', + `a1` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT ' ', `b1` tinyblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin INSERT into t2 (b) values ('1'); diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result index 7ac29568bf8..f7aa6e2bb58 100644 --- a/mysql-test/r/events.result +++ b/mysql-test/r/events.result @@ -188,22 +188,22 @@ ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin d SHOW CREATE TABLE mysql.event; Table Create Table event CREATE TABLE `event` ( - `db` char(20) character set utf8 collate utf8_bin NOT NULL default '', - `name` char(64) character set utf8 collate utf8_bin NOT NULL default '', + `db` char(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(77) character set utf8 collate utf8_bin NOT NULL default '', - `execute_at` datetime default NULL, - `interval_value` int(11) default NULL, - `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL, - `created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL default '0000-00-00 00:00:00', - `last_executed` datetime default NULL, - `starts` datetime default NULL, - `ends` datetime default NULL, - `status` enum('ENABLED','DISABLED') NOT NULL default 'ENABLED', - `on_completion` enum('DROP','PRESERVE') NOT NULL default 'DROP', - `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default '', - `comment` char(64) character set utf8 collate utf8_bin NOT NULL default '', + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', PRIMARY KEY (`definer`,`db`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result index c1e7533bcee..40cdfc9848b 100644 --- a/mysql-test/r/federated.result +++ b/mysql-test/r/federated.result @@ -78,7 +78,7 @@ SHOW CREATE TABLE federated.t2; Table Create Table t2 CREATE TABLE `t2` ( `id` int(20) NOT NULL, - `name` varchar(32) NOT NULL default '' + `name` varchar(32) NOT NULL DEFAULT '' ) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1' INSERT INTO federated.t2 (id, name) VALUES (1, 'foo'); INSERT INTO federated.t2 (id, name) VALUES (2, 'fee'); diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index ff66e9a7274..d5af37c0fec 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -248,7 +248,7 @@ t2 1 tix 1 inhalt NULL NULL NULL NULL YES FULLTEXT show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `ticket` int(11) default NULL, + `ticket` int(11) DEFAULT NULL, `inhalt` text, KEY `tig` (`ticket`), FULLTEXT KEY `tix` (`inhalt`) @@ -454,7 +454,7 @@ CREATE TABLE t1 (a VARCHAR(10000), FULLTEXT(a)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10000) default NULL, + `a` varchar(10000) DEFAULT NULL, FULLTEXT KEY `a` (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 2a36e6fe17b..33ec9d0cfcf 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -458,7 +458,7 @@ create table t2 select group_concat(a) as a from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(400) character set cp1250 default NULL + `a` varchar(400) CHARACTER SET cp1250 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select collation(group_concat(a,_koi8r'test')) from t1; collation(group_concat(a,_koi8r'test')) diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index cfa4cc0ef68..58bf3b36469 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -677,21 +677,21 @@ latin2 2 latin2 2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(1) character set latin2 default NULL + `a` char(1) CHARACTER SET latin2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t2 select max(a),min(a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `max(a)` char(1) character set latin2 default NULL, - `min(a)` char(1) character set latin2 default NULL + `max(a)` char(1) CHARACTER SET latin2 DEFAULT NULL, + `min(a)` char(1) CHARACTER SET latin2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; create table t2 select concat(a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `concat(a)` varchar(1) character set latin2 default NULL + `concat(a)` varchar(1) CHARACTER SET latin2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2,t1; create table t1 (a int); @@ -780,7 +780,7 @@ create table t2 select MAX(b) from t1 group by a; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `MAX(b)` datetime default NULL + `MAX(b)` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; create table t1(f1 datetime); diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 1507f959ae6..75a73c21958 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -156,7 +156,7 @@ create table t1 select round(1, 6); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `round(1, 6)` decimal(7,6) NOT NULL default '0.000000' + `round(1, 6)` decimal(7,6) NOT NULL DEFAULT '0.000000' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; round(1, 6) diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 36666fc827d..5e375472c5f 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -55,8 +55,8 @@ create table t1 as select uuid(), length(uuid()); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `uuid()` varchar(36) character set utf8 NOT NULL default '', - `length(uuid())` int(10) NOT NULL default '0' + `uuid()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '', + `length(uuid())` int(10) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a timestamp default '2005-05-05 01:01:01', diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index f862ee29986..46c37795531 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -719,37 +719,37 @@ Warning 1265 Data truncated for column 'format(130,10)' at row 1 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `bin(130)` varchar(64) NOT NULL default '', - `oct(130)` varchar(64) NOT NULL default '', - `conv(130,16,10)` varchar(64) NOT NULL default '', - `hex(130)` varchar(6) NOT NULL default '', - `char(130)` varbinary(1) NOT NULL default '', - `format(130,10)` varchar(4) NOT NULL default '', - `left(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '', - `right(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '', - `lcase(_latin2'a')` varchar(1) character set latin2 NOT NULL default '', - `ucase(_latin2'a')` varchar(1) character set latin2 NOT NULL default '', - `substring(_latin2'a',1,1)` varchar(1) character set latin2 NOT NULL default '', - `concat(_latin2'a',_latin2'b')` varchar(2) character set latin2 NOT NULL default '', - `lpad(_latin2'a',4,_latin2'b')` varchar(4) character set latin2 NOT NULL default '', - `rpad(_latin2'a',4,_latin2'b')` varchar(4) character set latin2 NOT NULL default '', - `concat_ws(_latin2'a',_latin2'b')` varchar(1) character set latin2 NOT NULL default '', - `make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) character set latin2 NOT NULL default '', - `export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) character set latin2 NOT NULL default '', - `trim(_latin2' a ')` varchar(3) character set latin2 NOT NULL default '', - `ltrim(_latin2' a ')` varchar(3) character set latin2 NOT NULL default '', - `rtrim(_latin2' a ')` varchar(3) character set latin2 NOT NULL default '', - `trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) character set latin2 NOT NULL default '', - `trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) character set latin2 NOT NULL default '', - `trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) character set latin2 NOT NULL default '', - `repeat(_latin2'a',10)` varchar(10) character set latin2 NOT NULL default '', - `reverse(_latin2'ab')` varchar(2) character set latin2 NOT NULL default '', - `quote(_latin2'ab')` varchar(6) character set latin2 NOT NULL default '', - `soundex(_latin2'ab')` varchar(4) character set latin2 NOT NULL default '', - `substring(_latin2'ab',1)` varchar(2) character set latin2 NOT NULL default '', - `insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) character set latin2 NOT NULL default '', - `replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) character set latin2 NOT NULL default '', - `encode('abcd','ab')` varbinary(4) NOT NULL default '' + `bin(130)` varchar(64) NOT NULL DEFAULT '', + `oct(130)` varchar(64) NOT NULL DEFAULT '', + `conv(130,16,10)` varchar(64) NOT NULL DEFAULT '', + `hex(130)` varchar(6) NOT NULL DEFAULT '', + `char(130)` varbinary(1) NOT NULL DEFAULT '', + `format(130,10)` varchar(4) NOT NULL DEFAULT '', + `left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', + `right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', + `lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', + `ucase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', + `substring(_latin2'a',1,1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', + `concat(_latin2'a',_latin2'b')` varchar(2) CHARACTER SET latin2 NOT NULL DEFAULT '', + `lpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '', + `rpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '', + `concat_ws(_latin2'a',_latin2'b')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '', + `make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) CHARACTER SET latin2 NOT NULL DEFAULT '', + `export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) CHARACTER SET latin2 NOT NULL DEFAULT '', + `trim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '', + `ltrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '', + `rtrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '', + `trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '', + `trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '', + `trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '', + `repeat(_latin2'a',10)` varchar(10) CHARACTER SET latin2 NOT NULL DEFAULT '', + `reverse(_latin2'ab')` varchar(2) CHARACTER SET latin2 NOT NULL DEFAULT '', + `quote(_latin2'ab')` varchar(6) CHARACTER SET latin2 NOT NULL DEFAULT '', + `soundex(_latin2'ab')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '', + `substring(_latin2'ab',1)` varchar(2) CHARACTER SET latin2 NOT NULL DEFAULT '', + `insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) CHARACTER SET latin2 NOT NULL DEFAULT '', + `replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '', + `encode('abcd','ab')` varbinary(4) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a char character set latin2); diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result index 1c1c6dff21e..9871de0f27c 100644 --- a/mysql-test/r/func_system.result +++ b/mysql-test/r/func_system.result @@ -46,9 +46,9 @@ create table t1 (version char(40)) select database(), user(), version() as 'vers show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `database()` varchar(34) character set utf8 default NULL, - `user()` varchar(77) character set utf8 NOT NULL default '', - `version` char(40) default NULL + `database()` varchar(34) CHARACTER SET utf8 DEFAULT NULL, + `user()` varchar(77) CHARACTER SET utf8 NOT NULL DEFAULT '', + `version` char(40) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select charset(charset(_utf8'a')), charset(collation(_utf8'a')); @@ -61,8 +61,8 @@ create table t1 select charset(_utf8'a'), collation(_utf8'a'); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `charset(_utf8'a')` varchar(64) character set utf8 NOT NULL default '', - `collation(_utf8'a')` varchar(64) character set utf8 NOT NULL default '' + `charset(_utf8'a')` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT '', + `collation(_utf8'a')` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select TRUE,FALSE,NULL; diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index 02bd421e19a..bf4a10a0041 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -7,7 +7,7 @@ SPATIAL KEY(g) SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `fid` int(11) NOT NULL auto_increment, + `fid` int(11) NOT NULL AUTO_INCREMENT, `g` geometry NOT NULL, PRIMARY KEY (`fid`), SPATIAL KEY `g` (`g`(32)) @@ -290,7 +290,7 @@ ALTER TABLE t2 ADD SPATIAL KEY(g); SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `fid` int(11) NOT NULL auto_increment, + `fid` int(11) NOT NULL AUTO_INCREMENT, `g` geometry NOT NULL, PRIMARY KEY (`fid`), SPATIAL KEY `g` (`g`(32)) diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result index 8fb09922eb8..5a2d07db5e6 100644 --- a/mysql-test/r/heap.result +++ b/mysql-test/r/heap.result @@ -263,41 +263,41 @@ concat('*',v,'*',c,'*',t,'*') show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, - `t` varchar(50) default NULL + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` varchar(50) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 create table t2 like t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, - `t` varchar(50) default NULL + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` varchar(50) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 create table t3 select * from t1; show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, - `t` varchar(50) default NULL + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` varchar(50) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 alter table t1 modify c varchar(10); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` varchar(10) default NULL, - `t` varchar(50) default NULL + `v` varchar(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, + `t` varchar(50) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 alter table t1 modify v char(10); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) default NULL, - `c` varchar(10) default NULL, - `t` varchar(50) default NULL + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, + `t` varchar(50) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 alter table t1 modify t varchar(10); Warnings: @@ -305,9 +305,9 @@ Warning 1265 Data truncated for column 't' at row 2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) default NULL, - `c` varchar(10) default NULL, - `t` varchar(10) default NULL + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, + `t` varchar(10) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') @@ -318,9 +318,9 @@ create table t1 (v varchar(10), c char(10), t varchar(50), key(v), key(c), key(t show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, - `t` varchar(50) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` varchar(50) DEFAULT NULL, KEY `v` (`v`), KEY `c` (`c`), KEY `t` (`t`(10)) @@ -553,9 +553,9 @@ create table t1 (v varchar(10), c char(10), t varchar(50), key using btree (v), show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, - `t` varchar(50) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` varchar(50) DEFAULT NULL, KEY `v` USING BTREE (`v`), KEY `c` USING BTREE (`c`), KEY `t` USING BTREE (`t`(10)) @@ -644,9 +644,9 @@ create table t1 (v varchar(10), c char(10), t varchar(50), key(v(5)), key(c(5)), show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, - `t` varchar(50) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, + `t` varchar(50) DEFAULT NULL, KEY `v` (`v`(5)), KEY `c` (`c`(5)), KEY `t` (`t`(5)) @@ -656,7 +656,7 @@ create table t1 (v varchar(65530), key(v(10))); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(65530) default NULL, + `v` varchar(65530) DEFAULT NULL, KEY `v` (`v`(10)) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 insert into t1 values(repeat('a',65530)); diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result index 8e39a6d9375..b20e66a1098 100644 --- a/mysql-test/r/index_merge_innodb.result +++ b/mysql-test/r/index_merge_innodb.result @@ -244,8 +244,8 @@ t1 CREATE TABLE `t1` ( `t_vers` varchar(4) NOT NULL, `t_rele` varchar(2) NOT NULL, `t_cust` varchar(4) NOT NULL, - `filler1` char(250) default NULL, - `filler2` char(250) default NULL, + `filler1` char(250) DEFAULT NULL, + `filler2` char(250) DEFAULT NULL, PRIMARY KEY (`t_cpac`,`t_vers`,`t_rele`,`t_cust`), UNIQUE KEY `IX_4` (`t_cust`,`t_cpac`,`t_vers`,`t_rele`), KEY `IX_5` (`t_vers`,`t_rele`,`t_cust`) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index cd9092061b6..02718b89619 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -433,7 +433,7 @@ alter table t1 add constraint constraint_2 unique key_2(a); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`a`), UNIQUE KEY `constraint_1` (`a`), UNIQUE KEY `key_1` (`a`), @@ -506,19 +506,19 @@ drop table t1; SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; Table Create Table CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', - `DESCRIPTION` varchar(60) NOT NULL default '', - `MAXLEN` bigint(3) NOT NULL default '0' + `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '', + `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '', + `DESCRIPTION` varchar(60) NOT NULL DEFAULT '', + `MAXLEN` bigint(3) NOT NULL DEFAULT '0' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 set names latin2; SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; Table Create Table CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', - `DESCRIPTION` varchar(60) NOT NULL default '', - `MAXLEN` bigint(3) NOT NULL default '0' + `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '', + `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '', + `DESCRIPTION` varchar(60) NOT NULL DEFAULT '', + `MAXLEN` bigint(3) NOT NULL DEFAULT '0' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 set names latin1; create table t1 select * from information_schema.CHARACTER_SETS @@ -530,10 +530,10 @@ alter table t1 default character set utf8; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', - `DESCRIPTION` varchar(60) NOT NULL default '', - `MAXLEN` bigint(3) NOT NULL default '0' + `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '', + `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '', + `DESCRIPTION` varchar(60) NOT NULL DEFAULT '', + `MAXLEN` bigint(3) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 drop table t1; create view v1 as select * from information_schema.TABLES; diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index b4162cfb497..67820e289ab 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -856,7 +856,7 @@ create table t1 (a char(20), index (a(5))) engine=innodb; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(20) default NULL, + `a` char(20) DEFAULT NULL, KEY `a` (`a`(5)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1; @@ -1587,7 +1587,7 @@ create table t2 (id int(11) not null auto_increment, id2 int(11) not null, const show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL auto_increment, + `id` int(11) NOT NULL AUTO_INCREMENT, `id2` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `id` (`id`,`id2`), @@ -1598,7 +1598,7 @@ create table t2 (id int(11) not null auto_increment, id2 int(11) not null, const show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL auto_increment, + `id` int(11) NOT NULL AUTO_INCREMENT, `id2` int(11) NOT NULL, KEY `t1_id_fk` (`id`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) @@ -1607,7 +1607,7 @@ alter table t2 add index id_test (id), add index id_test2 (id,id2); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL auto_increment, + `id` int(11) NOT NULL AUTO_INCREMENT, `id2` int(11) NOT NULL, KEY `id_test` (`id`), KEY `id_test2` (`id`,`id2`), @@ -1620,8 +1620,8 @@ create table t2 (a int auto_increment primary key, b int, index(b), foreign key show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` int(11) NOT NULL auto_increment, - `b` int(11) default NULL, + `a` int(11) NOT NULL AUTO_INCREMENT, + `b` int(11) DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b_2` (`b`), KEY `b` (`b`), @@ -1632,8 +1632,8 @@ create table t2 (a int auto_increment primary key, b int, foreign key (b) refere show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` int(11) NOT NULL auto_increment, - `b` int(11) default NULL, + `a` int(11) NOT NULL AUTO_INCREMENT, + `b` int(11) DEFAULT NULL, PRIMARY KEY (`a`), UNIQUE KEY `b` (`b`), CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`), @@ -1843,40 +1843,40 @@ concat('*',v,'*',c,'*',t,'*') show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1 create table t2 like t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1 create table t3 select * from t1; show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1 alter table t1 modify c varchar(10); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` varchar(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, `t` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1 alter table t1 modify v char(10); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) default NULL, - `c` varchar(10) default NULL, + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, `t` text ) ENGINE=InnoDB DEFAULT CHARSET=latin1 alter table t1 modify t varchar(10); @@ -1885,9 +1885,9 @@ Note 1265 Data truncated for column 't' at row 2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) default NULL, - `c` varchar(10) default NULL, - `t` varchar(10) default NULL + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, + `t` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') @@ -1898,8 +1898,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10))); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `v` (`v`), KEY `c` (`c`), @@ -2117,8 +2117,8 @@ alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(300) default NULL, - `c` char(10) default NULL, + `v` varchar(300) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), @@ -2197,8 +2197,8 @@ alter table t1 drop key v, add key v (v(30)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(300) default NULL, - `c` char(10) default NULL, + `v` varchar(300) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), @@ -2277,8 +2277,8 @@ alter table t1 modify v varchar(600), drop key v, add key v (v); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(600) default NULL, - `c` char(10) default NULL, + `v` varchar(600) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), @@ -2355,8 +2355,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t( show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `v` (`v`(5)), KEY `c` (`c`(5)), @@ -2367,15 +2367,15 @@ create table t1 (v char(10) character set utf8); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) character set utf8 default NULL + `v` char(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1; create table t1 (v varchar(10), c char(10)) row_format=fixed; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED insert into t1 values('a','a'),('a ','a '); select concat('*',v,'*',c,'*') from t1; @@ -2417,7 +2417,7 @@ Note 1246 Converting column 'v' from VARCHAR to TEXT show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` mediumtext character set utf8 + `v` mediumtext CHARACTER SET utf8 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1; set storage_engine=MyISAM; @@ -2544,8 +2544,8 @@ character set = latin1 engine = innodb; show create table t9; Table Create Table t9 CREATE TABLE `t9` ( - `col1` varchar(512) default NULL, - `col2` varchar(512) default NULL, + `col1` varchar(512) DEFAULT NULL, + `col2` varchar(512) DEFAULT NULL, KEY `col1` (`col1`,`col2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1, t2, t3, t4, t5, t6, t7, t8, t9; @@ -2568,7 +2568,7 @@ Warning 1071 Specified key was too long; max key length is 767 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `col1` varchar(768) default NULL, + `col1` varchar(768) DEFAULT NULL, KEY `col1` (`col1`(767)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1, t2, t3, t4; diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index 826a17cb60d..849c67019ad 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -11,8 +11,8 @@ CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY); SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) DEFAULT NULL, + `g` point DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index c84747a5fee..68174774531 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -242,8 +242,8 @@ create table t1 (c varchar(30) character set utf8, t text character set utf8, un show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` varchar(30) character set utf8 default NULL, - `t` text character set utf8, + `c` varchar(30) CHARACTER SET utf8 DEFAULT NULL, + `t` text CHARACTER SET utf8, UNIQUE KEY `c` (`c`(2)), UNIQUE KEY `t` (`t`(3)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -350,24 +350,24 @@ create table t1 (a varchar(10), b varchar(10), key(a(10),b(10))); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) default NULL, - `b` varchar(10) default NULL, + `a` varchar(10) DEFAULT NULL, + `b` varchar(10) DEFAULT NULL, KEY `a` (`a`,`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 modify b varchar(20); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) default NULL, - `b` varchar(20) default NULL, + `a` varchar(10) DEFAULT NULL, + `b` varchar(20) DEFAULT NULL, KEY `a` (`a`,`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 modify a varchar(20); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(20) default NULL, - `b` varchar(20) default NULL, + `a` varchar(20) DEFAULT NULL, + `b` varchar(20) DEFAULT NULL, KEY `a` (`a`,`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -412,10 +412,10 @@ index (c2, c4)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` int(11) default NULL, - `c2` char(12) NOT NULL default '', - `c3` varchar(123) NOT NULL default '', - `c4` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `c1` int(11) DEFAULT NULL, + `c2` char(12) NOT NULL DEFAULT '', + `c3` varchar(123) NOT NULL DEFAULT '', + `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`c2`,`c3`), UNIQUE KEY `i4` (`c4`), KEY `c1` (`c1`), @@ -445,10 +445,10 @@ ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL default '0', - `c2` char(12) NOT NULL default '', - `c3` varchar(123) NOT NULL default '', - `c4` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `c1` int(11) NOT NULL DEFAULT '0', + `c2` char(12) NOT NULL DEFAULT '', + `c3` varchar(123) NOT NULL DEFAULT '', + `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, KEY `i1` (`c1`), KEY `i5` (`c1`,`c2`,`c3`,`c4`), KEY `c1` (`c1`), diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index c700de5ccc6..561c430417b 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -173,7 +173,7 @@ show create table t3; Table Create Table t3 CREATE TABLE `t3` ( `a` int(11) NOT NULL, - `b` char(20) default NULL, + `b` char(20) DEFAULT NULL, KEY `a` (`a`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2); @@ -191,7 +191,7 @@ show create table t5; Table Create Table t5 CREATE TABLE `t5` ( `a` int(11) NOT NULL, - `b` char(20) default NULL, + `b` char(20) DEFAULT NULL, KEY `a` (`a`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`mysqltest`.`t6`) alter table t5 engine=myisam; @@ -314,14 +314,14 @@ show create table t5; Table Create Table t5 CREATE TABLE `t5` ( `a` int(11) NOT NULL, - `b` int(11) NOT NULL auto_increment, + `b` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`a`,`b`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`) show create table t6; Table Create Table t6 CREATE TABLE `t6` ( `a` int(11) NOT NULL, - `b` int(11) NOT NULL auto_increment, + `b` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`a`,`b`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`) insert into t1 values (1,NULL),(1,NULL),(1,NULL),(1,NULL); diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 5ae27943dd9..ded84700439 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -746,40 +746,40 @@ concat('*',v,'*',c,'*',t,'*') show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t2 like t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t3 select * from t1; show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 modify c varchar(10); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` varchar(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, `t` text ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 modify v char(10); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) default NULL, - `c` varchar(10) default NULL, + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, `t` text ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 modify t varchar(10); @@ -788,9 +788,9 @@ Note 1265 Data truncated for column 't' at row 2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) default NULL, - `c` varchar(10) default NULL, - `t` varchar(10) default NULL + `v` char(10) DEFAULT NULL, + `c` varchar(10) DEFAULT NULL, + `t` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select concat('*',v,'*',c,'*',t,'*') from t1; concat('*',v,'*',c,'*',t,'*') @@ -801,8 +801,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10))); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `v` (`v`), KEY `c` (`c`), @@ -1020,8 +1020,8 @@ alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(300) default NULL, - `c` char(10) default NULL, + `v` varchar(300) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), @@ -1100,8 +1100,8 @@ alter table t1 drop key v, add key v (v(30)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(300) default NULL, - `c` char(10) default NULL, + `v` varchar(300) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), @@ -1180,8 +1180,8 @@ alter table t1 modify v varchar(600), drop key v, add key v (v); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(600) default NULL, - `c` char(10) default NULL, + `v` varchar(600) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), @@ -1258,8 +1258,8 @@ create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t( show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL, + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL, `t` text, KEY `v` (`v`(5)), KEY `c` (`c`(5)), @@ -1270,15 +1270,15 @@ create table t1 (v char(10) character set utf8); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` char(10) character set utf8 default NULL + `v` char(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (v varchar(10), c char(10)) row_format=fixed; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(10) default NULL, - `c` char(10) default NULL + `v` varchar(10) DEFAULT NULL, + `c` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED insert into t1 values('a','a'),('a ','a '); select concat('*',v,'*',c,'*') from t1; @@ -1320,7 +1320,7 @@ Note 1246 Converting column 'v' from VARCHAR to TEXT show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` mediumtext character set utf8 + `v` mediumtext CHARACTER SET utf8 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (v varchar(65535)); diff --git a/mysql-test/r/mysqldump-max.result b/mysql-test/r/mysqldump-max.result index 39d607910aa..a7d8bf6c0a3 100644 --- a/mysql-test/r/mysqldump-max.result +++ b/mysql-test/r/mysqldump-max.result @@ -111,8 +111,8 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -121,8 +121,8 @@ INSERT DELAYED IGNORE INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,' /*!40000 ALTER TABLE `t1` ENABLE KEYS */; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -131,8 +131,8 @@ INSERT DELAYED IGNORE INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,' /*!40000 ALTER TABLE `t2` ENABLE KEYS */; DROP TABLE IF EXISTS `t3`; CREATE TABLE `t3` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; @@ -141,8 +141,8 @@ INSERT DELAYED IGNORE INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,' /*!40000 ALTER TABLE `t3` ENABLE KEYS */; DROP TABLE IF EXISTS `t4`; CREATE TABLE `t4` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; @@ -151,8 +151,8 @@ INSERT DELAYED IGNORE INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,' /*!40000 ALTER TABLE `t4` ENABLE KEYS */; DROP TABLE IF EXISTS `t5`; CREATE TABLE `t5` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1; @@ -161,8 +161,8 @@ INSERT DELAYED IGNORE INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,' /*!40000 ALTER TABLE `t5` ENABLE KEYS */; DROP TABLE IF EXISTS `t6`; CREATE TABLE `t6` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -196,8 +196,8 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -206,8 +206,8 @@ INSERT DELAYED INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,'first v /*!40000 ALTER TABLE `t1` ENABLE KEYS */; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -216,8 +216,8 @@ INSERT DELAYED INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,'first v /*!40000 ALTER TABLE `t2` ENABLE KEYS */; DROP TABLE IF EXISTS `t3`; CREATE TABLE `t3` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; @@ -226,8 +226,8 @@ INSERT DELAYED INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,'first v /*!40000 ALTER TABLE `t3` ENABLE KEYS */; DROP TABLE IF EXISTS `t4`; CREATE TABLE `t4` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; @@ -236,8 +236,8 @@ INSERT DELAYED INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,'first v /*!40000 ALTER TABLE `t4` ENABLE KEYS */; DROP TABLE IF EXISTS `t5`; CREATE TABLE `t5` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1; @@ -246,8 +246,8 @@ INSERT DELAYED INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,'first v /*!40000 ALTER TABLE `t5` ENABLE KEYS */; DROP TABLE IF EXISTS `t6`; CREATE TABLE `t6` ( - `id` int(8) default NULL, - `name` varchar(32) default NULL + `id` int(8) DEFAULT NULL, + `name` varchar(32) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 2a0d1d7da78..73f676b6b69 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -26,7 +26,7 @@ CREATE TABLE t1 (a decimal(64, 20)); INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), ("0987654321098765432109876543210987654321"); CREATE TABLE `t1` ( - `a` decimal(64,20) default NULL + `a` decimal(64,20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000'); DROP TABLE t1; @@ -35,7 +35,7 @@ INSERT INTO t1 VALUES ('-9e999999'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 CREATE TABLE `t1` ( - `a` double default NULL + `a` double DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `t1` VALUES (RES); DROP TABLE t1; @@ -50,13 +50,13 @@ INSERT INTO t1 VALUES ("1.2345", 2.3456); ERROR 42S22: Unknown column '1.2345' in 'field list' SET SQL_MODE=@OLD_SQL_MODE; CREATE TABLE `t1` ( - `a` decimal(10,5) default NULL, - `b` float default NULL + `a` decimal(10,5) DEFAULT NULL, + `b` float DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); CREATE TABLE `t1` ( - `a` decimal(10,5) default NULL, - `b` float default NULL + `a` decimal(10,5) DEFAULT NULL, + `b` float DEFAULT NULL ); INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); @@ -72,8 +72,8 @@ INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456) /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` decimal(10,5) default NULL, - `b` float default NULL + `a` decimal(10,5) DEFAULT NULL, + `b` float DEFAULT NULL ); @@ -99,8 +99,8 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; CREATE TABLE `t1` ( - `a` decimal(10,5) default NULL, - `b` float default NULL + `a` decimal(10,5) DEFAULT NULL, + `b` float DEFAULT NULL ); INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); @@ -171,7 +171,7 @@ INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` varchar(255) default NULL + `a` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=koi8r; @@ -202,7 +202,7 @@ INSERT INTO t1 VALUES (1), (2); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) TYPE=MyISAM; @@ -226,7 +226,7 @@ UNLOCK TABLES; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) TYPE=MyISAM; @@ -245,7 +245,7 @@ UNLOCK TABLES; DROP TABLE t1; create table ```a` (i int); CREATE TABLE ```a` ( - `i` int(11) default NULL + `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; drop table ```a`; create table t1(a int); @@ -262,7 +262,7 @@ create table t1(a int); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -288,7 +288,7 @@ UNLOCK TABLES; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS "t1"; CREATE TABLE "t1" ( - "a" int(11) default NULL + "a" int(11) DEFAULT NULL ); @@ -317,7 +317,7 @@ set global sql_mode='ANSI_QUOTES'; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -343,7 +343,7 @@ UNLOCK TABLES; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS "t1"; CREATE TABLE "t1" ( - "a" int(11) default NULL + "a" int(11) DEFAULT NULL ); @@ -373,7 +373,7 @@ insert into t1 values (1),(2),(3); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -455,7 +455,7 @@ INSERT INTO t1 VALUES (_latin1 ' /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -482,7 +482,7 @@ UNLOCK TABLES; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) TYPE=MyISAM; @@ -506,7 +506,7 @@ UNLOCK TABLES; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) TYPE=MyISAM; @@ -530,7 +530,7 @@ UNLOCK TABLES; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) TYPE=MyISAM; @@ -564,7 +564,7 @@ INSERT INTO t2 VALUES (4),(5),(6); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -636,7 +636,7 @@ INSERT INTO t1 VALUES (4),(5),(6); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -668,7 +668,7 @@ UNLOCK TABLES; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1031,336 +1031,336 @@ insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `F_c4ca4238a0b923820dcc509a6f75849b` int(11) default NULL, - `F_c81e728d9d4c2f636f067f89cc14862c` int(11) default NULL, - `F_eccbc87e4b5ce2fe28308fd9f2a7baf3` int(11) default NULL, - `F_a87ff679a2f3e71d9181a67b7542122c` int(11) default NULL, - `F_e4da3b7fbbce2345d7772b0674a318d5` int(11) default NULL, - `F_1679091c5a880faf6fb5e6087eb1b2dc` int(11) default NULL, - `F_8f14e45fceea167a5a36dedd4bea2543` int(11) default NULL, - `F_c9f0f895fb98ab9159f51fd0297e236d` int(11) default NULL, - `F_45c48cce2e2d7fbdea1afc51c7c6ad26` int(11) default NULL, - `F_d3d9446802a44259755d38e6d163e820` int(11) default NULL, - `F_6512bd43d9caa6e02c990b0a82652dca` int(11) default NULL, - `F_c20ad4d76fe97759aa27a0c99bff6710` int(11) default NULL, - `F_c51ce410c124a10e0db5e4b97fc2af39` int(11) default NULL, - `F_aab3238922bcc25a6f606eb525ffdc56` int(11) default NULL, - `F_9bf31c7ff062936a96d3c8bd1f8f2ff3` int(11) default NULL, - `F_c74d97b01eae257e44aa9d5bade97baf` int(11) default NULL, - `F_70efdf2ec9b086079795c442636b55fb` int(11) default NULL, - `F_6f4922f45568161a8cdf4ad2299f6d23` int(11) default NULL, - `F_1f0e3dad99908345f7439f8ffabdffc4` int(11) default NULL, - `F_98f13708210194c475687be6106a3b84` int(11) default NULL, - `F_3c59dc048e8850243be8079a5c74d079` int(11) default NULL, - `F_b6d767d2f8ed5d21a44b0e5886680cb9` int(11) default NULL, - `F_37693cfc748049e45d87b8c7d8b9aacd` int(11) default NULL, - `F_1ff1de774005f8da13f42943881c655f` int(11) default NULL, - `F_8e296a067a37563370ded05f5a3bf3ec` int(11) default NULL, - `F_4e732ced3463d06de0ca9a15b6153677` int(11) default NULL, - `F_02e74f10e0327ad868d138f2b4fdd6f0` int(11) default NULL, - `F_33e75ff09dd601bbe69f351039152189` int(11) default NULL, - `F_6ea9ab1baa0efb9e19094440c317e21b` int(11) default NULL, - `F_34173cb38f07f89ddbebc2ac9128303f` int(11) default NULL, - `F_c16a5320fa475530d9583c34fd356ef5` int(11) default NULL, - `F_6364d3f0f495b6ab9dcf8d3b5c6e0b01` int(11) default NULL, - `F_182be0c5cdcd5072bb1864cdee4d3d6e` int(11) default NULL, - `F_e369853df766fa44e1ed0ff613f563bd` int(11) default NULL, - `F_1c383cd30b7c298ab50293adfecb7b18` int(11) default NULL, - `F_19ca14e7ea6328a42e0eb13d585e4c22` int(11) default NULL, - `F_a5bfc9e07964f8dddeb95fc584cd965d` int(11) default NULL, - `F_a5771bce93e200c36f7cd9dfd0e5deaa` int(11) default NULL, - `F_d67d8ab4f4c10bf22aa353e27879133c` int(11) default NULL, - `F_d645920e395fedad7bbbed0eca3fe2e0` int(11) default NULL, - `F_3416a75f4cea9109507cacd8e2f2aefc` int(11) default NULL, - `F_a1d0c6e83f027327d8461063f4ac58a6` int(11) default NULL, - `F_17e62166fc8586dfa4d1bc0e1742c08b` int(11) default NULL, - `F_f7177163c833dff4b38fc8d2872f1ec6` int(11) default NULL, - `F_6c8349cc7260ae62e3b1396831a8398f` int(11) default NULL, - `F_d9d4f495e875a2e075a1a4a6e1b9770f` int(11) default NULL, - `F_67c6a1e7ce56d3d6fa748ab6d9af3fd7` int(11) default NULL, - `F_642e92efb79421734881b53e1e1b18b6` int(11) default NULL, - `F_f457c545a9ded88f18ecee47145a72c0` int(11) default NULL, - `F_c0c7c76d30bd3dcaefc96f40275bdc0a` int(11) default NULL, - `F_2838023a778dfaecdc212708f721b788` int(11) default NULL, - `F_9a1158154dfa42caddbd0694a4e9bdc8` int(11) default NULL, - `F_d82c8d1619ad8176d665453cfb2e55f0` int(11) default NULL, - `F_a684eceee76fc522773286a895bc8436` int(11) default NULL, - `F_b53b3a3d6ab90ce0268229151c9bde11` int(11) default NULL, - `F_9f61408e3afb633e50cdf1b20de6f466` int(11) default NULL, - `F_72b32a1f754ba1c09b3695e0cb6cde7f` int(11) default NULL, - `F_66f041e16a60928b05a7e228a89c3799` int(11) default NULL, - `F_093f65e080a295f8076b1c5722a46aa2` int(11) default NULL, - `F_072b030ba126b2f4b2374f342be9ed44` int(11) default NULL, - `F_7f39f8317fbdb1988ef4c628eba02591` int(11) default NULL, - `F_44f683a84163b3523afe57c2e008bc8c` int(11) default NULL, - `F_03afdbd66e7929b125f8597834fa83a4` int(11) default NULL, - `F_ea5d2f1c4608232e07d3aa3d998e5135` int(11) default NULL, - `F_fc490ca45c00b1249bbe3554a4fdf6fb` int(11) default NULL, - `F_3295c76acbf4caaed33c36b1b5fc2cb1` int(11) default NULL, - `F_735b90b4568125ed6c3f678819b6e058` int(11) default NULL, - `F_a3f390d88e4c41f2747bfa2f1b5f87db` int(11) default NULL, - `F_14bfa6bb14875e45bba028a21ed38046` int(11) default NULL, - `F_7cbbc409ec990f19c78c75bd1e06f215` int(11) default NULL, - `F_e2c420d928d4bf8ce0ff2ec19b371514` int(11) default NULL, - `F_32bb90e8976aab5298d5da10fe66f21d` int(11) default NULL, - `F_d2ddea18f00665ce8623e36bd4e3c7c5` int(11) default NULL, - `F_ad61ab143223efbc24c7d2583be69251` int(11) default NULL, - `F_d09bf41544a3365a46c9077ebb5e35c3` int(11) default NULL, - `F_fbd7939d674997cdb4692d34de8633c4` int(11) default NULL, - `F_28dd2c7955ce926456240b2ff0100bde` int(11) default NULL, - `F_35f4a8d465e6e1edc05f3d8ab658c551` int(11) default NULL, - `F_d1fe173d08e959397adf34b1d77e88d7` int(11) default NULL, - `F_f033ab37c30201f73f142449d037028d` int(11) default NULL, - `F_43ec517d68b6edd3015b3edc9a11367b` int(11) default NULL, - `F_9778d5d219c5080b9a6a17bef029331c` int(11) default NULL, - `F_fe9fc289c3ff0af142b6d3bead98a923` int(11) default NULL, - `F_68d30a9594728bc39aa24be94b319d21` int(11) default NULL, - `F_3ef815416f775098fe977004015c6193` int(11) default NULL, - `F_93db85ed909c13838ff95ccfa94cebd9` int(11) default NULL, - `F_c7e1249ffc03eb9ded908c236bd1996d` int(11) default NULL, - `F_2a38a4a9316c49e5a833517c45d31070` int(11) default NULL, - `F_7647966b7343c29048673252e490f736` int(11) default NULL, - `F_8613985ec49eb8f757ae6439e879bb2a` int(11) default NULL, - `F_54229abfcfa5649e7003b83dd4755294` int(11) default NULL, - `F_92cc227532d17e56e07902b254dfad10` int(11) default NULL, - `F_98dce83da57b0395e163467c9dae521b` int(11) default NULL, - `F_f4b9ec30ad9f68f89b29639786cb62ef` int(11) default NULL, - `F_812b4ba287f5ee0bc9d43bbf5bbe87fb` int(11) default NULL, - `F_26657d5ff9020d2abefe558796b99584` int(11) default NULL, - `F_e2ef524fbf3d9fe611d5a8e90fefdc9c` int(11) default NULL, - `F_ed3d2c21991e3bef5e069713af9fa6ca` int(11) default NULL, - `F_ac627ab1ccbdb62ec96e702f07f6425b` int(11) default NULL, - `F_f899139df5e1059396431415e770c6dd` int(11) default NULL, - `F_38b3eff8baf56627478ec76a704e9b52` int(11) default NULL, - `F_ec8956637a99787bd197eacd77acce5e` int(11) default NULL, - `F_6974ce5ac660610b44d9b9fed0ff9548` int(11) default NULL, - `F_c9e1074f5b3f9fc8ea15d152add07294` int(11) default NULL, - `F_65b9eea6e1cc6bb9f0cd2a47751a186f` int(11) default NULL, - `F_f0935e4cd5920aa6c7c996a5ee53a70f` int(11) default NULL, - `F_a97da629b098b75c294dffdc3e463904` int(11) default NULL, - `F_a3c65c2974270fd093ee8a9bf8ae7d0b` int(11) default NULL, - `F_2723d092b63885e0d7c260cc007e8b9d` int(11) default NULL, - `F_5f93f983524def3dca464469d2cf9f3e` int(11) default NULL, - `F_698d51a19d8a121ce581499d7b701668` int(11) default NULL, - `F_7f6ffaa6bb0b408017b62254211691b5` int(11) default NULL, - `F_73278a4a86960eeb576a8fd4c9ec6997` int(11) default NULL, - `F_5fd0b37cd7dbbb00f97ba6ce92bf5add` int(11) default NULL, - `F_2b44928ae11fb9384c4cf38708677c48` int(11) default NULL, - `F_c45147dee729311ef5b5c3003946c48f` int(11) default NULL, - `F_eb160de1de89d9058fcb0b968dbbbd68` int(11) default NULL, - `F_5ef059938ba799aaa845e1c2e8a762bd` int(11) default NULL, - `F_07e1cd7dca89a1678042477183b7ac3f` int(11) default NULL, - `F_da4fb5c6e93e74d3df8527599fa62642` int(11) default NULL, - `F_4c56ff4ce4aaf9573aa5dff913df997a` int(11) default NULL, - `F_a0a080f42e6f13b3a2df133f073095dd` int(11) default NULL, - `F_202cb962ac59075b964b07152d234b70` int(11) default NULL, - `F_c8ffe9a587b126f152ed3d89a146b445` int(11) default NULL, - `F_3def184ad8f4755ff269862ea77393dd` int(11) default NULL, - `F_069059b7ef840f0c74a814ec9237b6ec` int(11) default NULL, - `F_ec5decca5ed3d6b8079e2e7e7bacc9f2` int(11) default NULL, - `F_76dc611d6ebaafc66cc0879c71b5db5c` int(11) default NULL, - `F_d1f491a404d6854880943e5c3cd9ca25` int(11) default NULL, - `F_9b8619251a19057cff70779273e95aa6` int(11) default NULL, - `F_1afa34a7f984eeabdbb0a7d494132ee5` int(11) default NULL, - `F_65ded5353c5ee48d0b7d48c591b8f430` int(11) default NULL, - `F_9fc3d7152ba9336a670e36d0ed79bc43` int(11) default NULL, - `F_02522a2b2726fb0a03bb19f2d8d9524d` int(11) default NULL, - `F_7f1de29e6da19d22b51c68001e7e0e54` int(11) default NULL, - `F_42a0e188f5033bc65bf8d78622277c4e` int(11) default NULL, - `F_3988c7f88ebcb58c6ce932b957b6f332` int(11) default NULL, - `F_013d407166ec4fa56eb1e1f8cbe183b9` int(11) default NULL, - `F_e00da03b685a0dd18fb6a08af0923de0` int(11) default NULL, - `F_1385974ed5904a438616ff7bdb3f7439` int(11) default NULL, - `F_0f28b5d49b3020afeecd95b4009adf4c` int(11) default NULL, - `F_a8baa56554f96369ab93e4f3bb068c22` int(11) default NULL, - `F_903ce9225fca3e988c2af215d4e544d3` int(11) default NULL, - `F_0a09c8844ba8f0936c20bd791130d6b6` int(11) default NULL, - `F_2b24d495052a8ce66358eb576b8912c8` int(11) default NULL, - `F_a5e00132373a7031000fd987a3c9f87b` int(11) default NULL, - `F_8d5e957f297893487bd98fa830fa6413` int(11) default NULL, - `F_47d1e990583c9c67424d369f3414728e` int(11) default NULL, - `F_f2217062e9a397a1dca429e7d70bc6ca` int(11) default NULL, - `F_7ef605fc8dba5425d6965fbd4c8fbe1f` int(11) default NULL, - `F_a8f15eda80c50adb0e71943adc8015cf` int(11) default NULL, - `F_37a749d808e46495a8da1e5352d03cae` int(11) default NULL, - `F_b3e3e393c77e35a4a3f3cbd1e429b5dc` int(11) default NULL, - `F_1d7f7abc18fcb43975065399b0d1e48e` int(11) default NULL, - `F_2a79ea27c279e471f4d180b08d62b00a` int(11) default NULL, - `F_1c9ac0159c94d8d0cbedc973445af2da` int(11) default NULL, - `F_6c4b761a28b734fe93831e3fb400ce87` int(11) default NULL, - `F_06409663226af2f3114485aa4e0a23b4` int(11) default NULL, - `F_140f6969d5213fd0ece03148e62e461e` int(11) default NULL, - `F_b73ce398c39f506af761d2277d853a92` int(11) default NULL, - `F_bd4c9ab730f5513206b999ec0d90d1fb` int(11) default NULL, - `F_82aa4b0af34c2313a562076992e50aa3` int(11) default NULL, - `F_0777d5c17d4066b82ab86dff8a46af6f` int(11) default NULL, - `F_fa7cdfad1a5aaf8370ebeda47a1ff1c3` int(11) default NULL, - `F_9766527f2b5d3e95d4a733fcfb77bd7e` int(11) default NULL, - `F_7e7757b1e12abcb736ab9a754ffb617a` int(11) default NULL, - `F_5878a7ab84fb43402106c575658472fa` int(11) default NULL, - `F_006f52e9102a8d3be2fe5614f42ba989` int(11) default NULL, - `F_3636638817772e42b59d74cff571fbb3` int(11) default NULL, - `F_149e9677a5989fd342ae44213df68868` int(11) default NULL, - `F_a4a042cf4fd6bfb47701cbc8a1653ada` int(11) default NULL, - `F_1ff8a7b5dc7a7d1f0ed65aaa29c04b1e` int(11) default NULL, - `F_f7e6c85504ce6e82442c770f7c8606f0` int(11) default NULL, - `F_bf8229696f7a3bb4700cfddef19fa23f` int(11) default NULL, - `F_82161242827b703e6acf9c726942a1e4` int(11) default NULL, - `F_38af86134b65d0f10fe33d30dd76442e` int(11) default NULL, - `F_96da2f590cd7246bbde0051047b0d6f7` int(11) default NULL, - `F_8f85517967795eeef66c225f7883bdcb` int(11) default NULL, - `F_8f53295a73878494e9bc8dd6c3c7104f` int(11) default NULL, - `F_045117b0e0a11a242b9765e79cbf113f` int(11) default NULL, - `F_fc221309746013ac554571fbd180e1c8` int(11) default NULL, - `F_4c5bde74a8f110656874902f07378009` int(11) default NULL, - `F_cedebb6e872f539bef8c3f919874e9d7` int(11) default NULL, - `F_6cdd60ea0045eb7a6ec44c54d29ed402` int(11) default NULL, - `F_eecca5b6365d9607ee5a9d336962c534` int(11) default NULL, - `F_9872ed9fc22fc182d371c3e9ed316094` int(11) default NULL, - `F_31fefc0e570cb3860f2a6d4b38c6490d` int(11) default NULL, - `F_9dcb88e0137649590b755372b040afad` int(11) default NULL, - `F_a2557a7b2e94197ff767970b67041697` int(11) default NULL, - `F_cfecdb276f634854f3ef915e2e980c31` int(11) default NULL, - `F_0aa1883c6411f7873cb83dacb17b0afc` int(11) default NULL, - `F_58a2fc6ed39fd083f55d4182bf88826d` int(11) default NULL, - `F_bd686fd640be98efaae0091fa301e613` int(11) default NULL, - `F_a597e50502f5ff68e3e25b9114205d4a` int(11) default NULL, - `F_0336dcbab05b9d5ad24f4333c7658a0e` int(11) default NULL, - `F_084b6fbb10729ed4da8c3d3f5a3ae7c9` int(11) default NULL, - `F_85d8ce590ad8981ca2c8286f79f59954` int(11) default NULL, - `F_0e65972dce68dad4d52d063967f0a705` int(11) default NULL, - `F_84d9ee44e457ddef7f2c4f25dc8fa865` int(11) default NULL, - `F_3644a684f98ea8fe223c713b77189a77` int(11) default NULL, - `F_757b505cfd34c64c85ca5b5690ee5293` int(11) default NULL, - `F_854d6fae5ee42911677c739ee1734486` int(11) default NULL, - `F_e2c0be24560d78c5e599c2a9c9d0bbd2` int(11) default NULL, - `F_274ad4786c3abca69fa097b85867d9a4` int(11) default NULL, - `F_eae27d77ca20db309e056e3d2dcd7d69` int(11) default NULL, - `F_7eabe3a1649ffa2b3ff8c02ebfd5659f` int(11) default NULL, - `F_69adc1e107f7f7d035d7baf04342e1ca` int(11) default NULL, - `F_091d584fced301b442654dd8c23b3fc9` int(11) default NULL, - `F_b1d10e7bafa4421218a51b1e1f1b0ba2` int(11) default NULL, - `F_6f3ef77ac0e3619e98159e9b6febf557` int(11) default NULL, - `F_eb163727917cbba1eea208541a643e74` int(11) default NULL, - `F_1534b76d325a8f591b52d302e7181331` int(11) default NULL, - `F_979d472a84804b9f647bc185a877a8b5` int(11) default NULL, - `F_ca46c1b9512a7a8315fa3c5a946e8265` int(11) default NULL, - `F_3b8a614226a953a8cd9526fca6fe9ba5` int(11) default NULL, - `F_45fbc6d3e05ebd93369ce542e8f2322d` int(11) default NULL, - `F_63dc7ed1010d3c3b8269faf0ba7491d4` int(11) default NULL, - `F_e96ed478dab8595a7dbda4cbcbee168f` int(11) default NULL, - `F_c0e190d8267e36708f955d7ab048990d` int(11) default NULL, - `F_ec8ce6abb3e952a85b8551ba726a1227` int(11) default NULL, - `F_060ad92489947d410d897474079c1477` int(11) default NULL, - `F_bcbe3365e6ac95ea2c0343a2395834dd` int(11) default NULL, - `F_115f89503138416a242f40fb7d7f338e` int(11) default NULL, - `F_13fe9d84310e77f13a6d184dbf1232f3` int(11) default NULL, - `F_d1c38a09acc34845c6be3a127a5aacaf` int(11) default NULL, - `F_9cfdf10e8fc047a44b08ed031e1f0ed1` int(11) default NULL, - `F_705f2172834666788607efbfca35afb3` int(11) default NULL, - `F_74db120f0a8e5646ef5a30154e9f6deb` int(11) default NULL, - `F_57aeee35c98205091e18d1140e9f38cf` int(11) default NULL, - `F_6da9003b743b65f4c0ccd295cc484e57` int(11) default NULL, - `F_9b04d152845ec0a378394003c96da594` int(11) default NULL, - `F_be83ab3ecd0db773eb2dc1b0a17836a1` int(11) default NULL, - `F_e165421110ba03099a1c0393373c5b43` int(11) default NULL, - `F_289dff07669d7a23de0ef88d2f7129e7` int(11) default NULL, - `F_577ef1154f3240ad5b9b413aa7346a1e` int(11) default NULL, - `F_01161aaa0b6d1345dd8fe4e481144d84` int(11) default NULL, - `F_539fd53b59e3bb12d203f45a912eeaf2` int(11) default NULL, - `F_ac1dd209cbcc5e5d1c6e28598e8cbbe8` int(11) default NULL, - `F_555d6702c950ecb729a966504af0a635` int(11) default NULL, - `F_335f5352088d7d9bf74191e006d8e24c` int(11) default NULL, - `F_f340f1b1f65b6df5b5e3f94d95b11daf` int(11) default NULL, - `F_e4a6222cdb5b34375400904f03d8e6a5` int(11) default NULL, - `F_cb70ab375662576bd1ac5aaf16b3fca4` int(11) default NULL, - `F_9188905e74c28e489b44e954ec0b9bca` int(11) default NULL, - `F_0266e33d3f546cb5436a10798e657d97` int(11) default NULL, - `F_38db3aed920cf82ab059bfccbd02be6a` int(11) default NULL, - `F_3cec07e9ba5f5bb252d13f5f431e4bbb` int(11) default NULL, - `F_621bf66ddb7c962aa0d22ac97d69b793` int(11) default NULL, - `F_077e29b11be80ab57e1a2ecabb7da330` int(11) default NULL, - `F_6c9882bbac1c7093bd25041881277658` int(11) default NULL, - `F_19f3cd308f1455b3fa09a282e0d496f4` int(11) default NULL, - `F_03c6b06952c750899bb03d998e631860` int(11) default NULL, - `F_c24cd76e1ce41366a4bbe8a49b02a028` int(11) default NULL, - `F_c52f1bd66cc19d05628bd8bf27af3ad6` int(11) default NULL, - `F_fe131d7f5a6b38b23cc967316c13dae2` int(11) default NULL, - `F_f718499c1c8cef6730f9fd03c8125cab` int(11) default NULL, - `F_d96409bf894217686ba124d7356686c9` int(11) default NULL, - `F_502e4a16930e414107ee22b6198c578f` int(11) default NULL, - `F_cfa0860e83a4c3a763a7e62d825349f7` int(11) default NULL, - `F_a4f23670e1833f3fdb077ca70bbd5d66` int(11) default NULL, - `F_b1a59b315fc9a3002ce38bbe070ec3f5` int(11) default NULL, - `F_36660e59856b4de58a219bcf4e27eba3` int(11) default NULL, - `F_8c19f571e251e61cb8dd3612f26d5ecf` int(11) default NULL, - `F_d6baf65e0b240ce177cf70da146c8dc8` int(11) default NULL, - `F_e56954b4f6347e897f954495eab16a88` int(11) default NULL, - `F_f7664060cc52bc6f3d620bcedc94a4b6` int(11) default NULL, - `F_eda80a3d5b344bc40f3bc04f65b7a357` int(11) default NULL, - `F_8f121ce07d74717e0b1f21d122e04521` int(11) default NULL, - `F_06138bc5af6023646ede0e1f7c1eac75` int(11) default NULL, - `F_39059724f73a9969845dfe4146c5660e` int(11) default NULL, - `F_7f100b7b36092fb9b06dfb4fac360931` int(11) default NULL, - `F_7a614fd06c325499f1680b9896beedeb` int(11) default NULL, - `F_4734ba6f3de83d861c3176a6273cac6d` int(11) default NULL, - `F_d947bf06a885db0d477d707121934ff8` int(11) default NULL, - `F_63923f49e5241343aa7acb6a06a751e7` int(11) default NULL, - `F_db8e1af0cb3aca1ae2d0018624204529` int(11) default NULL, - `F_20f07591c6fcb220ffe637cda29bb3f6` int(11) default NULL, - `F_07cdfd23373b17c6b337251c22b7ea57` int(11) default NULL, - `F_d395771085aab05244a4fb8fd91bf4ee` int(11) default NULL, - `F_92c8c96e4c37100777c7190b76d28233` int(11) default NULL, - `F_e3796ae838835da0b6f6ea37bcf8bcb7` int(11) default NULL, - `F_6a9aeddfc689c1d0e3b9ccc3ab651bc5` int(11) default NULL, - `F_0f49c89d1e7298bb9930789c8ed59d48` int(11) default NULL, - `F_46ba9f2a6976570b0353203ec4474217` int(11) default NULL, - `F_0e01938fc48a2cfb5f2217fbfb00722d` int(11) default NULL, - `F_16a5cdae362b8d27a1d8f8c7b78b4330` int(11) default NULL, - `F_918317b57931b6b7a7d29490fe5ec9f9` int(11) default NULL, - `F_48aedb8880cab8c45637abc7493ecddd` int(11) default NULL, - `F_839ab46820b524afda05122893c2fe8e` int(11) default NULL, - `F_f90f2aca5c640289d0a29417bcb63a37` int(11) default NULL, - `F_9c838d2e45b2ad1094d42f4ef36764f6` int(11) default NULL, - `F_1700002963a49da13542e0726b7bb758` int(11) default NULL, - `F_53c3bce66e43be4f209556518c2fcb54` int(11) default NULL, - `F_6883966fd8f918a4aa29be29d2c386fb` int(11) default NULL, - `F_49182f81e6a13cf5eaa496d51fea6406` int(11) default NULL, - `F_d296c101daa88a51f6ca8cfc1ac79b50` int(11) default NULL, - `F_9fd81843ad7f202f26c1a174c7357585` int(11) default NULL, - `F_26e359e83860db1d11b6acca57d8ea88` int(11) default NULL, - `F_ef0d3930a7b6c95bd2b32ed45989c61f` int(11) default NULL, - `F_94f6d7e04a4d452035300f18b984988c` int(11) default NULL, - `F_34ed066df378efacc9b924ec161e7639` int(11) default NULL, - `F_577bcc914f9e55d5e4e4f82f9f00e7d4` int(11) default NULL, - `F_11b9842e0a271ff252c1903e7132cd68` int(11) default NULL, - `F_37bc2f75bf1bcfe8450a1a41c200364c` int(11) default NULL, - `F_496e05e1aea0a9c4655800e8a7b9ea28` int(11) default NULL, - `F_b2eb7349035754953b57a32e2841bda5` int(11) default NULL, - `F_8e98d81f8217304975ccb23337bb5761` int(11) default NULL, - `F_a8c88a0055f636e4a163a5e3d16adab7` int(11) default NULL, - `F_eddea82ad2755b24c4e168c5fc2ebd40` int(11) default NULL, - `F_06eb61b839a0cefee4967c67ccb099dc` int(11) default NULL, - `F_9dfcd5e558dfa04aaf37f137a1d9d3e5` int(11) default NULL, - `F_950a4152c2b4aa3ad78bdd6b366cc179` int(11) default NULL, - `F_158f3069a435b314a80bdcb024f8e422` int(11) default NULL, - `F_758874998f5bd0c393da094e1967a72b` int(11) default NULL, - `F_ad13a2a07ca4b7642959dc0c4c740ab6` int(11) default NULL, - `F_3fe94a002317b5f9259f82690aeea4cd` int(11) default NULL, - `F_5b8add2a5d98b1a652ea7fd72d942dac` int(11) default NULL, - `F_432aca3a1e345e339f35a30c8f65edce` int(11) default NULL, - `F_8d3bba7425e7c98c50f52ca1b52d3735` int(11) default NULL, - `F_320722549d1751cf3f247855f937b982` int(11) default NULL, - `F_caf1a3dfb505ffed0d024130f58c5cfa` int(11) default NULL, - `F_5737c6ec2e0716f3d8a7a5c4e0de0d9a` int(11) default NULL, - `F_bc6dc48b743dc5d013b1abaebd2faed2` int(11) default NULL, - `F_f2fc990265c712c49d51a18a32b39f0c` int(11) default NULL, - `F_89f0fd5c927d466d6ec9a21b9ac34ffa` int(11) default NULL, - `F_a666587afda6e89aec274a3657558a27` int(11) default NULL, - `F_b83aac23b9528732c23cc7352950e880` int(11) default NULL, - `F_cd00692c3bfe59267d5ecfac5310286c` int(11) default NULL, - `F_6faa8040da20ef399b63a72d0e4ab575` int(11) default NULL, - `F_fe73f687e5bc5280214e0486b273a5f9` int(11) default NULL + `F_c4ca4238a0b923820dcc509a6f75849b` int(11) DEFAULT NULL, + `F_c81e728d9d4c2f636f067f89cc14862c` int(11) DEFAULT NULL, + `F_eccbc87e4b5ce2fe28308fd9f2a7baf3` int(11) DEFAULT NULL, + `F_a87ff679a2f3e71d9181a67b7542122c` int(11) DEFAULT NULL, + `F_e4da3b7fbbce2345d7772b0674a318d5` int(11) DEFAULT NULL, + `F_1679091c5a880faf6fb5e6087eb1b2dc` int(11) DEFAULT NULL, + `F_8f14e45fceea167a5a36dedd4bea2543` int(11) DEFAULT NULL, + `F_c9f0f895fb98ab9159f51fd0297e236d` int(11) DEFAULT NULL, + `F_45c48cce2e2d7fbdea1afc51c7c6ad26` int(11) DEFAULT NULL, + `F_d3d9446802a44259755d38e6d163e820` int(11) DEFAULT NULL, + `F_6512bd43d9caa6e02c990b0a82652dca` int(11) DEFAULT NULL, + `F_c20ad4d76fe97759aa27a0c99bff6710` int(11) DEFAULT NULL, + `F_c51ce410c124a10e0db5e4b97fc2af39` int(11) DEFAULT NULL, + `F_aab3238922bcc25a6f606eb525ffdc56` int(11) DEFAULT NULL, + `F_9bf31c7ff062936a96d3c8bd1f8f2ff3` int(11) DEFAULT NULL, + `F_c74d97b01eae257e44aa9d5bade97baf` int(11) DEFAULT NULL, + `F_70efdf2ec9b086079795c442636b55fb` int(11) DEFAULT NULL, + `F_6f4922f45568161a8cdf4ad2299f6d23` int(11) DEFAULT NULL, + `F_1f0e3dad99908345f7439f8ffabdffc4` int(11) DEFAULT NULL, + `F_98f13708210194c475687be6106a3b84` int(11) DEFAULT NULL, + `F_3c59dc048e8850243be8079a5c74d079` int(11) DEFAULT NULL, + `F_b6d767d2f8ed5d21a44b0e5886680cb9` int(11) DEFAULT NULL, + `F_37693cfc748049e45d87b8c7d8b9aacd` int(11) DEFAULT NULL, + `F_1ff1de774005f8da13f42943881c655f` int(11) DEFAULT NULL, + `F_8e296a067a37563370ded05f5a3bf3ec` int(11) DEFAULT NULL, + `F_4e732ced3463d06de0ca9a15b6153677` int(11) DEFAULT NULL, + `F_02e74f10e0327ad868d138f2b4fdd6f0` int(11) DEFAULT NULL, + `F_33e75ff09dd601bbe69f351039152189` int(11) DEFAULT NULL, + `F_6ea9ab1baa0efb9e19094440c317e21b` int(11) DEFAULT NULL, + `F_34173cb38f07f89ddbebc2ac9128303f` int(11) DEFAULT NULL, + `F_c16a5320fa475530d9583c34fd356ef5` int(11) DEFAULT NULL, + `F_6364d3f0f495b6ab9dcf8d3b5c6e0b01` int(11) DEFAULT NULL, + `F_182be0c5cdcd5072bb1864cdee4d3d6e` int(11) DEFAULT NULL, + `F_e369853df766fa44e1ed0ff613f563bd` int(11) DEFAULT NULL, + `F_1c383cd30b7c298ab50293adfecb7b18` int(11) DEFAULT NULL, + `F_19ca14e7ea6328a42e0eb13d585e4c22` int(11) DEFAULT NULL, + `F_a5bfc9e07964f8dddeb95fc584cd965d` int(11) DEFAULT NULL, + `F_a5771bce93e200c36f7cd9dfd0e5deaa` int(11) DEFAULT NULL, + `F_d67d8ab4f4c10bf22aa353e27879133c` int(11) DEFAULT NULL, + `F_d645920e395fedad7bbbed0eca3fe2e0` int(11) DEFAULT NULL, + `F_3416a75f4cea9109507cacd8e2f2aefc` int(11) DEFAULT NULL, + `F_a1d0c6e83f027327d8461063f4ac58a6` int(11) DEFAULT NULL, + `F_17e62166fc8586dfa4d1bc0e1742c08b` int(11) DEFAULT NULL, + `F_f7177163c833dff4b38fc8d2872f1ec6` int(11) DEFAULT NULL, + `F_6c8349cc7260ae62e3b1396831a8398f` int(11) DEFAULT NULL, + `F_d9d4f495e875a2e075a1a4a6e1b9770f` int(11) DEFAULT NULL, + `F_67c6a1e7ce56d3d6fa748ab6d9af3fd7` int(11) DEFAULT NULL, + `F_642e92efb79421734881b53e1e1b18b6` int(11) DEFAULT NULL, + `F_f457c545a9ded88f18ecee47145a72c0` int(11) DEFAULT NULL, + `F_c0c7c76d30bd3dcaefc96f40275bdc0a` int(11) DEFAULT NULL, + `F_2838023a778dfaecdc212708f721b788` int(11) DEFAULT NULL, + `F_9a1158154dfa42caddbd0694a4e9bdc8` int(11) DEFAULT NULL, + `F_d82c8d1619ad8176d665453cfb2e55f0` int(11) DEFAULT NULL, + `F_a684eceee76fc522773286a895bc8436` int(11) DEFAULT NULL, + `F_b53b3a3d6ab90ce0268229151c9bde11` int(11) DEFAULT NULL, + `F_9f61408e3afb633e50cdf1b20de6f466` int(11) DEFAULT NULL, + `F_72b32a1f754ba1c09b3695e0cb6cde7f` int(11) DEFAULT NULL, + `F_66f041e16a60928b05a7e228a89c3799` int(11) DEFAULT NULL, + `F_093f65e080a295f8076b1c5722a46aa2` int(11) DEFAULT NULL, + `F_072b030ba126b2f4b2374f342be9ed44` int(11) DEFAULT NULL, + `F_7f39f8317fbdb1988ef4c628eba02591` int(11) DEFAULT NULL, + `F_44f683a84163b3523afe57c2e008bc8c` int(11) DEFAULT NULL, + `F_03afdbd66e7929b125f8597834fa83a4` int(11) DEFAULT NULL, + `F_ea5d2f1c4608232e07d3aa3d998e5135` int(11) DEFAULT NULL, + `F_fc490ca45c00b1249bbe3554a4fdf6fb` int(11) DEFAULT NULL, + `F_3295c76acbf4caaed33c36b1b5fc2cb1` int(11) DEFAULT NULL, + `F_735b90b4568125ed6c3f678819b6e058` int(11) DEFAULT NULL, + `F_a3f390d88e4c41f2747bfa2f1b5f87db` int(11) DEFAULT NULL, + `F_14bfa6bb14875e45bba028a21ed38046` int(11) DEFAULT NULL, + `F_7cbbc409ec990f19c78c75bd1e06f215` int(11) DEFAULT NULL, + `F_e2c420d928d4bf8ce0ff2ec19b371514` int(11) DEFAULT NULL, + `F_32bb90e8976aab5298d5da10fe66f21d` int(11) DEFAULT NULL, + `F_d2ddea18f00665ce8623e36bd4e3c7c5` int(11) DEFAULT NULL, + `F_ad61ab143223efbc24c7d2583be69251` int(11) DEFAULT NULL, + `F_d09bf41544a3365a46c9077ebb5e35c3` int(11) DEFAULT NULL, + `F_fbd7939d674997cdb4692d34de8633c4` int(11) DEFAULT NULL, + `F_28dd2c7955ce926456240b2ff0100bde` int(11) DEFAULT NULL, + `F_35f4a8d465e6e1edc05f3d8ab658c551` int(11) DEFAULT NULL, + `F_d1fe173d08e959397adf34b1d77e88d7` int(11) DEFAULT NULL, + `F_f033ab37c30201f73f142449d037028d` int(11) DEFAULT NULL, + `F_43ec517d68b6edd3015b3edc9a11367b` int(11) DEFAULT NULL, + `F_9778d5d219c5080b9a6a17bef029331c` int(11) DEFAULT NULL, + `F_fe9fc289c3ff0af142b6d3bead98a923` int(11) DEFAULT NULL, + `F_68d30a9594728bc39aa24be94b319d21` int(11) DEFAULT NULL, + `F_3ef815416f775098fe977004015c6193` int(11) DEFAULT NULL, + `F_93db85ed909c13838ff95ccfa94cebd9` int(11) DEFAULT NULL, + `F_c7e1249ffc03eb9ded908c236bd1996d` int(11) DEFAULT NULL, + `F_2a38a4a9316c49e5a833517c45d31070` int(11) DEFAULT NULL, + `F_7647966b7343c29048673252e490f736` int(11) DEFAULT NULL, + `F_8613985ec49eb8f757ae6439e879bb2a` int(11) DEFAULT NULL, + `F_54229abfcfa5649e7003b83dd4755294` int(11) DEFAULT NULL, + `F_92cc227532d17e56e07902b254dfad10` int(11) DEFAULT NULL, + `F_98dce83da57b0395e163467c9dae521b` int(11) DEFAULT NULL, + `F_f4b9ec30ad9f68f89b29639786cb62ef` int(11) DEFAULT NULL, + `F_812b4ba287f5ee0bc9d43bbf5bbe87fb` int(11) DEFAULT NULL, + `F_26657d5ff9020d2abefe558796b99584` int(11) DEFAULT NULL, + `F_e2ef524fbf3d9fe611d5a8e90fefdc9c` int(11) DEFAULT NULL, + `F_ed3d2c21991e3bef5e069713af9fa6ca` int(11) DEFAULT NULL, + `F_ac627ab1ccbdb62ec96e702f07f6425b` int(11) DEFAULT NULL, + `F_f899139df5e1059396431415e770c6dd` int(11) DEFAULT NULL, + `F_38b3eff8baf56627478ec76a704e9b52` int(11) DEFAULT NULL, + `F_ec8956637a99787bd197eacd77acce5e` int(11) DEFAULT NULL, + `F_6974ce5ac660610b44d9b9fed0ff9548` int(11) DEFAULT NULL, + `F_c9e1074f5b3f9fc8ea15d152add07294` int(11) DEFAULT NULL, + `F_65b9eea6e1cc6bb9f0cd2a47751a186f` int(11) DEFAULT NULL, + `F_f0935e4cd5920aa6c7c996a5ee53a70f` int(11) DEFAULT NULL, + `F_a97da629b098b75c294dffdc3e463904` int(11) DEFAULT NULL, + `F_a3c65c2974270fd093ee8a9bf8ae7d0b` int(11) DEFAULT NULL, + `F_2723d092b63885e0d7c260cc007e8b9d` int(11) DEFAULT NULL, + `F_5f93f983524def3dca464469d2cf9f3e` int(11) DEFAULT NULL, + `F_698d51a19d8a121ce581499d7b701668` int(11) DEFAULT NULL, + `F_7f6ffaa6bb0b408017b62254211691b5` int(11) DEFAULT NULL, + `F_73278a4a86960eeb576a8fd4c9ec6997` int(11) DEFAULT NULL, + `F_5fd0b37cd7dbbb00f97ba6ce92bf5add` int(11) DEFAULT NULL, + `F_2b44928ae11fb9384c4cf38708677c48` int(11) DEFAULT NULL, + `F_c45147dee729311ef5b5c3003946c48f` int(11) DEFAULT NULL, + `F_eb160de1de89d9058fcb0b968dbbbd68` int(11) DEFAULT NULL, + `F_5ef059938ba799aaa845e1c2e8a762bd` int(11) DEFAULT NULL, + `F_07e1cd7dca89a1678042477183b7ac3f` int(11) DEFAULT NULL, + `F_da4fb5c6e93e74d3df8527599fa62642` int(11) DEFAULT NULL, + `F_4c56ff4ce4aaf9573aa5dff913df997a` int(11) DEFAULT NULL, + `F_a0a080f42e6f13b3a2df133f073095dd` int(11) DEFAULT NULL, + `F_202cb962ac59075b964b07152d234b70` int(11) DEFAULT NULL, + `F_c8ffe9a587b126f152ed3d89a146b445` int(11) DEFAULT NULL, + `F_3def184ad8f4755ff269862ea77393dd` int(11) DEFAULT NULL, + `F_069059b7ef840f0c74a814ec9237b6ec` int(11) DEFAULT NULL, + `F_ec5decca5ed3d6b8079e2e7e7bacc9f2` int(11) DEFAULT NULL, + `F_76dc611d6ebaafc66cc0879c71b5db5c` int(11) DEFAULT NULL, + `F_d1f491a404d6854880943e5c3cd9ca25` int(11) DEFAULT NULL, + `F_9b8619251a19057cff70779273e95aa6` int(11) DEFAULT NULL, + `F_1afa34a7f984eeabdbb0a7d494132ee5` int(11) DEFAULT NULL, + `F_65ded5353c5ee48d0b7d48c591b8f430` int(11) DEFAULT NULL, + `F_9fc3d7152ba9336a670e36d0ed79bc43` int(11) DEFAULT NULL, + `F_02522a2b2726fb0a03bb19f2d8d9524d` int(11) DEFAULT NULL, + `F_7f1de29e6da19d22b51c68001e7e0e54` int(11) DEFAULT NULL, + `F_42a0e188f5033bc65bf8d78622277c4e` int(11) DEFAULT NULL, + `F_3988c7f88ebcb58c6ce932b957b6f332` int(11) DEFAULT NULL, + `F_013d407166ec4fa56eb1e1f8cbe183b9` int(11) DEFAULT NULL, + `F_e00da03b685a0dd18fb6a08af0923de0` int(11) DEFAULT NULL, + `F_1385974ed5904a438616ff7bdb3f7439` int(11) DEFAULT NULL, + `F_0f28b5d49b3020afeecd95b4009adf4c` int(11) DEFAULT NULL, + `F_a8baa56554f96369ab93e4f3bb068c22` int(11) DEFAULT NULL, + `F_903ce9225fca3e988c2af215d4e544d3` int(11) DEFAULT NULL, + `F_0a09c8844ba8f0936c20bd791130d6b6` int(11) DEFAULT NULL, + `F_2b24d495052a8ce66358eb576b8912c8` int(11) DEFAULT NULL, + `F_a5e00132373a7031000fd987a3c9f87b` int(11) DEFAULT NULL, + `F_8d5e957f297893487bd98fa830fa6413` int(11) DEFAULT NULL, + `F_47d1e990583c9c67424d369f3414728e` int(11) DEFAULT NULL, + `F_f2217062e9a397a1dca429e7d70bc6ca` int(11) DEFAULT NULL, + `F_7ef605fc8dba5425d6965fbd4c8fbe1f` int(11) DEFAULT NULL, + `F_a8f15eda80c50adb0e71943adc8015cf` int(11) DEFAULT NULL, + `F_37a749d808e46495a8da1e5352d03cae` int(11) DEFAULT NULL, + `F_b3e3e393c77e35a4a3f3cbd1e429b5dc` int(11) DEFAULT NULL, + `F_1d7f7abc18fcb43975065399b0d1e48e` int(11) DEFAULT NULL, + `F_2a79ea27c279e471f4d180b08d62b00a` int(11) DEFAULT NULL, + `F_1c9ac0159c94d8d0cbedc973445af2da` int(11) DEFAULT NULL, + `F_6c4b761a28b734fe93831e3fb400ce87` int(11) DEFAULT NULL, + `F_06409663226af2f3114485aa4e0a23b4` int(11) DEFAULT NULL, + `F_140f6969d5213fd0ece03148e62e461e` int(11) DEFAULT NULL, + `F_b73ce398c39f506af761d2277d853a92` int(11) DEFAULT NULL, + `F_bd4c9ab730f5513206b999ec0d90d1fb` int(11) DEFAULT NULL, + `F_82aa4b0af34c2313a562076992e50aa3` int(11) DEFAULT NULL, + `F_0777d5c17d4066b82ab86dff8a46af6f` int(11) DEFAULT NULL, + `F_fa7cdfad1a5aaf8370ebeda47a1ff1c3` int(11) DEFAULT NULL, + `F_9766527f2b5d3e95d4a733fcfb77bd7e` int(11) DEFAULT NULL, + `F_7e7757b1e12abcb736ab9a754ffb617a` int(11) DEFAULT NULL, + `F_5878a7ab84fb43402106c575658472fa` int(11) DEFAULT NULL, + `F_006f52e9102a8d3be2fe5614f42ba989` int(11) DEFAULT NULL, + `F_3636638817772e42b59d74cff571fbb3` int(11) DEFAULT NULL, + `F_149e9677a5989fd342ae44213df68868` int(11) DEFAULT NULL, + `F_a4a042cf4fd6bfb47701cbc8a1653ada` int(11) DEFAULT NULL, + `F_1ff8a7b5dc7a7d1f0ed65aaa29c04b1e` int(11) DEFAULT NULL, + `F_f7e6c85504ce6e82442c770f7c8606f0` int(11) DEFAULT NULL, + `F_bf8229696f7a3bb4700cfddef19fa23f` int(11) DEFAULT NULL, + `F_82161242827b703e6acf9c726942a1e4` int(11) DEFAULT NULL, + `F_38af86134b65d0f10fe33d30dd76442e` int(11) DEFAULT NULL, + `F_96da2f590cd7246bbde0051047b0d6f7` int(11) DEFAULT NULL, + `F_8f85517967795eeef66c225f7883bdcb` int(11) DEFAULT NULL, + `F_8f53295a73878494e9bc8dd6c3c7104f` int(11) DEFAULT NULL, + `F_045117b0e0a11a242b9765e79cbf113f` int(11) DEFAULT NULL, + `F_fc221309746013ac554571fbd180e1c8` int(11) DEFAULT NULL, + `F_4c5bde74a8f110656874902f07378009` int(11) DEFAULT NULL, + `F_cedebb6e872f539bef8c3f919874e9d7` int(11) DEFAULT NULL, + `F_6cdd60ea0045eb7a6ec44c54d29ed402` int(11) DEFAULT NULL, + `F_eecca5b6365d9607ee5a9d336962c534` int(11) DEFAULT NULL, + `F_9872ed9fc22fc182d371c3e9ed316094` int(11) DEFAULT NULL, + `F_31fefc0e570cb3860f2a6d4b38c6490d` int(11) DEFAULT NULL, + `F_9dcb88e0137649590b755372b040afad` int(11) DEFAULT NULL, + `F_a2557a7b2e94197ff767970b67041697` int(11) DEFAULT NULL, + `F_cfecdb276f634854f3ef915e2e980c31` int(11) DEFAULT NULL, + `F_0aa1883c6411f7873cb83dacb17b0afc` int(11) DEFAULT NULL, + `F_58a2fc6ed39fd083f55d4182bf88826d` int(11) DEFAULT NULL, + `F_bd686fd640be98efaae0091fa301e613` int(11) DEFAULT NULL, + `F_a597e50502f5ff68e3e25b9114205d4a` int(11) DEFAULT NULL, + `F_0336dcbab05b9d5ad24f4333c7658a0e` int(11) DEFAULT NULL, + `F_084b6fbb10729ed4da8c3d3f5a3ae7c9` int(11) DEFAULT NULL, + `F_85d8ce590ad8981ca2c8286f79f59954` int(11) DEFAULT NULL, + `F_0e65972dce68dad4d52d063967f0a705` int(11) DEFAULT NULL, + `F_84d9ee44e457ddef7f2c4f25dc8fa865` int(11) DEFAULT NULL, + `F_3644a684f98ea8fe223c713b77189a77` int(11) DEFAULT NULL, + `F_757b505cfd34c64c85ca5b5690ee5293` int(11) DEFAULT NULL, + `F_854d6fae5ee42911677c739ee1734486` int(11) DEFAULT NULL, + `F_e2c0be24560d78c5e599c2a9c9d0bbd2` int(11) DEFAULT NULL, + `F_274ad4786c3abca69fa097b85867d9a4` int(11) DEFAULT NULL, + `F_eae27d77ca20db309e056e3d2dcd7d69` int(11) DEFAULT NULL, + `F_7eabe3a1649ffa2b3ff8c02ebfd5659f` int(11) DEFAULT NULL, + `F_69adc1e107f7f7d035d7baf04342e1ca` int(11) DEFAULT NULL, + `F_091d584fced301b442654dd8c23b3fc9` int(11) DEFAULT NULL, + `F_b1d10e7bafa4421218a51b1e1f1b0ba2` int(11) DEFAULT NULL, + `F_6f3ef77ac0e3619e98159e9b6febf557` int(11) DEFAULT NULL, + `F_eb163727917cbba1eea208541a643e74` int(11) DEFAULT NULL, + `F_1534b76d325a8f591b52d302e7181331` int(11) DEFAULT NULL, + `F_979d472a84804b9f647bc185a877a8b5` int(11) DEFAULT NULL, + `F_ca46c1b9512a7a8315fa3c5a946e8265` int(11) DEFAULT NULL, + `F_3b8a614226a953a8cd9526fca6fe9ba5` int(11) DEFAULT NULL, + `F_45fbc6d3e05ebd93369ce542e8f2322d` int(11) DEFAULT NULL, + `F_63dc7ed1010d3c3b8269faf0ba7491d4` int(11) DEFAULT NULL, + `F_e96ed478dab8595a7dbda4cbcbee168f` int(11) DEFAULT NULL, + `F_c0e190d8267e36708f955d7ab048990d` int(11) DEFAULT NULL, + `F_ec8ce6abb3e952a85b8551ba726a1227` int(11) DEFAULT NULL, + `F_060ad92489947d410d897474079c1477` int(11) DEFAULT NULL, + `F_bcbe3365e6ac95ea2c0343a2395834dd` int(11) DEFAULT NULL, + `F_115f89503138416a242f40fb7d7f338e` int(11) DEFAULT NULL, + `F_13fe9d84310e77f13a6d184dbf1232f3` int(11) DEFAULT NULL, + `F_d1c38a09acc34845c6be3a127a5aacaf` int(11) DEFAULT NULL, + `F_9cfdf10e8fc047a44b08ed031e1f0ed1` int(11) DEFAULT NULL, + `F_705f2172834666788607efbfca35afb3` int(11) DEFAULT NULL, + `F_74db120f0a8e5646ef5a30154e9f6deb` int(11) DEFAULT NULL, + `F_57aeee35c98205091e18d1140e9f38cf` int(11) DEFAULT NULL, + `F_6da9003b743b65f4c0ccd295cc484e57` int(11) DEFAULT NULL, + `F_9b04d152845ec0a378394003c96da594` int(11) DEFAULT NULL, + `F_be83ab3ecd0db773eb2dc1b0a17836a1` int(11) DEFAULT NULL, + `F_e165421110ba03099a1c0393373c5b43` int(11) DEFAULT NULL, + `F_289dff07669d7a23de0ef88d2f7129e7` int(11) DEFAULT NULL, + `F_577ef1154f3240ad5b9b413aa7346a1e` int(11) DEFAULT NULL, + `F_01161aaa0b6d1345dd8fe4e481144d84` int(11) DEFAULT NULL, + `F_539fd53b59e3bb12d203f45a912eeaf2` int(11) DEFAULT NULL, + `F_ac1dd209cbcc5e5d1c6e28598e8cbbe8` int(11) DEFAULT NULL, + `F_555d6702c950ecb729a966504af0a635` int(11) DEFAULT NULL, + `F_335f5352088d7d9bf74191e006d8e24c` int(11) DEFAULT NULL, + `F_f340f1b1f65b6df5b5e3f94d95b11daf` int(11) DEFAULT NULL, + `F_e4a6222cdb5b34375400904f03d8e6a5` int(11) DEFAULT NULL, + `F_cb70ab375662576bd1ac5aaf16b3fca4` int(11) DEFAULT NULL, + `F_9188905e74c28e489b44e954ec0b9bca` int(11) DEFAULT NULL, + `F_0266e33d3f546cb5436a10798e657d97` int(11) DEFAULT NULL, + `F_38db3aed920cf82ab059bfccbd02be6a` int(11) DEFAULT NULL, + `F_3cec07e9ba5f5bb252d13f5f431e4bbb` int(11) DEFAULT NULL, + `F_621bf66ddb7c962aa0d22ac97d69b793` int(11) DEFAULT NULL, + `F_077e29b11be80ab57e1a2ecabb7da330` int(11) DEFAULT NULL, + `F_6c9882bbac1c7093bd25041881277658` int(11) DEFAULT NULL, + `F_19f3cd308f1455b3fa09a282e0d496f4` int(11) DEFAULT NULL, + `F_03c6b06952c750899bb03d998e631860` int(11) DEFAULT NULL, + `F_c24cd76e1ce41366a4bbe8a49b02a028` int(11) DEFAULT NULL, + `F_c52f1bd66cc19d05628bd8bf27af3ad6` int(11) DEFAULT NULL, + `F_fe131d7f5a6b38b23cc967316c13dae2` int(11) DEFAULT NULL, + `F_f718499c1c8cef6730f9fd03c8125cab` int(11) DEFAULT NULL, + `F_d96409bf894217686ba124d7356686c9` int(11) DEFAULT NULL, + `F_502e4a16930e414107ee22b6198c578f` int(11) DEFAULT NULL, + `F_cfa0860e83a4c3a763a7e62d825349f7` int(11) DEFAULT NULL, + `F_a4f23670e1833f3fdb077ca70bbd5d66` int(11) DEFAULT NULL, + `F_b1a59b315fc9a3002ce38bbe070ec3f5` int(11) DEFAULT NULL, + `F_36660e59856b4de58a219bcf4e27eba3` int(11) DEFAULT NULL, + `F_8c19f571e251e61cb8dd3612f26d5ecf` int(11) DEFAULT NULL, + `F_d6baf65e0b240ce177cf70da146c8dc8` int(11) DEFAULT NULL, + `F_e56954b4f6347e897f954495eab16a88` int(11) DEFAULT NULL, + `F_f7664060cc52bc6f3d620bcedc94a4b6` int(11) DEFAULT NULL, + `F_eda80a3d5b344bc40f3bc04f65b7a357` int(11) DEFAULT NULL, + `F_8f121ce07d74717e0b1f21d122e04521` int(11) DEFAULT NULL, + `F_06138bc5af6023646ede0e1f7c1eac75` int(11) DEFAULT NULL, + `F_39059724f73a9969845dfe4146c5660e` int(11) DEFAULT NULL, + `F_7f100b7b36092fb9b06dfb4fac360931` int(11) DEFAULT NULL, + `F_7a614fd06c325499f1680b9896beedeb` int(11) DEFAULT NULL, + `F_4734ba6f3de83d861c3176a6273cac6d` int(11) DEFAULT NULL, + `F_d947bf06a885db0d477d707121934ff8` int(11) DEFAULT NULL, + `F_63923f49e5241343aa7acb6a06a751e7` int(11) DEFAULT NULL, + `F_db8e1af0cb3aca1ae2d0018624204529` int(11) DEFAULT NULL, + `F_20f07591c6fcb220ffe637cda29bb3f6` int(11) DEFAULT NULL, + `F_07cdfd23373b17c6b337251c22b7ea57` int(11) DEFAULT NULL, + `F_d395771085aab05244a4fb8fd91bf4ee` int(11) DEFAULT NULL, + `F_92c8c96e4c37100777c7190b76d28233` int(11) DEFAULT NULL, + `F_e3796ae838835da0b6f6ea37bcf8bcb7` int(11) DEFAULT NULL, + `F_6a9aeddfc689c1d0e3b9ccc3ab651bc5` int(11) DEFAULT NULL, + `F_0f49c89d1e7298bb9930789c8ed59d48` int(11) DEFAULT NULL, + `F_46ba9f2a6976570b0353203ec4474217` int(11) DEFAULT NULL, + `F_0e01938fc48a2cfb5f2217fbfb00722d` int(11) DEFAULT NULL, + `F_16a5cdae362b8d27a1d8f8c7b78b4330` int(11) DEFAULT NULL, + `F_918317b57931b6b7a7d29490fe5ec9f9` int(11) DEFAULT NULL, + `F_48aedb8880cab8c45637abc7493ecddd` int(11) DEFAULT NULL, + `F_839ab46820b524afda05122893c2fe8e` int(11) DEFAULT NULL, + `F_f90f2aca5c640289d0a29417bcb63a37` int(11) DEFAULT NULL, + `F_9c838d2e45b2ad1094d42f4ef36764f6` int(11) DEFAULT NULL, + `F_1700002963a49da13542e0726b7bb758` int(11) DEFAULT NULL, + `F_53c3bce66e43be4f209556518c2fcb54` int(11) DEFAULT NULL, + `F_6883966fd8f918a4aa29be29d2c386fb` int(11) DEFAULT NULL, + `F_49182f81e6a13cf5eaa496d51fea6406` int(11) DEFAULT NULL, + `F_d296c101daa88a51f6ca8cfc1ac79b50` int(11) DEFAULT NULL, + `F_9fd81843ad7f202f26c1a174c7357585` int(11) DEFAULT NULL, + `F_26e359e83860db1d11b6acca57d8ea88` int(11) DEFAULT NULL, + `F_ef0d3930a7b6c95bd2b32ed45989c61f` int(11) DEFAULT NULL, + `F_94f6d7e04a4d452035300f18b984988c` int(11) DEFAULT NULL, + `F_34ed066df378efacc9b924ec161e7639` int(11) DEFAULT NULL, + `F_577bcc914f9e55d5e4e4f82f9f00e7d4` int(11) DEFAULT NULL, + `F_11b9842e0a271ff252c1903e7132cd68` int(11) DEFAULT NULL, + `F_37bc2f75bf1bcfe8450a1a41c200364c` int(11) DEFAULT NULL, + `F_496e05e1aea0a9c4655800e8a7b9ea28` int(11) DEFAULT NULL, + `F_b2eb7349035754953b57a32e2841bda5` int(11) DEFAULT NULL, + `F_8e98d81f8217304975ccb23337bb5761` int(11) DEFAULT NULL, + `F_a8c88a0055f636e4a163a5e3d16adab7` int(11) DEFAULT NULL, + `F_eddea82ad2755b24c4e168c5fc2ebd40` int(11) DEFAULT NULL, + `F_06eb61b839a0cefee4967c67ccb099dc` int(11) DEFAULT NULL, + `F_9dfcd5e558dfa04aaf37f137a1d9d3e5` int(11) DEFAULT NULL, + `F_950a4152c2b4aa3ad78bdd6b366cc179` int(11) DEFAULT NULL, + `F_158f3069a435b314a80bdcb024f8e422` int(11) DEFAULT NULL, + `F_758874998f5bd0c393da094e1967a72b` int(11) DEFAULT NULL, + `F_ad13a2a07ca4b7642959dc0c4c740ab6` int(11) DEFAULT NULL, + `F_3fe94a002317b5f9259f82690aeea4cd` int(11) DEFAULT NULL, + `F_5b8add2a5d98b1a652ea7fd72d942dac` int(11) DEFAULT NULL, + `F_432aca3a1e345e339f35a30c8f65edce` int(11) DEFAULT NULL, + `F_8d3bba7425e7c98c50f52ca1b52d3735` int(11) DEFAULT NULL, + `F_320722549d1751cf3f247855f937b982` int(11) DEFAULT NULL, + `F_caf1a3dfb505ffed0d024130f58c5cfa` int(11) DEFAULT NULL, + `F_5737c6ec2e0716f3d8a7a5c4e0de0d9a` int(11) DEFAULT NULL, + `F_bc6dc48b743dc5d013b1abaebd2faed2` int(11) DEFAULT NULL, + `F_f2fc990265c712c49d51a18a32b39f0c` int(11) DEFAULT NULL, + `F_89f0fd5c927d466d6ec9a21b9ac34ffa` int(11) DEFAULT NULL, + `F_a666587afda6e89aec274a3657558a27` int(11) DEFAULT NULL, + `F_b83aac23b9528732c23cc7352950e880` int(11) DEFAULT NULL, + `F_cd00692c3bfe59267d5ecfac5310286c` int(11) DEFAULT NULL, + `F_6faa8040da20ef399b63a72d0e4ab575` int(11) DEFAULT NULL, + `F_fe73f687e5bc5280214e0486b273a5f9` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1401,7 +1401,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1446,7 +1446,7 @@ create view v2 as select * from t2 where a like 'a%' with check option; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( - `a` varchar(30) default NULL, + `a` varchar(30) DEFAULT NULL, KEY `a` (`a`(5)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1524,11 +1524,11 @@ INSERT INTO t2 VALUES (1), (2); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -1553,11 +1553,11 @@ CREATE TABLE `t2` ( /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -1712,7 +1712,7 @@ insert into t1 values ('',''); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` binary(1) default NULL, + `a` binary(1) DEFAULT NULL, `b` blob ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1745,7 +1745,7 @@ UNLOCK TABLES; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` binary(1) default NULL, + `a` binary(1) DEFAULT NULL, `b` blob ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1781,7 +1781,7 @@ create view v1 as select * from t1; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1835,7 +1835,7 @@ create view v2 as select * from t2 where a like 'a%' with check option; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( - `a` varchar(30) default NULL, + `a` varchar(30) DEFAULT NULL, KEY `a` (`a`(5)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1883,7 +1883,7 @@ INSERT INTO t1 VALUES ('\''); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` char(10) default NULL + `a` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -1924,9 +1924,9 @@ select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL, - `b` int(11) default NULL, - `c` varchar(30) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` varchar(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2039,8 +2039,8 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL, - `b` bigint(20) default NULL + `a` int(11) DEFAULT NULL, + `b` bigint(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2076,7 +2076,7 @@ DELIMITER ; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2123,8 +2123,8 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL, - `b` bigint(20) default NULL + `a` int(11) DEFAULT NULL, + `b` bigint(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2135,7 +2135,7 @@ UNLOCK TABLES; /*!40000 ALTER TABLE `t1` ENABLE KEYS */; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2253,7 +2253,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `id` int(11) default NULL + `id` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2341,7 +2341,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `d` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `d` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY `d` (`d`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2376,7 +2376,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `d` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `d` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY `d` (`d`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2424,7 +2424,7 @@ a2 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS "t1 test"; CREATE TABLE "t1 test" ( - "a1" int(11) default NULL + "a1" int(11) DEFAULT NULL ); @@ -2444,7 +2444,7 @@ DELIMITER ; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */; DROP TABLE IF EXISTS "t2 test"; CREATE TABLE "t2 test" ( - "a2" int(11) default NULL + "a2" int(11) DEFAULT NULL ); @@ -2493,9 +2493,9 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL, - `b` varchar(32) default NULL, - `c` varchar(32) default NULL + `a` int(11) DEFAULT NULL, + `b` varchar(32) DEFAULT NULL, + `c` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2573,8 +2573,8 @@ INSERT INTO t1 VALUES (3,4), (4,5); /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -2620,7 +2620,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; diff --git a/mysql-test/r/ndb_bitfield.result b/mysql-test/r/ndb_bitfield.result index d6d00739a9b..13fd31d7e88 100644 --- a/mysql-test/r/ndb_bitfield.result +++ b/mysql-test/r/ndb_bitfield.result @@ -7,7 +7,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `pk1` int(11) NOT NULL, - `b` bit(64) default NULL, + `b` bit(64) DEFAULT NULL, PRIMARY KEY (`pk1`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () insert into t1 values diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index 939d9e88e86..6c95b3d4e4e 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -27,8 +27,8 @@ Error 1538 Table storage engine 'ndbcluster' does not support the create option SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) DEFAULT NULL, + `g` point DEFAULT NULL ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra @@ -509,8 +509,8 @@ Error 1538 Table storage engine 'ndbcluster' does not support the create option SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) DEFAULT NULL, + `g` point DEFAULT NULL ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra diff --git a/mysql-test/r/ndb_partition_key.result b/mysql-test/r/ndb_partition_key.result index 451b3522bc7..8842a6e1398 100644 --- a/mysql-test/r/ndb_partition_key.result +++ b/mysql-test/r/ndb_partition_key.result @@ -73,10 +73,10 @@ NDBT_ProgramExit: 0 - OK show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', - `b` char(10) character set latin1 collate latin1_bin NOT NULL default '', - `c` int(11) NOT NULL default '0', - `d` int(11) default NULL, + `a` int(11) NOT NULL DEFAULT '0', + `b` char(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `c` int(11) NOT NULL DEFAULT '0', + `d` int(11) DEFAULT NULL, PRIMARY KEY USING HASH (`a`,`b`,`c`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY (b) DROP TABLE t1; diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 35c8abf07a4..9a7ae446707 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -227,44 +227,44 @@ rpad(null, 10, 'str') as c38; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c00` binary(0) default NULL, - `c01` varchar(6) character set latin2 default NULL, - `c02` varchar(6) character set latin2 default NULL, - `c03` varchar(6) character set latin2 NOT NULL default '', - `c04` varchar(6) character set latin2 default NULL, - `c05` varchar(6) character set latin2 default NULL, - `c06` varchar(6) character set latin2 default NULL, - `c07` varchar(6) character set latin2 default NULL, - `c08` varchar(6) character set latin2 default NULL, - `c09` varchar(6) character set latin2 default NULL, - `c10` varchar(6) character set latin2 default NULL, - `c11` varchar(6) character set latin2 default NULL, - `c12` varchar(6) character set latin2 default NULL, - `c13` varchar(6) character set latin2 default NULL, - `c14` char(0) character set latin2 default NULL, - `c15` char(0) character set latin2 default NULL, - `c16` varchar(6) character set latin2 default NULL, - `c17` varchar(6) character set latin2 default NULL, - `c18` char(0) character set latin2 default NULL, - `c19` varchar(6) character set latin2 default NULL, - `c20` varchar(6) character set latin2 default NULL, - `c21` varchar(6) character set latin2 default NULL, - `c22` varchar(6) character set latin2 default NULL, - `c23` varchar(9) character set latin2 default NULL, - `c24` varchar(9) character set latin2 default NULL, - `c25` varchar(12) character set latin2 default NULL, - `c26` varchar(7) character set latin2 default NULL, - `c27` varchar(7) character set latin2 default NULL, - `c29` varchar(381) character set latin2 default NULL, - `c30` varchar(317) character set latin2 default NULL, - `c31` varchar(192) character set latin2 default NULL, - `c32` char(0) character set latin2 default NULL, - `c33` varchar(3) character set latin2 default NULL, - `c34` varchar(3) character set latin2 default NULL, - `c35` varchar(3) character set latin2 default NULL, - `c36` varchar(3) character set latin2 default NULL, - `c37` varchar(10) character set latin2 default NULL, - `c38` varchar(10) character set latin2 default NULL + `c00` binary(0) DEFAULT NULL, + `c01` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c02` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c03` varchar(6) CHARACTER SET latin2 NOT NULL DEFAULT '', + `c04` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c05` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c06` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c07` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c08` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c09` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c10` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c11` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c12` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c13` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c14` char(0) CHARACTER SET latin2 DEFAULT NULL, + `c15` char(0) CHARACTER SET latin2 DEFAULT NULL, + `c16` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c17` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c18` char(0) CHARACTER SET latin2 DEFAULT NULL, + `c19` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c20` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c21` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c22` varchar(6) CHARACTER SET latin2 DEFAULT NULL, + `c23` varchar(9) CHARACTER SET latin2 DEFAULT NULL, + `c24` varchar(9) CHARACTER SET latin2 DEFAULT NULL, + `c25` varchar(12) CHARACTER SET latin2 DEFAULT NULL, + `c26` varchar(7) CHARACTER SET latin2 DEFAULT NULL, + `c27` varchar(7) CHARACTER SET latin2 DEFAULT NULL, + `c29` varchar(381) CHARACTER SET latin2 DEFAULT NULL, + `c30` varchar(317) CHARACTER SET latin2 DEFAULT NULL, + `c31` varchar(192) CHARACTER SET latin2 DEFAULT NULL, + `c32` char(0) CHARACTER SET latin2 DEFAULT NULL, + `c33` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `c34` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `c35` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `c36` varchar(3) CHARACTER SET latin2 DEFAULT NULL, + `c37` varchar(10) CHARACTER SET latin2 DEFAULT NULL, + `c38` varchar(10) CHARACTER SET latin2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 6d28ecd8552..70ff49be905 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -184,7 +184,7 @@ PARTITIONS 1 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 PARTITION BY LIST (a) (PARTITION x1 VALUES IN (1) ENGINE = MEMORY) drop table t1; CREATE TABLE t1 (a int, unique(a)) @@ -208,7 +208,7 @@ PARTITIONS 5; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (a) PARTITIONS 5 drop table t1; CREATE TABLE t1 (a int) @@ -247,7 +247,7 @@ alter table t1 reorganize partition p2 into (partition p2 values less than (30)) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (30) ENGINE = MyISAM) drop table t1; CREATE TABLE t1 (a int, b int) @@ -267,8 +267,8 @@ ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION x1 VALUES LESS THAN (6) ENGINE = MyISAM, PARTITION x3 VALUES LESS THAN (8) ENGINE = MyISAM, PARTITION x4 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION x5 VALUES LESS THAN (12) ENGINE = MyISAM, PARTITION x6 VALUES LESS THAN (14) ENGINE = MyISAM, PARTITION x7 VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION x8 VALUES LESS THAN (18) ENGINE = MyISAM, PARTITION x9 VALUES LESS THAN (20) ENGINE = MyISAM) drop table t1; create table t1 (a int not null, b int not null) partition by LIST (a+b) ( diff --git a/mysql-test/r/partition_02myisam.result b/mysql-test/r/partition_02myisam.result index 184f9ce17cc..29d54c8a8b8 100644 --- a/mysql-test/r/partition_02myisam.result +++ b/mysql-test/r/partition_02myisam.result @@ -39,8 +39,8 @@ CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'MYISAM'; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -90,8 +90,8 @@ PARTITION BY HASH(f1) PARTITIONS 2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 2 SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -145,8 +145,8 @@ PARTITION part2 STORAGE ENGINE = 'MYISAM' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -203,8 +203,8 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM') SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -258,8 +258,8 @@ PARTITION part2 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -311,8 +311,8 @@ PARTITION part2 STORAGE ENGINE = 'MYISAM' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -369,8 +369,8 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM') SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -427,8 +427,8 @@ SUBPARTITION subpart22 ) SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -487,8 +487,8 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM') SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -545,8 +545,8 @@ SUBPARTITION subpart22) SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -601,8 +601,8 @@ PARTITION part2 STORAGE ENGINE = 'MYISAM' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -659,8 +659,8 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM') SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -719,8 +719,8 @@ SUBPARTITION subpart22 STORAGE ENGINE = 'MYISAM') SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -780,8 +780,8 @@ PARTITION BY HASH(f1); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -831,8 +831,8 @@ PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -889,8 +889,8 @@ PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) (PARTITION part1 VALUES LESS THA SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (100) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (200) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (2147483647) (SUBPARTITION subpart31 ENGINE = MyISAM, SUBPARTITION subpart32 ENGINE = MyISAM)) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -942,8 +942,8 @@ PARTITION BY HASH(f1) PARTITIONS 2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 2 SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -994,8 +994,8 @@ SUBPARTITIONS 2 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (100) , PARTITION part2 VALUES LESS THAN (2147483647) ) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -1044,8 +1044,8 @@ PARTITION BY HASH(f1) PARTITIONS 1; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 1 SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -1096,8 +1096,8 @@ SUBPARTITIONS 1 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (100) , PARTITION part2 VALUES LESS THAN (2147483647) ) SELECT COUNT(*) = 0 AS my_value FROM t1; my_value @@ -1302,8 +1302,8 @@ PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) DROP TABLE t1; CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) @@ -1317,8 +1317,8 @@ PARTITION part2 VALUES LESS THAN (2147483647) SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) DROP TABLE t1; # 3.3.2 (positive) number of partition/subpartition , @@ -1426,16 +1426,16 @@ CREATE TABLE t1 ( f1 INTEGER, f2 char(20)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ALTER TABLE t1 ADD PARTITION (PARTITION part1); Got one of the listed errors SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; # 5.1.2 Add one partition to a table with one partition @@ -1444,16 +1444,16 @@ PARTITION BY HASH(f1); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1; ALTER TABLE t1 ADD PARTITION (PARTITION part1); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM) INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200; SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) @@ -1500,16 +1500,16 @@ PARTITION BY HASH(f1) (PARTITION part1, PARTITION part3); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM) INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1; ALTER TABLE t1 ADD PARTITION (PARTITION part0); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM, PARTITION part0 ENGINE = MyISAM) INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200; SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) @@ -1555,8 +1555,8 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM, PARTITION part0 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200; SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) @@ -1601,8 +1601,8 @@ INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM, PARTITION part0 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200; SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) @@ -1649,15 +1649,15 @@ PARTITION BY HASH(f1) (PARTITION part1, PARTITION part3); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM) INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100 - 1; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL + `f1` int(11) DEFAULT NULL, + `f2` char(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = MyISAM, PARTITION part3 ENGINE = MyISAM) INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 100 AND 200; SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) diff --git a/mysql-test/r/partition_mgm_err.result b/mysql-test/r/partition_mgm_err.result index 58ee2d08947..a419d5b361b 100644 --- a/mysql-test/r/partition_mgm_err.result +++ b/mysql-test/r/partition_mgm_err.result @@ -131,13 +131,13 @@ CREATE TABLE t1 (a INT); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) PARTITIONS 2 DROP TABLE t1; CREATE TABLE t1 (a INT) PARTITION BY HASH(a); diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index 5e7a2832747..4f92e127fe0 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -151,7 +151,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` int(11) NOT NULL, `c` int(11) NOT NULL, - `d` int(11) default NULL, + `d` int(11) DEFAULT NULL, PRIMARY KEY (`a`,`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a+b) (PARTITION x1 VALUES LESS THAN (1) (SUBPARTITION x11 ENGINE = MyISAM, SUBPARTITION x12 ENGINE = MyISAM), PARTITION x2 VALUES LESS THAN (5) (SUBPARTITION x21 ENGINE = MyISAM, SUBPARTITION x22 ENGINE = MyISAM)) drop table t1; diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index b5560a4757c..ffe2b4d6409 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1775,31 +1775,31 @@ NULL as const12, @arg12 as param12, show create table t5 ; Table Create Table t5 CREATE TABLE `t5` ( - `const01` bigint(1) NOT NULL default '0', - `param01` bigint(20) default NULL, - `const02` decimal(2,1) unsigned NOT NULL default '0.0', - `param02` decimal(65,30) default NULL, - `const03` double NOT NULL default '0', - `param03` double default NULL, - `const04` varchar(3) NOT NULL default '', + `const01` bigint(1) NOT NULL DEFAULT '0', + `param01` bigint(20) DEFAULT NULL, + `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0', + `param02` decimal(65,30) DEFAULT NULL, + `const03` double NOT NULL DEFAULT '0', + `param03` double DEFAULT NULL, + `const04` varchar(3) NOT NULL DEFAULT '', `param04` longtext, - `const05` varbinary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL DEFAULT '', `param05` longblob, - `const06` varchar(10) NOT NULL default '', + `const06` varchar(10) NOT NULL DEFAULT '', `param06` longtext, - `const07` date default NULL, + `const07` date DEFAULT NULL, `param07` longblob, - `const08` varchar(19) NOT NULL default '', + `const08` varchar(19) NOT NULL DEFAULT '', `param08` longtext, - `const09` datetime default NULL, + `const09` datetime DEFAULT NULL, `param09` longblob, - `const10` int(10) NOT NULL default '0', - `param10` bigint(20) default NULL, - `const11` int(4) default NULL, - `param11` bigint(20) default NULL, - `const12` binary(0) default NULL, - `param12` bigint(20) default NULL, - `param13` decimal(65,30) default NULL, + `const10` int(10) NOT NULL DEFAULT '0', + `param10` bigint(20) DEFAULT NULL, + `const11` int(4) DEFAULT NULL, + `param11` bigint(20) DEFAULT NULL, + `const12` binary(0) DEFAULT NULL, + `param12` bigint(20) DEFAULT NULL, + `param13` decimal(65,30) DEFAULT NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 594e673ba4d..707e5ed681f 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1758,31 +1758,31 @@ NULL as const12, @arg12 as param12, show create table t5 ; Table Create Table t5 CREATE TABLE `t5` ( - `const01` bigint(1) NOT NULL default '0', - `param01` bigint(20) default NULL, - `const02` decimal(2,1) unsigned NOT NULL default '0.0', - `param02` decimal(65,30) default NULL, - `const03` double NOT NULL default '0', - `param03` double default NULL, - `const04` varchar(3) NOT NULL default '', + `const01` bigint(1) NOT NULL DEFAULT '0', + `param01` bigint(20) DEFAULT NULL, + `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0', + `param02` decimal(65,30) DEFAULT NULL, + `const03` double NOT NULL DEFAULT '0', + `param03` double DEFAULT NULL, + `const04` varchar(3) NOT NULL DEFAULT '', `param04` longtext, - `const05` varbinary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL DEFAULT '', `param05` longblob, - `const06` varchar(10) NOT NULL default '', + `const06` varchar(10) NOT NULL DEFAULT '', `param06` longtext, - `const07` date default NULL, + `const07` date DEFAULT NULL, `param07` longblob, - `const08` varchar(19) NOT NULL default '', + `const08` varchar(19) NOT NULL DEFAULT '', `param08` longtext, - `const09` datetime default NULL, + `const09` datetime DEFAULT NULL, `param09` longblob, - `const10` int(10) NOT NULL default '0', - `param10` bigint(20) default NULL, - `const11` int(4) default NULL, - `param11` bigint(20) default NULL, - `const12` binary(0) default NULL, - `param12` bigint(20) default NULL, - `param13` decimal(65,30) default NULL, + `const10` int(10) NOT NULL DEFAULT '0', + `param10` bigint(20) DEFAULT NULL, + `const11` int(4) DEFAULT NULL, + `param11` bigint(20) DEFAULT NULL, + `const12` binary(0) DEFAULT NULL, + `param12` bigint(20) DEFAULT NULL, + `param13` decimal(65,30) DEFAULT NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index fb94ed7ca34..06429f92580 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1759,31 +1759,31 @@ NULL as const12, @arg12 as param12, show create table t5 ; Table Create Table t5 CREATE TABLE `t5` ( - `const01` bigint(1) NOT NULL default '0', - `param01` bigint(20) default NULL, - `const02` decimal(2,1) unsigned NOT NULL default '0.0', - `param02` decimal(65,30) default NULL, - `const03` double NOT NULL default '0', - `param03` double default NULL, - `const04` varchar(3) NOT NULL default '', + `const01` bigint(1) NOT NULL DEFAULT '0', + `param01` bigint(20) DEFAULT NULL, + `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0', + `param02` decimal(65,30) DEFAULT NULL, + `const03` double NOT NULL DEFAULT '0', + `param03` double DEFAULT NULL, + `const04` varchar(3) NOT NULL DEFAULT '', `param04` longtext, - `const05` varbinary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL DEFAULT '', `param05` longblob, - `const06` varchar(10) NOT NULL default '', + `const06` varchar(10) NOT NULL DEFAULT '', `param06` longtext, - `const07` date default NULL, + `const07` date DEFAULT NULL, `param07` longblob, - `const08` varchar(19) NOT NULL default '', + `const08` varchar(19) NOT NULL DEFAULT '', `param08` longtext, - `const09` datetime default NULL, + `const09` datetime DEFAULT NULL, `param09` longblob, - `const10` int(10) NOT NULL default '0', - `param10` bigint(20) default NULL, - `const11` int(4) default NULL, - `param11` bigint(20) default NULL, - `const12` binary(0) default NULL, - `param12` bigint(20) default NULL, - `param13` decimal(65,30) default NULL, + `const10` int(10) NOT NULL DEFAULT '0', + `param10` bigint(20) DEFAULT NULL, + `const11` int(4) DEFAULT NULL, + `param11` bigint(20) DEFAULT NULL, + `const12` binary(0) DEFAULT NULL, + `param12` bigint(20) DEFAULT NULL, + `param13` decimal(65,30) DEFAULT NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 3a630b58b8a..c1002970932 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1695,31 +1695,31 @@ NULL as const12, @arg12 as param12, show create table t5 ; Table Create Table t5 CREATE TABLE `t5` ( - `const01` bigint(1) NOT NULL default '0', - `param01` bigint(20) default NULL, - `const02` decimal(2,1) unsigned NOT NULL default '0.0', - `param02` decimal(65,30) default NULL, - `const03` double NOT NULL default '0', - `param03` double default NULL, - `const04` varchar(3) NOT NULL default '', + `const01` bigint(1) NOT NULL DEFAULT '0', + `param01` bigint(20) DEFAULT NULL, + `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0', + `param02` decimal(65,30) DEFAULT NULL, + `const03` double NOT NULL DEFAULT '0', + `param03` double DEFAULT NULL, + `const04` varchar(3) NOT NULL DEFAULT '', `param04` longtext, - `const05` varbinary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL DEFAULT '', `param05` longblob, - `const06` varchar(10) NOT NULL default '', + `const06` varchar(10) NOT NULL DEFAULT '', `param06` longtext, - `const07` date default NULL, + `const07` date DEFAULT NULL, `param07` longblob, - `const08` varchar(19) NOT NULL default '', + `const08` varchar(19) NOT NULL DEFAULT '', `param08` longtext, - `const09` datetime default NULL, + `const09` datetime DEFAULT NULL, `param09` longblob, - `const10` int(10) NOT NULL default '0', - `param10` bigint(20) default NULL, - `const11` int(4) default NULL, - `param11` bigint(20) default NULL, - `const12` binary(0) default NULL, - `param12` bigint(20) default NULL, - `param13` decimal(65,30) default NULL, + `const10` int(10) NOT NULL DEFAULT '0', + `param10` bigint(20) DEFAULT NULL, + `const11` int(4) DEFAULT NULL, + `param11` bigint(20) DEFAULT NULL, + `const12` binary(0) DEFAULT NULL, + `param12` bigint(20) DEFAULT NULL, + `param13` decimal(65,30) DEFAULT NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -4709,31 +4709,31 @@ NULL as const12, @arg12 as param12, show create table t5 ; Table Create Table t5 CREATE TABLE `t5` ( - `const01` bigint(1) NOT NULL default '0', - `param01` bigint(20) default NULL, - `const02` decimal(2,1) unsigned NOT NULL default '0.0', - `param02` decimal(65,30) default NULL, - `const03` double NOT NULL default '0', - `param03` double default NULL, - `const04` varchar(3) NOT NULL default '', + `const01` bigint(1) NOT NULL DEFAULT '0', + `param01` bigint(20) DEFAULT NULL, + `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0', + `param02` decimal(65,30) DEFAULT NULL, + `const03` double NOT NULL DEFAULT '0', + `param03` double DEFAULT NULL, + `const04` varchar(3) NOT NULL DEFAULT '', `param04` longtext, - `const05` varbinary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL DEFAULT '', `param05` longblob, - `const06` varchar(10) NOT NULL default '', + `const06` varchar(10) NOT NULL DEFAULT '', `param06` longtext, - `const07` date default NULL, + `const07` date DEFAULT NULL, `param07` longblob, - `const08` varchar(19) NOT NULL default '', + `const08` varchar(19) NOT NULL DEFAULT '', `param08` longtext, - `const09` datetime default NULL, + `const09` datetime DEFAULT NULL, `param09` longblob, - `const10` int(10) NOT NULL default '0', - `param10` bigint(20) default NULL, - `const11` int(4) default NULL, - `param11` bigint(20) default NULL, - `const12` binary(0) default NULL, - `param12` bigint(20) default NULL, - `param13` decimal(65,30) default NULL, + `const10` int(10) NOT NULL DEFAULT '0', + `param10` bigint(20) DEFAULT NULL, + `const11` int(4) DEFAULT NULL, + `param11` bigint(20) DEFAULT NULL, + `const12` binary(0) DEFAULT NULL, + `param12` bigint(20) DEFAULT NULL, + `param13` decimal(65,30) DEFAULT NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index 581369a3faa..ea1212addf5 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -1758,31 +1758,31 @@ NULL as const12, @arg12 as param12, show create table t5 ; Table Create Table t5 CREATE TABLE `t5` ( - `const01` bigint(1) NOT NULL default '0', - `param01` bigint(20) default NULL, - `const02` decimal(2,1) unsigned NOT NULL default '0.0', - `param02` decimal(65,30) default NULL, - `const03` double NOT NULL default '0', - `param03` double default NULL, - `const04` varchar(3) NOT NULL default '', + `const01` bigint(1) NOT NULL DEFAULT '0', + `param01` bigint(20) DEFAULT NULL, + `const02` decimal(2,1) unsigned NOT NULL DEFAULT '0.0', + `param02` decimal(65,30) DEFAULT NULL, + `const03` double NOT NULL DEFAULT '0', + `param03` double DEFAULT NULL, + `const04` varchar(3) NOT NULL DEFAULT '', `param04` longtext, - `const05` varbinary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL DEFAULT '', `param05` longblob, - `const06` varchar(10) NOT NULL default '', + `const06` varchar(10) NOT NULL DEFAULT '', `param06` longtext, - `const07` date default NULL, + `const07` date DEFAULT NULL, `param07` longblob, - `const08` varchar(19) NOT NULL default '', + `const08` varchar(19) NOT NULL DEFAULT '', `param08` longtext, - `const09` datetime default NULL, + `const09` datetime DEFAULT NULL, `param09` longblob, - `const10` int(10) NOT NULL default '0', - `param10` bigint(20) default NULL, - `const11` int(4) default NULL, - `param11` bigint(20) default NULL, - `const12` binary(0) default NULL, - `param12` bigint(20) default NULL, - `param13` decimal(65,30) default NULL, + `const10` int(10) NOT NULL DEFAULT '0', + `param10` bigint(20) DEFAULT NULL, + `const11` int(4) DEFAULT NULL, + `param11` bigint(20) DEFAULT NULL, + `const12` binary(0) DEFAULT NULL, + `param12` bigint(20) DEFAULT NULL, + `param13` decimal(65,30) DEFAULT NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/r/rpl_mixed_ddl_dml.result b/mysql-test/r/rpl_mixed_ddl_dml.result index a61bdfbac02..38972a4f571 100644 --- a/mysql-test/r/rpl_mixed_ddl_dml.result +++ b/mysql-test/r/rpl_mixed_ddl_dml.result @@ -33,14 +33,14 @@ id created show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL auto_increment, - `created` datetime default NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create table t5; Table Create Table t5 CREATE TABLE `t5` ( - `id` int(11) NOT NULL default '0', - `created` datetime default NULL + `id` int(11) NOT NULL DEFAULT '0', + `created` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2,t3,t5; diff --git a/mysql-test/r/rpl_multi_engine.result b/mysql-test/r/rpl_multi_engine.result index cf983499089..7cb7d873415 100644 --- a/mysql-test/r/rpl_multi_engine.result +++ b/mysql-test/r/rpl_multi_engine.result @@ -16,14 +16,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 engine=myisam; @@ -31,14 +31,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); @@ -65,14 +65,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); @@ -99,14 +99,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); @@ -133,14 +133,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 alter table t1 engine=myisam; @@ -148,14 +148,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); @@ -182,14 +182,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); @@ -216,14 +216,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); @@ -250,14 +250,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 alter table t1 engine=myisam; @@ -265,14 +265,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); @@ -299,14 +299,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); @@ -333,14 +333,14 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL, - `b1` bit(8) default NULL, - `vc` varchar(255) default NULL, - `bc` char(255) default NULL, - `d` decimal(10,4) default '0.0000', - `f` float default '0', - `total` bigint(20) unsigned default NULL, - `y` year(4) default NULL, - `t` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,"2005-11-14"); diff --git a/mysql-test/r/rpl_ndb_UUID.result b/mysql-test/r/rpl_ndb_UUID.result index 602cc3e9c8c..c768779c49b 100644 --- a/mysql-test/r/rpl_ndb_UUID.result +++ b/mysql-test/r/rpl_ndb_UUID.result @@ -29,9 +29,9 @@ insert into t2 values(fn1(2)); SHOW CREATE TABLE test.t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL DEFAULT '0', `blob_column` longblob, - `vchar_column` varchar(100) default NULL, + `vchar_column` varchar(100) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () DROP PROCEDURE test.p1; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 8a5db7041d5..59e9cca1e8e 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -103,21 +103,21 @@ c int not null comment 'int column', show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `test_set` set('val1','val2','val3') NOT NULL default '', - `name` char(20) default 'O''Brien' COMMENT 'O''Brien as default', + `test_set` set('val1','val2','val3') NOT NULL DEFAULT '', + `name` char(20) DEFAULT 'O''Brien' COMMENT 'O''Brien as default', `c` int(11) NOT NULL COMMENT 'int column', - `c-b` int(11) default NULL COMMENT 'name with a minus', - `space 2` int(11) default NULL COMMENT 'name with a space' + `c-b` int(11) DEFAULT NULL COMMENT 'name with a minus', + `space 2` int(11) DEFAULT NULL COMMENT 'name with a space' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table' set sql_quote_show_create=0; show create table t1; Table Create Table t1 CREATE TABLE t1 ( - test_set set('val1','val2','val3') NOT NULL default '', - `name` char(20) default 'O''Brien' COMMENT 'O''Brien as default', + test_set set('val1','val2','val3') NOT NULL DEFAULT '', + `name` char(20) DEFAULT 'O''Brien' COMMENT 'O''Brien as default', c int(11) NOT NULL COMMENT 'int column', - `c-b` int(11) default NULL COMMENT 'name with a minus', - `space 2` int(11) default NULL COMMENT 'name with a space' + `c-b` int(11) DEFAULT NULL COMMENT 'name with a minus', + `space 2` int(11) DEFAULT NULL COMMENT 'name with a space' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table' set sql_quote_show_create=1; show full columns from t1; @@ -162,7 +162,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(10) default NULL, + `b` varchar(10) DEFAULT NULL, KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' alter table t1 MAX_ROWS=200 ROW_FORMAT=dynamic PACK_KEYS=0; @@ -170,7 +170,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(10) default NULL, + `b` varchar(10) DEFAULT NULL, KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=200 AVG_ROW_LENGTH=10 PACK_KEYS=0 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC COMMENT='test' ALTER TABLE t1 AVG_ROW_LENGTH=0 CHECKSUM=0 COMMENT="" MIN_ROWS=0 MAX_ROWS=0 PACK_KEYS=DEFAULT DELAY_KEY_WRITE=0 ROW_FORMAT=default; @@ -178,7 +178,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(10) default NULL, + `b` varchar(10) DEFAULT NULL, KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -227,23 +227,23 @@ index(type_short) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `type_bool` tinyint(1) NOT NULL default '0', - `type_tiny` tinyint(4) NOT NULL auto_increment, - `type_short` smallint(3) default NULL, - `type_mediumint` mediumint(9) default NULL, - `type_bigint` bigint(20) default NULL, - `type_decimal` decimal(5,2) default NULL, - `type_numeric` decimal(5,2) default NULL, - `empty_char` char(0) default NULL, - `type_char` char(2) default NULL, - `type_varchar` varchar(10) default NULL, - `type_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `type_date` date NOT NULL default '0000-00-00', - `type_time` time NOT NULL default '00:00:00', - `type_datetime` datetime NOT NULL default '0000-00-00 00:00:00', - `type_year` year(4) default NULL, - `type_enum` enum('red','green','blue') default NULL, - `type_set` enum('red','green','blue') default NULL, + `type_bool` tinyint(1) NOT NULL DEFAULT '0', + `type_tiny` tinyint(4) NOT NULL AUTO_INCREMENT, + `type_short` smallint(3) DEFAULT NULL, + `type_mediumint` mediumint(9) DEFAULT NULL, + `type_bigint` bigint(20) DEFAULT NULL, + `type_decimal` decimal(5,2) DEFAULT NULL, + `type_numeric` decimal(5,2) DEFAULT NULL, + `empty_char` char(0) DEFAULT NULL, + `type_char` char(2) DEFAULT NULL, + `type_varchar` varchar(10) DEFAULT NULL, + `type_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `type_date` date NOT NULL DEFAULT '0000-00-00', + `type_time` time NOT NULL DEFAULT '00:00:00', + `type_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `type_year` year(4) DEFAULT NULL, + `type_enum` enum('red','green','blue') DEFAULT NULL, + `type_set` enum('red','green','blue') DEFAULT NULL, `type_tinyblob` tinyblob, `type_blob` blob, `type_medium_blob` mediumblob, @@ -283,28 +283,28 @@ CREATE TABLE ```ab``cd``` (i INT); SHOW CREATE TABLE ```ab``cd```; Table Create Table `ab`cd` CREATE TABLE ```ab``cd``` ( - i int(11) default NULL + i int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE ```ab``cd```; CREATE TABLE ```ab````cd``` (i INT); SHOW CREATE TABLE ```ab````cd```; Table Create Table `ab``cd` CREATE TABLE ```ab````cd``` ( - i int(11) default NULL + i int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE ```ab````cd```; CREATE TABLE ```a` (i INT); SHOW CREATE TABLE ```a`; Table Create Table `a CREATE TABLE ```a` ( - i int(11) default NULL + i int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE ```a`; CREATE TABLE `a.1` (i INT); SHOW CREATE TABLE `a.1`; Table Create Table a.1 CREATE TABLE `a.1` ( - i int(11) default NULL + i int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE `a.1`; SET sql_mode= 'ANSI_QUOTES'; @@ -312,7 +312,7 @@ CREATE TABLE """a" (i INT); SHOW CREATE TABLE """a"; Table Create Table "a CREATE TABLE """a" ( - i int(11) default NULL + i int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE """a"; SET sql_mode= ''; @@ -321,14 +321,14 @@ CREATE TABLE t1 (i INT); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE t1 ( - i int(11) default NULL + i int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE `table` (i INT); SHOW CREATE TABLE `table`; Table Create Table table CREATE TABLE `table` ( - i int(11) default NULL + i int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE `table`; SET sql_quote_show_create= @old_sql_quote_show_create; @@ -451,7 +451,7 @@ CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL, + `i` int(11) DEFAULT NULL, KEY `i` (`i`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; @@ -459,7 +459,7 @@ CREATE TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL, + `i` int(11) DEFAULT NULL, KEY `i` USING HASH (`i`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; @@ -467,7 +467,7 @@ CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL, + `i` int(11) DEFAULT NULL, KEY `i` USING BTREE (`i`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; @@ -475,7 +475,7 @@ CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL, + `i` int(11) DEFAULT NULL, KEY `i` (`i`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; @@ -483,7 +483,7 @@ CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL, + `i` int(11) DEFAULT NULL, KEY `i` USING BTREE (`i`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; @@ -491,14 +491,14 @@ CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL, + `i` int(11) DEFAULT NULL, KEY `i` (`i`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ALTER TABLE t1 ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL, + `i` int(11) DEFAULT NULL, KEY `i` (`i`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; @@ -506,14 +506,14 @@ CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL, + `i` int(11) DEFAULT NULL, KEY `i` USING BTREE (`i`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ALTER TABLE t1 ENGINE=MEMORY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL, + `i` int(11) DEFAULT NULL, KEY `i` USING BTREE (`i`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; diff --git a/mysql-test/r/sp-vars.result b/mysql-test/r/sp-vars.result index b26d8a6e974..f620cd657f0 100644 --- a/mysql-test/r/sp-vars.result +++ b/mysql-test/r/sp-vars.result @@ -667,12 +667,12 @@ END| CALL p1(NOW()); Table Create Table t1 CREATE TABLE "t1" ( - "x" varbinary(19) default NULL + "x" varbinary(19) DEFAULT NULL ) CALL p1('test'); Table Create Table t1 CREATE TABLE "t1" ( - "x" varbinary(19) default NULL + "x" varbinary(19) DEFAULT NULL ) Warnings: Warning 1264 Out of range value for column 'x' at row 1 diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 5961c71223a..7b2edd98a5b 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -2087,7 +2087,7 @@ create table t3 as select bug2773()| show create table t3| Table Create Table t3 CREATE TABLE `t3` ( - `bug2773()` int(11) default NULL + `bug2773()` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t3| drop function bug2773| @@ -2148,7 +2148,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer Table Create Table t1 CREATE TABLE `t1` ( - `id` char(16) NOT NULL default '', + `id` char(16) NOT NULL DEFAULT '', `data` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Database Create Database @@ -2202,7 +2202,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer Table Create Table t1 CREATE TABLE `t1` ( - `id` char(16) NOT NULL default '', + `id` char(16) NOT NULL DEFAULT '', `data` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Database Create Database @@ -3521,7 +3521,7 @@ end| call bug12589_1()| Table Create Table tm1 CREATE TEMPORARY TABLE `tm1` ( - `spv1` decimal(3,3) default NULL + `spv1` decimal(3,3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Warnings: Warning 1264 Out of range value for column 'spv1' at row 1 @@ -3529,12 +3529,12 @@ Warning 1366 Incorrect decimal value: 'test' for column 'spv1' at row 1 call bug12589_2()| Table Create Table tm1 CREATE TEMPORARY TABLE `tm1` ( - `spv1` decimal(6,3) default NULL + `spv1` decimal(6,3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 call bug12589_3()| Table Create Table tm1 CREATE TEMPORARY TABLE `tm1` ( - `spv1` decimal(6,3) default NULL + `spv1` decimal(6,3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop procedure bug12589_1| drop procedure bug12589_2| diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index f9f8fd8446c..2f17962fc15 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -14,9 +14,9 @@ sql_mode show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL auto_increment, - `pseudo` varchar(35) character set latin2 NOT NULL default '', - `email` varchar(60) character set latin2 NOT NULL default '', + `a` int(11) NOT NULL AUTO_INCREMENT, + `pseudo` varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '', + `email` varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '', PRIMARY KEY (`a`), UNIQUE KEY `email` USING BTREE (`email`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC @@ -27,9 +27,9 @@ sql_mode ANSI_QUOTES show create table t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" int(11) NOT NULL auto_increment, - "pseudo" varchar(35) character set latin2 NOT NULL default '', - "email" varchar(60) character set latin2 NOT NULL default '', + "a" int(11) NOT NULL AUTO_INCREMENT, + "pseudo" varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '', + "email" varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '', PRIMARY KEY ("a"), UNIQUE KEY "email" USING BTREE ("email") ) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC @@ -40,9 +40,9 @@ sql_mode NO_TABLE_OPTIONS show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL auto_increment, - `pseudo` varchar(35) character set latin2 NOT NULL default '', - `email` varchar(60) character set latin2 NOT NULL default '', + `a` int(11) NOT NULL AUTO_INCREMENT, + `pseudo` varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '', + `email` varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '', PRIMARY KEY (`a`), UNIQUE KEY `email` USING BTREE (`email`) ) @@ -53,9 +53,9 @@ sql_mode NO_KEY_OPTIONS show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL auto_increment, - `pseudo` varchar(35) character set latin2 NOT NULL default '', - `email` varchar(60) character set latin2 NOT NULL default '', + `a` int(11) NOT NULL AUTO_INCREMENT, + `pseudo` varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '', + `email` varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '', PRIMARY KEY (`a`), UNIQUE KEY `email` (`email`) ) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC @@ -67,8 +67,8 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `pseudo` varchar(35) NOT NULL default '', - `email` varchar(60) NOT NULL default '', + `pseudo` varchar(35) NOT NULL DEFAULT '', + `email` varchar(60) NOT NULL DEFAULT '', PRIMARY KEY (`a`), UNIQUE KEY `email` (`email`) ) TYPE=HEAP ROW_FORMAT=DYNAMIC @@ -80,8 +80,8 @@ show create table t1; Table Create Table t1 CREATE TABLE "t1" ( "a" int(11) NOT NULL, - "pseudo" varchar(35) character set latin2 NOT NULL default '', - "email" varchar(60) character set latin2 NOT NULL default '', + "pseudo" varchar(35) CHARACTER SET latin2 NOT NULL DEFAULT '', + "email" varchar(60) CHARACTER SET latin2 NOT NULL DEFAULT '', PRIMARY KEY ("a"), UNIQUE KEY "email" ("email") ) @@ -95,25 +95,25 @@ set @@sql_mode=""; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) default NULL, - `b` char(10) character set latin1 collate latin1_bin default NULL, - `c` binary(10) default NULL + `a` char(10) DEFAULT NULL, + `b` char(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, + `c` binary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 set @@sql_mode="mysql323"; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) default NULL, - `b` char(10) binary default NULL, - `c` binary(10) default NULL + `a` char(10) DEFAULT NULL, + `b` char(10) binary DEFAULT NULL, + `c` binary(10) DEFAULT NULL ) TYPE=MyISAM set @@sql_mode="mysql40"; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(10) default NULL, - `b` char(10) binary default NULL, - `c` binary(10) default NULL + `a` char(10) DEFAULT NULL, + `b` char(10) binary DEFAULT NULL, + `c` binary(10) DEFAULT NULL ) TYPE=MyISAM drop table t1; set session sql_mode = ''; @@ -121,7 +121,7 @@ create table t1 ( min_num dec(6,6) default .000001); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `min_num` decimal(6,6) default '0.000001' + `min_num` decimal(6,6) DEFAULT '0.000001' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1 ; set session sql_mode = 'IGNORE_SPACE'; @@ -129,14 +129,14 @@ create table t1 ( min_num dec(6,6) default 0.000001); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `min_num` decimal(6,6) default '0.000001' + `min_num` decimal(6,6) DEFAULT '0.000001' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1 ; create table t1 ( min_num dec(6,6) default .000001); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `min_num` decimal(6,6) default '0.000001' + `min_num` decimal(6,6) DEFAULT '0.000001' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1 ; set @@SQL_MODE=NULL; @@ -148,8 +148,8 @@ f2 timestamp default current_timestamp on update current_timestamp); show create table t1; Table Create Table t1 CREATE TABLE "t1" ( - "f1" int(11) NOT NULL auto_increment, - "f2" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + "f1" int(11) NOT NULL AUTO_INCREMENT, + "f2" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY ("f1") ) set session sql_mode=no_field_options; @@ -157,7 +157,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `f1` int(11) NOT NULL, - `f2` timestamp NOT NULL default CURRENT_TIMESTAMP, + `f2` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`f1`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 836d2bac27c..92f1ba3a23e 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1009,7 +1009,7 @@ CREATE TABLE t1 (col1 INT NOT NULL default 99, col2 CHAR(6) NOT NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "col1" int(11) NOT NULL default '99', + "col1" int(11) NOT NULL DEFAULT '99', "col2" char(6) NOT NULL ) INSERT INTO t1 VALUES (1, 'hello'); @@ -1266,8 +1266,8 @@ alter table t1 add primary key(a); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', - `b` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `a` int(11) NOT NULL DEFAULT '0', + `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -1276,8 +1276,8 @@ alter table t1 add primary key(a); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', - `b` timestamp NOT NULL default '2005-01-02 03:04:05', + `a` int(11) NOT NULL DEFAULT '0', + `b` timestamp NOT NULL DEFAULT '2005-01-02 03:04:05', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 33b12c05f98..93ad18a4de0 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1087,24 +1087,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(1) NOT NULL default '0', - `(SELECT 1)` bigint(1) NOT NULL default '0' + `a` bigint(1) NOT NULL DEFAULT '0', + `(SELECT 1)` bigint(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(1) NOT NULL default '0', - `(SELECT a)` bigint(1) NOT NULL default '0' + `a` bigint(1) NOT NULL DEFAULT '0', + `(SELECT a)` bigint(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(1) NOT NULL default '0', - `(SELECT a+0)` bigint(3) NOT NULL default '0' + `a` bigint(1) NOT NULL DEFAULT '0', + `(SELECT a+0)` bigint(3) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a; @@ -1114,7 +1114,7 @@ a SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(20) NOT NULL default '0' + `a` bigint(20) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a int); diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 947a26aaef4..b3cb244c735 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -36,7 +36,7 @@ alter table t9 add column c int not null; show create table t9; Table Create Table t9 CREATE TABLE `t9` ( - `a` int(11) NOT NULL auto_increment, + `a` int(11) NOT NULL AUTO_INCREMENT, `b` char(16) NOT NULL, `c` int(11) NOT NULL, PRIMARY KEY (`a`) @@ -48,7 +48,7 @@ drop table t1; SHOW CREATE TABLE t9; Table Create Table t9 CREATE TABLE `t9` ( - `a` int(11) NOT NULL auto_increment, + `a` int(11) NOT NULL AUTO_INCREMENT, `b` char(16) NOT NULL, `c` int(11) NOT NULL, `d` int(11) NOT NULL, @@ -66,7 +66,7 @@ count(*) show create table mysqltest.t9; Table Create Table t9 CREATE TABLE `t9` ( - `a` int(11) NOT NULL auto_increment, + `a` int(11) NOT NULL AUTO_INCREMENT, `b` char(16) NOT NULL, `c` int(11) NOT NULL, `d` int(11) NOT NULL, @@ -84,24 +84,24 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` int(11) default NULL + `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` int(11) default NULL + `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL + `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) default NULL + `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/synchronization.result b/mysql-test/r/synchronization.result index 0b84697066c..697eb064998 100644 --- a/mysql-test/r/synchronization.result +++ b/mysql-test/r/synchronization.result @@ -5,7 +5,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -13,7 +13,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x1 x2 int; @@ -21,7 +21,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -29,7 +29,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x1 x2 int; @@ -37,7 +37,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -45,7 +45,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x1 x2 int; @@ -53,7 +53,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -61,7 +61,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x1 x2 int; @@ -69,7 +69,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -77,7 +77,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x1 x2 int; @@ -85,7 +85,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -93,7 +93,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x1 x2 int; @@ -101,7 +101,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -109,7 +109,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x1 x2 int; @@ -117,7 +117,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -125,7 +125,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x1 x2 int; @@ -133,7 +133,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -141,7 +141,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x1 x2 int; @@ -149,7 +149,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; ALTER TABLE t1 CHANGE x2 x1 int; @@ -157,7 +157,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `xx` int(11) default NULL + `xx` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result index 6fab0606159..21c698fc814 100644 --- a/mysql-test/r/system_mysql_db.result +++ b/mysql-test/r/system_mysql_db.result @@ -25,214 +25,214 @@ user show create table db; Table Create Table db CREATE TABLE `db` ( - `Host` char(60) collate utf8_bin NOT NULL default '', - `Db` char(64) collate utf8_bin NOT NULL default '', - `User` char(16) collate utf8_bin NOT NULL default '', - `Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Delete_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Drop_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Grant_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `References_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Index_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Event_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Trigger_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`Db`,`User`), KEY `User` (`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' show create table host; Table Create Table host CREATE TABLE `host` ( - `Host` char(60) collate utf8_bin NOT NULL default '', - `Db` char(64) collate utf8_bin NOT NULL default '', - `Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Delete_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Drop_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Grant_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `References_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Index_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Trigger_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`Db`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' show create table user; Table Create Table user CREATE TABLE `user` ( - `Host` char(60) collate utf8_bin NOT NULL default '', - `User` char(16) collate utf8_bin NOT NULL default '', - `Password` char(41) character set latin1 collate latin1_bin NOT NULL default '', - `Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Delete_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Drop_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Reload_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Shutdown_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Process_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `File_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Grant_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `References_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Index_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Show_db_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Super_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Repl_slave_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Repl_client_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Create_user_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Event_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `Trigger_priv` enum('N','Y') character set utf8 NOT NULL default 'N', - `ssl_type` enum('','ANY','X509','SPECIFIED') character set utf8 NOT NULL default '', + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', `ssl_cipher` blob NOT NULL, `x509_issuer` blob NOT NULL, `x509_subject` blob NOT NULL, - `max_questions` int(11) unsigned NOT NULL default '0', - `max_updates` int(11) unsigned NOT NULL default '0', - `max_connections` int(11) unsigned NOT NULL default '0', - `max_user_connections` int(11) unsigned NOT NULL default '0', + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' show create table func; Table Create Table func CREATE TABLE `func` ( - `name` char(64) collate utf8_bin NOT NULL default '', - `ret` tinyint(1) NOT NULL default '0', - `dl` char(128) collate utf8_bin NOT NULL default '', - `type` enum('function','aggregate') character set utf8 NOT NULL, + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( - `Host` char(60) collate utf8_bin NOT NULL default '', - `Db` char(64) collate utf8_bin NOT NULL default '', - `User` char(16) collate utf8_bin NOT NULL default '', - `Table_name` char(64) collate utf8_bin NOT NULL default '', - `Grantor` char(77) collate utf8_bin NOT NULL default '', - `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') character set utf8 NOT NULL default '', - `Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '', + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), KEY `Grantor` (`Grantor`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( - `Host` char(60) collate utf8_bin NOT NULL default '', - `Db` char(64) collate utf8_bin NOT NULL default '', - `User` char(16) collate utf8_bin NOT NULL default '', - `Table_name` char(64) collate utf8_bin NOT NULL default '', - `Column_name` char(64) collate utf8_bin NOT NULL default '', - `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '', + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' show create table procs_priv; Table Create Table procs_priv CREATE TABLE `procs_priv` ( - `Host` char(60) collate utf8_bin NOT NULL default '', - `Db` char(64) collate utf8_bin NOT NULL default '', - `User` char(16) collate utf8_bin NOT NULL default '', - `Routine_name` char(64) collate utf8_bin NOT NULL default '', - `Routine_type` enum('FUNCTION','PROCEDURE') collate utf8_bin NOT NULL, - `Grantor` char(77) collate utf8_bin NOT NULL default '', - `Proc_priv` set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '', - `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), KEY `Grantor` (`Grantor`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' show create table proc; Table Create Table proc CREATE TABLE `proc` ( - `db` char(64) character set utf8 collate utf8_bin NOT NULL default '', - `name` char(64) NOT NULL default '', + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', `type` enum('FUNCTION','PROCEDURE') NOT NULL, - `specific_name` char(64) NOT NULL default '', - `language` enum('SQL') NOT NULL default 'SQL', - `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL default 'CONTAINS_SQL', - `is_deterministic` enum('YES','NO') NOT NULL default 'NO', - `security_type` enum('INVOKER','DEFINER') NOT NULL default 'DEFINER', + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', `param_list` blob NOT NULL, - `returns` char(64) NOT NULL default '', + `returns` char(64) NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(77) character set utf8 collate utf8_bin NOT NULL default '', - `created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL default '0000-00-00 00:00:00', - `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default '', - `comment` char(64) character set utf8 collate utf8_bin NOT NULL default '', + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', PRIMARY KEY (`db`,`name`,`type`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' show create table event; Table Create Table event CREATE TABLE `event` ( - `db` char(64) character set utf8 collate utf8_bin NOT NULL default '', - `name` char(64) character set utf8 collate utf8_bin NOT NULL default '', + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `body` longblob NOT NULL, - `definer` char(77) character set utf8 collate utf8_bin NOT NULL default '', - `execute_at` datetime default NULL, - `interval_value` int(11) default NULL, - `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL, - `created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL default '0000-00-00 00:00:00', - `last_executed` datetime default NULL, - `starts` datetime default NULL, - `ends` datetime default NULL, - `status` enum('ENABLED','DISABLED') NOT NULL default 'ENABLED', - `on_completion` enum('DROP','PRESERVE') NOT NULL default 'DROP', - `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default '', - `comment` char(64) character set utf8 collate utf8_bin NOT NULL default '', + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', PRIMARY KEY (`definer`,`db`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( - `event_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `user_host` mediumtext, - `thread_id` int(11) default NULL, - `server_id` int(11) default NULL, - `command_type` varchar(64) default NULL, + `thread_id` int(11) DEFAULT NULL, + `server_id` int(11) DEFAULT NULL, + `command_type` varchar(64) DEFAULT NULL, `argument` mediumtext ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log' show create table slow_log; Table Create Table slow_log CREATE TABLE `slow_log` ( - `start_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `user_host` mediumtext NOT NULL, `query_time` time NOT NULL, `lock_time` time NOT NULL, `rows_sent` int(11) NOT NULL, `rows_examined` int(11) NOT NULL, - `db` varchar(512) default NULL, - `last_insert_id` int(11) default NULL, - `insert_id` int(11) default NULL, - `server_id` int(11) default NULL, + `db` varchar(512) DEFAULT NULL, + `last_insert_id` int(11) DEFAULT NULL, + `insert_id` int(11) DEFAULT NULL, + `server_id` int(11) DEFAULT NULL, `sql_text` mediumtext NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' show tables; diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result index c5570e7b4f7..2b3e9087cf7 100644 --- a/mysql-test/r/temp_table.result +++ b/mysql-test/r/temp_table.result @@ -108,7 +108,7 @@ This is temp. table show create table v1; Table Create Table v1 CREATE TEMPORARY TABLE `v1` ( - `A` varchar(19) NOT NULL default '' + `A` varchar(19) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create view v1; View Create View diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 62c0d01327d..a0a51013caa 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -630,7 +630,7 @@ set sql_mode=default; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` date default NULL + `a` date DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show triggers; Trigger Event Table Statement Timing Created sql_mode Definer diff --git a/mysql-test/r/type_binary.result b/mysql-test/r/type_binary.result index 34cbc9efabf..0b340502eaf 100644 --- a/mysql-test/r/type_binary.result +++ b/mysql-test/r/type_binary.result @@ -21,8 +21,8 @@ create table t1 (s1 varbinary(20), s2 varbinary(20)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `s1` varbinary(20) default NULL, - `s2` varbinary(20) default NULL + `s1` varbinary(20) DEFAULT NULL, + `s2` varbinary(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (0x41,0x4100),(0x41,0x4120),(0x4100,0x4120); select hex(s1), hex(s2) from t1; diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result index 2b69fc79835..298ee9678a2 100644 --- a/mysql-test/r/type_bit.result +++ b/mysql-test/r/type_bit.result @@ -41,7 +41,7 @@ create table t1 (a bit(0)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) default NULL + `a` bit(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a bit(64)); @@ -494,7 +494,7 @@ a+0 show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` bit(7) default NULL + `a` bit(7) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; create table t1 (id1 int(11), b1 bit(1)); diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result index 3481159396c..fcaa9bfedda 100644 --- a/mysql-test/r/type_bit_innodb.result +++ b/mysql-test/r/type_bit_innodb.result @@ -41,7 +41,7 @@ create table t1 (a bit(0)) engine=innodb; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) default NULL + `a` bit(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1; create table t1 (a bit(64)) engine=innodb; @@ -384,21 +384,21 @@ create table t1 (a bit, b bit(10)) engine=innodb; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) default NULL, - `b` bit(10) default NULL + `a` bit(1) DEFAULT NULL, + `b` bit(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 alter table t1 engine=heap; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) default NULL, - `b` bit(10) default NULL + `a` bit(1) DEFAULT NULL, + `b` bit(10) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 alter table t1 engine=innodb; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bit(1) default NULL, - `b` bit(10) default NULL + `a` bit(1) DEFAULT NULL, + `b` bit(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index df921acb6db..e2b3b8f8887 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -29,7 +29,7 @@ t3 CREATE TABLE `t3` ( show create TABLE t4; Table Create Table t4 CREATE TABLE `t4` ( - `c` mediumtext character set utf8 NOT NULL + `c` mediumtext CHARACTER SET utf8 NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2,t3,t4; CREATE TABLE t1 (a char(257) default "hello"); @@ -709,11 +709,11 @@ alter table t1 add key (a,b,d,e); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', - `b` int(11) NOT NULL default '0', + `a` int(11) NOT NULL DEFAULT '0', + `b` int(11) NOT NULL DEFAULT '0', `c` tinyblob NOT NULL, - `d` int(11) NOT NULL default '0', - `e` int(11) default NULL, + `d` int(11) NOT NULL DEFAULT '0', + `e` int(11) DEFAULT NULL, PRIMARY KEY (`a`,`b`,`c`(255),`d`), KEY `a` (`a`,`b`,`d`,`e`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index 4ca1a3bc186..d781e48c54a 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -709,14 +709,14 @@ create table t1 (d decimal(5)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `d` decimal(5,0) default NULL + `d` decimal(5,0) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (d decimal); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `d` decimal(10,0) default NULL + `d` decimal(10,0) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (d decimal(66,0)); diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index 02ba3c7ebd3..251af31249a 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1633,7 +1633,7 @@ create table t1 (a enum (' ','a','b ') not null default 'b '); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('','a','b') NOT NULL default 'b' + `a` enum('','a','b') NOT NULL DEFAULT 'b' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a enum ('0','1')); @@ -1658,7 +1658,7 @@ a enum(' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('','1','2') NOT NULL default '' + `a` enum('','1','2') NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; set names latin1; @@ -1669,7 +1669,7 @@ b ENUM('value',' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) default '1', + `a` int(11) DEFAULT '1', `b` enum('value','_value','') NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show columns from t1; @@ -1699,7 +1699,7 @@ a ENUM(' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('','','') character set utf8 default '' + `a` enum('','','') CHARACTER SET utf8 DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (''), (''), (''); select a from t1 order by a; @@ -1717,7 +1717,7 @@ set names latin1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('','','') default '' + `a` enum('','','') DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select a from t1 order by a; a diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 5327acc207f..d3c80a7c80e 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -91,10 +91,10 @@ col1 col2 col3 col4 show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `col1` double default NULL, - `col2` double(53,5) default NULL, - `col3` double default NULL, - `col4` double default NULL + `col1` double DEFAULT NULL, + `col2` double(53,5) DEFAULT NULL, + `col3` double DEFAULT NULL, + `col4` double DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2; create table t1 (a float); @@ -237,7 +237,7 @@ d show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `d` double(22,9) default NULL + `d` double(22,9) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2, t3; create table t1 select 105213674794682365.00 + 0.0 x; diff --git a/mysql-test/r/type_nchar.result b/mysql-test/r/type_nchar.result index f844b3b0241..95741d37e2a 100644 --- a/mysql-test/r/type_nchar.result +++ b/mysql-test/r/type_nchar.result @@ -3,48 +3,48 @@ create table t1 (c nchar(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` char(10) character set utf8 default NULL + `c` char(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c national char(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` char(10) character set utf8 default NULL + `c` char(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c national varchar(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` varchar(10) character set utf8 default NULL + `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c nvarchar(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` varchar(10) character set utf8 default NULL + `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c nchar varchar(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` varchar(10) character set utf8 default NULL + `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c national character varying(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` varchar(10) character set utf8 default NULL + `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (c nchar varying(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` varchar(10) character set utf8 default NULL + `c` varchar(10) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 430bf30b900..f96d5e383f4 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -52,13 +52,13 @@ if(1, 1.1, 1.2) if(0, 1.1, 1.2) if(0.1, 1.1, 1.2) if(0, 1, 1.1) if(0, NULL, 1.2) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `if(1, 1.1, 1.2)` decimal(2,1) NOT NULL default '0.0', - `if(0, 1.1, 1.2)` decimal(2,1) NOT NULL default '0.0', - `if(0.1, 1.1, 1.2)` decimal(2,1) NOT NULL default '0.0', - `if(0, 1, 1.1)` decimal(2,1) NOT NULL default '0.0', - `if(0, NULL, 1.2)` decimal(2,1) default NULL, - `if(1, 0.22e1, 1.1)` double NOT NULL default '0', - `if(1E0, 1.1, 1.2)` decimal(2,1) NOT NULL default '0.0' + `if(1, 1.1, 1.2)` decimal(2,1) NOT NULL DEFAULT '0.0', + `if(0, 1.1, 1.2)` decimal(2,1) NOT NULL DEFAULT '0.0', + `if(0.1, 1.1, 1.2)` decimal(2,1) NOT NULL DEFAULT '0.0', + `if(0, 1, 1.1)` decimal(2,1) NOT NULL DEFAULT '0.0', + `if(0, NULL, 1.2)` decimal(2,1) DEFAULT NULL, + `if(1, 0.22e1, 1.1)` double NOT NULL DEFAULT '0', + `if(1E0, 1.1, 1.2)` decimal(2,1) NOT NULL DEFAULT '0.0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 select nullif(1.1, 1.1), nullif(1.1, 1.2), nullif(1.1, 0.11e1), nullif(1.0, 1), nullif(1, 1.0), nullif(1, 1.1); @@ -68,12 +68,12 @@ NULL 1.1 NULL NULL NULL 1 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `nullif(1.1, 1.1)` decimal(2,1) unsigned default NULL, - `nullif(1.1, 1.2)` decimal(2,1) unsigned default NULL, - `nullif(1.1, 0.11e1)` decimal(2,1) unsigned default NULL, - `nullif(1.0, 1)` decimal(2,1) unsigned default NULL, - `nullif(1, 1.0)` int(1) default NULL, - `nullif(1, 1.1)` int(1) default NULL + `nullif(1.1, 1.1)` decimal(2,1) unsigned DEFAULT NULL, + `nullif(1.1, 1.2)` decimal(2,1) unsigned DEFAULT NULL, + `nullif(1.1, 0.11e1)` decimal(2,1) unsigned DEFAULT NULL, + `nullif(1.0, 1)` decimal(2,1) unsigned DEFAULT NULL, + `nullif(1, 1.0)` int(1) DEFAULT NULL, + `nullif(1, 1.1)` int(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a decimal(4,2)); @@ -174,10 +174,10 @@ create table t1 select round(15.4,-1), truncate(-5678.123451,-3), abs(-1.1), -(- show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `round(15.4,-1)` decimal(3,0) unsigned NOT NULL default '0', - `truncate(-5678.123451,-3)` decimal(4,0) NOT NULL default '0', - `abs(-1.1)` decimal(2,1) NOT NULL default '0.0', - `-(-1.1)` decimal(2,1) NOT NULL default '0.0' + `round(15.4,-1)` decimal(3,0) unsigned NOT NULL DEFAULT '0', + `truncate(-5678.123451,-3)` decimal(4,0) NOT NULL DEFAULT '0', + `abs(-1.1)` decimal(2,1) NOT NULL DEFAULT '0.0', + `-(-1.1)` decimal(2,1) NOT NULL DEFAULT '0.0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; set session sql_mode='traditional'; @@ -771,7 +771,7 @@ create table t1 as select 0.5; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `0.5` decimal(2,1) unsigned NOT NULL default '0.0' + `0.5` decimal(2,1) unsigned NOT NULL DEFAULT '0.0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select round(1.5),round(2.5); @@ -930,14 +930,14 @@ create table t1 (sl decimal(5, 5)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `sl` decimal(5,5) default NULL + `sl` decimal(5,5) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (sl decimal(65, 30)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `sl` decimal(65,30) default NULL + `sl` decimal(65,30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 ( @@ -969,8 +969,8 @@ f1 decimal (0,0) zerofill not null default 0); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f0` decimal(30,30) unsigned zerofill NOT NULL default '0.000000000000000000000000000000', - `f1` decimal(10,0) unsigned zerofill NOT NULL default '0000000000' + `f0` decimal(30,30) unsigned zerofill NOT NULL DEFAULT '0.000000000000000000000000000000', + `f1` decimal(10,0) unsigned zerofill NOT NULL DEFAULT '0000000000' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; drop procedure if exists wg2; @@ -1019,10 +1019,10 @@ my_decimal DECIMAL(65,30) SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `my_float` float default NULL, - `my_double` double default NULL, - `my_varchar` varchar(50) default NULL, - `my_decimal` decimal(65,30) default NULL + `my_float` float DEFAULT NULL, + `my_double` double DEFAULT NULL, + `my_varchar` varchar(50) DEFAULT NULL, + `my_decimal` decimal(65,30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 SET my_float = 1.175494345e-32, my_double = 1.175494345e-32, diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index fdda4aca25c..36022383f1b 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -10,7 +10,7 @@ create table t1 (a set (' ','a','b ') not null default 'b '); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` set('','a','b') NOT NULL default 'b' + `a` set('','a','b') NOT NULL DEFAULT 'b' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 ( user varchar(64) NOT NULL default '', path varchar(255) NOT NULL default '', privilege set('select','RESERVED30','RESERVED29','RESERVED28','RESERVED27','RESERVED26', 'RESERVED25','RESERVED24','data.delete','RESERVED22','RESERVED21', 'RESERVED20','data.insert.none','data.insert.approve', 'data.insert.delete','data.insert.move','data.insert.propose', 'data.insert.reject','RESERVED13','RESERVED12','RESERVED11','RESERVED10', 'RESERVED09','data.update','RESERVED07','RESERVED06','RESERVED05', 'RESERVED04','metadata.delete','metadata.put','RESERVED01','RESERVED00') NOT NULL default '', KEY user (user) ) ENGINE=MyISAM CHARSET=utf8; @@ -20,7 +20,7 @@ create table t1 (s set ('a','A') character set latin1 collate latin1_bin); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `s` set('a','A') character set latin1 collate latin1_bin default NULL + `s` set('a','A') CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('a'),('a,A'),('A,a'),('A'); select s from t1 order by s; diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 61ed6bbabf3..38f8ce08368 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -194,9 +194,9 @@ t1 t2 t3 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t1` timestamp NOT NULL default '2003-01-01 00:00:00', - `t2` datetime default NULL, - `t3` timestamp NOT NULL default '0000-00-00 00:00:00' + `t1` timestamp NOT NULL DEFAULT '2003-01-01 00:00:00', + `t2` datetime DEFAULT NULL, + `t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show columns from t1; Field Type Null Key Default Extra @@ -218,9 +218,9 @@ t1 t2 t3 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t1` timestamp NOT NULL default CURRENT_TIMESTAMP, - `t2` datetime default NULL, - `t3` timestamp NOT NULL default '0000-00-00 00:00:00' + `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `t2` datetime DEFAULT NULL, + `t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show columns from t1; Field Type Null Key Default Extra @@ -245,8 +245,8 @@ t1 t2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t1` timestamp NOT NULL default '2003-01-01 00:00:00' on update CURRENT_TIMESTAMP, - `t2` datetime default NULL + `t1` timestamp NOT NULL DEFAULT '2003-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + `t2` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show columns from t1; Field Type Null Key Default Extra @@ -270,8 +270,8 @@ t1 t2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t1` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `t2` datetime default NULL + `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `t2` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show columns from t1; Field Type Null Key Default Extra @@ -295,9 +295,9 @@ t1 t2 t3 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t1` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `t2` datetime default NULL, - `t3` timestamp NOT NULL default '0000-00-00 00:00:00' + `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `t2` datetime DEFAULT NULL, + `t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show columns from t1; Field Type Null Key Default Extra @@ -322,8 +322,8 @@ t1 t2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t1` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `t2` datetime default NULL + `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `t2` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show columns from t1; Field Type Null Key Default Extra @@ -377,8 +377,8 @@ create table t1 (a timestamp null, b timestamp null); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` timestamp NULL default NULL, - `b` timestamp NULL default NULL + `a` timestamp NULL DEFAULT NULL, + `b` timestamp NULL DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (NULL, NULL); SET TIMESTAMP=1000000017; @@ -392,8 +392,8 @@ create table t1 (a timestamp null default current_timestamp on update current_ti show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `b` timestamp NULL default NULL + `a` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `b` timestamp NULL DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (NULL, NULL); SET TIMESTAMP=1000000018; @@ -407,8 +407,8 @@ create table t1 (a timestamp null default null, b timestamp null default '2003-0 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` timestamp NULL default NULL, - `b` timestamp NULL default '2003-01-01 00:00:00' + `a` timestamp NULL DEFAULT NULL, + `b` timestamp NULL DEFAULT '2003-01-01 00:00:00' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (NULL, NULL); insert into t1 values (DEFAULT, DEFAULT); @@ -439,8 +439,8 @@ create table t1 (a timestamp, b timestamp(19)); show create table t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" datetime default NULL, - "b" datetime default NULL + "a" datetime DEFAULT NULL, + "b" datetime DEFAULT NULL ) set sql_mode=''; drop table t1; diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result index 1de87ad529e..6ddd8a7f68e 100644 --- a/mysql-test/r/type_varchar.result +++ b/mysql-test/r/type_varchar.result @@ -4,17 +4,17 @@ truncate table vchar; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `v` varchar(30) default NULL, - `c` char(3) default NULL, - `e` enum('abc','def','ghi') default NULL, + `v` varchar(30) DEFAULT NULL, + `c` char(3) DEFAULT NULL, + `e` enum('abc','def','ghi') DEFAULT NULL, `t` text ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create table vchar; Table Create Table vchar CREATE TABLE `vchar` ( - `v` varchar(30) default NULL, - `c` char(3) default NULL, - `e` enum('abc','def','ghi') default NULL, + `v` varchar(30) DEFAULT NULL, + `c` char(3) DEFAULT NULL, + `e` enum('abc','def','ghi') DEFAULT NULL, `t` text ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('abc', 'de', 'ghi', 'jkl'); @@ -37,11 +37,11 @@ alter table vchar add i int; show create table vchar; Table Create Table vchar CREATE TABLE `vchar` ( - `v` varchar(30) default NULL, - `c` char(3) default NULL, - `e` enum('abc','def','ghi') default NULL, + `v` varchar(30) DEFAULT NULL, + `c` char(3) DEFAULT NULL, + `e` enum('abc','def','ghi') DEFAULT NULL, `t` text, - `i` int(11) default NULL + `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select length(v),length(c),length(e),length(t) from vchar; length(v) length(c) length(e) length(t) @@ -397,14 +397,14 @@ create index index1 on t1(f1(10)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` varchar(65500) default NULL, + `f1` varchar(65500) DEFAULT NULL, KEY `index1` (`f1`(10)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 modify f1 varchar(255); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` varchar(255) default NULL, + `f1` varchar(255) DEFAULT NULL, KEY `index1` (`f1`(10)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 modify f1 tinytext; diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index f2708a50c77..9e7d82727c7 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -543,7 +543,7 @@ aa show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(2) NOT NULL default '' + `a` varchar(2) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT 12 as a UNION select "aa" as a; @@ -554,7 +554,7 @@ aa show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(20) NOT NULL default '' + `a` varbinary(20) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT 12 as a UNION select 12.2 as a; @@ -565,7 +565,7 @@ a show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` decimal(3,1) NOT NULL default '0.0' + `a` decimal(3,1) NOT NULL DEFAULT '0.0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t2 (it1 tinyint, it2 tinyint not null, i int not null, ib bigint, f float, d double, y year, da date, dt datetime, sc char(10), sv varchar(10), b blob, tx text); @@ -578,7 +578,7 @@ NULL show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `it2` tinyint(4) default NULL + `it2` tinyint(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT it2 from t2 UNION select i from t2; @@ -589,7 +589,7 @@ it2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `it2` int(11) NOT NULL default '0' + `it2` int(11) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT i from t2 UNION select f from t2; @@ -600,7 +600,7 @@ i show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` double default NULL + `i` double DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT f from t2 UNION select d from t2; @@ -611,7 +611,7 @@ f show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f` double default NULL + `f` double DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT ib from t2 UNION select f from t2; @@ -622,7 +622,7 @@ ib show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `ib` double default NULL + `ib` double DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT ib from t2 UNION select d from t2; @@ -633,7 +633,7 @@ ib show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `ib` double default NULL + `ib` double DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT f from t2 UNION select y from t2; @@ -644,7 +644,7 @@ f show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f` float default NULL + `f` float DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT f from t2 UNION select da from t2; @@ -655,7 +655,7 @@ f show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f` varbinary(24) default NULL + `f` varbinary(24) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT y from t2 UNION select da from t2; @@ -666,7 +666,7 @@ y show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `y` varbinary(10) default NULL + `y` varbinary(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT y from t2 UNION select dt from t2; @@ -677,7 +677,7 @@ y show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `y` varbinary(19) default NULL + `y` varbinary(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT da from t2 UNION select dt from t2; @@ -688,7 +688,7 @@ da show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `da` datetime default NULL + `da` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT dt from t2 UNION select sc from t2; @@ -699,7 +699,7 @@ testc show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `dt` varbinary(19) default NULL + `dt` varbinary(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT dt from t2 UNION select sv from t2; @@ -710,7 +710,7 @@ testv show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `dt` varbinary(19) default NULL + `dt` varbinary(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT sc from t2 UNION select sv from t2; @@ -721,7 +721,7 @@ testv show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `sc` varchar(10) default NULL + `sc` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT dt from t2 UNION select b from t2; @@ -788,7 +788,7 @@ select * from t1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `1` bigint(20) NOT NULL default '0' + `1` bigint(20) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 select _latin1"test" union select _latin2"testt" ; @@ -797,7 +797,7 @@ create table t1 select _latin2"test" union select _latin2"testt" ; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `test` varchar(5) character set latin2 NOT NULL default '' + `test` varchar(5) CHARACTER SET latin2 NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (s char(200)); @@ -1041,7 +1041,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `test` varchar(4) NOT NULL default '' + `test` varchar(4) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select count(*) from t1; count(*) @@ -1054,7 +1054,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `_latin1'test' collate latin1_bin` varchar(4) character set latin1 collate latin1_bin NOT NULL default '' + `_latin1'test' collate latin1_bin` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select count(*) from t1; count(*) @@ -1067,7 +1067,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `test` varchar(4) character set latin1 collate latin1_bin NOT NULL default '' + `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select count(*) from t1; count(*) @@ -1080,7 +1080,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `test` varchar(4) character set latin1 collate latin1_bin NOT NULL default '' + `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select count(*) from t1; count(*) @@ -1099,7 +1099,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a collate latin1_german1_ci` varchar(1) character set latin1 collate latin1_german1_ci default NULL + `a collate latin1_german1_ci` varchar(1) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as @@ -1108,7 +1108,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) character set latin1 collate latin1_german1_ci default NULL + `a` varchar(1) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as @@ -1118,7 +1118,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1) character set latin1 collate latin1_german1_ci default NULL + `a` varchar(1) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; drop table t2; @@ -1193,9 +1193,9 @@ c ENUM("one", "two") show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('','','') character set utf8 NOT NULL default '', - `b` enum('one','two') character set utf8 default NULL, - `c` enum('one','two') default NULL + `a` enum('','','') CHARACTER SET utf8 NOT NULL DEFAULT '', + `b` enum('one','two') CHARACTER SET utf8 DEFAULT NULL, + `c` enum('one','two') DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values ('', 'one', 'one'), ('', 'two', 'one'), ('', NULL, NULL); create table t2 select NULL union select a from t1; @@ -1251,7 +1251,7 @@ create table t2 select * from t1 union select 'abcdefghijkl'; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(12) default NULL + `a` varchar(12) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select row_format from information_schema.TABLES where table_schema="test" and table_name="t2"; row_format @@ -1260,7 +1260,7 @@ alter table t2 ROW_FORMAT=fixed; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(12) default NULL + `a` varchar(12) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED drop table t1,t2; CREATE TABLE t1 (a mediumtext); diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 75a680e504d..8f2b89c18fd 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -231,7 +231,7 @@ create table t1 select @first_var; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `@first_var` bigint(20) default NULL + `@first_var` bigint(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; set @first_var= NULL; @@ -239,7 +239,7 @@ create table t1 select @first_var; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `@first_var` bigint(20) default NULL + `@first_var` bigint(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; set @first_var= concat(NULL); diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 8f839fc09a8..ec8a715de1b 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -495,11 +495,11 @@ c5 bigint); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` tinyint(4) default NULL, - `c2` smallint(6) default NULL, - `c3` mediumint(9) default NULL, - `c4` int(11) default NULL, - `c5` bigint(20) default NULL + `c1` tinyint(4) DEFAULT NULL, + `c2` smallint(6) DEFAULT NULL, + `c3` mediumint(9) DEFAULT NULL, + `c4` int(11) DEFAULT NULL, + `c5` bigint(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; set @arg00= 8, @arg01= 8.8, @arg02= 'a string', @arg03= 0.2e0; @@ -507,10 +507,10 @@ create table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` bigint(20) default NULL, - `c2` decimal(65,30) default NULL, + `c1` bigint(20) DEFAULT NULL, + `c2` decimal(65,30) DEFAULT NULL, `c3` longtext, - `c4` double default NULL + `c4` double DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; SET GLOBAL MYISAM_DATA_POINTER_SIZE= 7; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 5b25141ee28..cc2bec73ccf 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -963,7 +963,7 @@ store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, { if (field->charset() != share->table_charset) { - packet->append(STRING_WITH_LEN(" character set ")); + packet->append(STRING_WITH_LEN(" CHARACTER SET ")); packet->append(field->charset()->csname); } /* @@ -972,7 +972,7 @@ store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, */ if (!(field->charset()->state & MY_CS_PRIMARY)) { - packet->append(STRING_WITH_LEN(" collate ")); + packet->append(STRING_WITH_LEN(" COLLATE ")); packet->append(field->charset()->name); } } @@ -1003,7 +1003,7 @@ store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, if (has_default) { - packet->append(STRING_WITH_LEN(" default ")); + packet->append(STRING_WITH_LEN(" DEFAULT ")); if (has_now_default) packet->append(STRING_WITH_LEN("CURRENT_TIMESTAMP")); else if (!field->is_null()) @@ -1031,11 +1031,11 @@ store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, if (!(thd->variables.sql_mode & MODE_NO_FIELD_OPTIONS) && table->timestamp_field == field && field->unireg_check != Field::TIMESTAMP_DN_FIELD) - packet->append(STRING_WITH_LEN(" on update CURRENT_TIMESTAMP")); + packet->append(STRING_WITH_LEN(" ON UPDATE CURRENT_TIMESTAMP")); if (field->unireg_check == Field::NEXT_NUMBER && !(thd->variables.sql_mode & MODE_NO_FIELD_OPTIONS)) - packet->append(STRING_WITH_LEN(" auto_increment")); + packet->append(STRING_WITH_LEN(" AUTO_INCREMENT")); if (field->comment.length) { From 701b69914421935de129ea9c7e4ce8cc0afe1969 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Feb 2006 11:17:40 +0100 Subject: [PATCH 04/65] Bug#17377 Federated Engine returns wrong Data, always the rows with the highest ID - Always make rnd_pos reposition the cursor in the fetched result set. mysql-test/r/federated.result: Update test result mysql-test/t/federated.test: Add test for bug#17377 sql/ha_federated.cc: Remove the "scan_flag" variable. rnd_pos should always move to a new position in the result set. The "scan" flag in rnd_init will protect from the old result set being closed and a new fecthed. I think the "scan_flag" was added before check of the "scan" argument in rnd_init was added. sql/ha_federated.h: Remove class variable "scan_flag" --- mysql-test/r/federated.result | 43 +++++++++++++++++++++++++++ mysql-test/t/federated.test | 55 +++++++++++++++++++++++++++++++++++ sql/ha_federated.cc | 29 ++++++------------ sql/ha_federated.h | 1 - 4 files changed, 107 insertions(+), 21 deletions(-) diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result index c1e7533bcee..f11da4ee62f 100644 --- a/mysql-test/r/federated.result +++ b/mysql-test/r/federated.result @@ -1558,6 +1558,49 @@ id 3 4 5 +DROP TABLE IF EXISTS federated.bug_17377_table; +CREATE TABLE federated.bug_17377_table ( +`fld_cid` bigint(20) NOT NULL auto_increment, +`fld_name` varchar(255) NOT NULL default '', +`fld_parentid` bigint(20) NOT NULL default '0', +`fld_delt` int(1) NOT NULL default '0', +PRIMARY KEY (`fld_cid`), +KEY `fld_parentid` (`fld_parentid`), +KEY `fld_delt` (`fld_delt`), +KEY `fld_cid` (`fld_cid`) +) ENGINE=MyISAM; +insert into federated.bug_17377_table( fld_name ) +values +("Mats"), ("Sivert"), ("Sigvard"), ("Torgny"), ("Torkel"); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`fld_cid` bigint(20) NOT NULL auto_increment, +`fld_name` varchar(255) NOT NULL default '', +`fld_parentid` bigint(20) NOT NULL default '0', +`fld_delt` int(1) NOT NULL default '0', +PRIMARY KEY (`fld_cid`), +KEY `fld_parentid` (`fld_parentid`), +KEY `fld_delt` (`fld_delt`), +KEY `fld_cid` (`fld_cid`) +) ENGINE=FEDERATED +CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/bug_17377_table'; +select * from federated.t1 where fld_parentid=0 and fld_delt=0 +order by fld_name; +fld_cid fld_name fld_parentid fld_delt +1 Mats 0 0 +3 Sigvard 0 0 +2 Sivert 0 0 +4 Torgny 0 0 +5 Torkel 0 0 +select * from federated.t1 where fld_parentid=0 and fld_delt=0; +fld_cid fld_name fld_parentid fld_delt +1 Mats 0 0 +2 Sivert 0 0 +3 Sigvard 0 0 +4 Torgny 0 0 +5 Torkel 0 0 +DROP TABLE federated.t1; +DROP TABLE federated.bug_17377_table; DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; DROP TABLE IF EXISTS federated.t1; diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test index d1e03f8a05a..80b31c610a2 100644 --- a/mysql-test/t/federated.test +++ b/mysql-test/t/federated.test @@ -1255,4 +1255,59 @@ INSERT INTO federated.t1 VALUES (); SELECT LAST_INSERT_ID(); SELECT * FROM federated.t1; +# +# Bug#17377 Federated Engine returns wrong Data, always the rows +# with the highest ID +# + +connection slave; + +--disable_warnings +DROP TABLE IF EXISTS federated.bug_17377_table; +--enable_warnings + +CREATE TABLE federated.bug_17377_table ( +`fld_cid` bigint(20) NOT NULL auto_increment, +`fld_name` varchar(255) NOT NULL default '', +`fld_parentid` bigint(20) NOT NULL default '0', +`fld_delt` int(1) NOT NULL default '0', +PRIMARY KEY (`fld_cid`), +KEY `fld_parentid` (`fld_parentid`), +KEY `fld_delt` (`fld_delt`), +KEY `fld_cid` (`fld_cid`) +) ENGINE=MyISAM; + +# Insert some test-data +insert into federated.bug_17377_table( fld_name ) +values +("Mats"), ("Sivert"), ("Sigvard"), ("Torgny"), ("Torkel"); + +connection master; +--disable_warnings +DROP TABLE IF EXISTS federated.t1; +--enable_warnings + +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval CREATE TABLE federated.t1 ( +`fld_cid` bigint(20) NOT NULL auto_increment, +`fld_name` varchar(255) NOT NULL default '', +`fld_parentid` bigint(20) NOT NULL default '0', +`fld_delt` int(1) NOT NULL default '0', +PRIMARY KEY (`fld_cid`), +KEY `fld_parentid` (`fld_parentid`), +KEY `fld_delt` (`fld_delt`), +KEY `fld_cid` (`fld_cid`) +) ENGINE=FEDERATED +CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/bug_17377_table'; + +select * from federated.t1 where fld_parentid=0 and fld_delt=0 +order by fld_name; + +select * from federated.t1 where fld_parentid=0 and fld_delt=0; + +DROP TABLE federated.t1; +connection slave; +DROP TABLE federated.bug_17377_table; + + source include/federated_cleanup.inc; diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index af7c987e477..c6d5c77803b 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -740,7 +740,7 @@ error: ha_federated::ha_federated(TABLE *table_arg) :handler(&federated_hton, table_arg), - mysql(0), stored_result(0), scan_flag(0), + mysql(0), stored_result(0), ref_length(sizeof(MYSQL_ROW_OFFSET)), current_position(0) {} @@ -2243,7 +2243,7 @@ int ha_federated::rnd_init(bool scan) containing the correct record, hence update the wrong row! */ - scan_flag= scan; + if (scan) { DBUG_PRINT("info", ("share->select_query %s", share->select_query)); @@ -2365,24 +2365,13 @@ void ha_federated::position(const byte *record) int ha_federated::rnd_pos(byte *buf, byte *pos) { DBUG_ENTER("ha_federated::rnd_pos"); - /* - we do not need to do any of this if there has been a scan performed - already, or if this is an update and index_read_idx already has a result - set in which to build it's update query from - */ - if (scan_flag) - { - int retval; - statistic_increment(table->in_use->status_var.ha_read_rnd_count, - &LOCK_status); - memcpy_fixed(¤t_position, pos, sizeof(MYSQL_ROW_OFFSET)); // pos - /* is not aligned */ - stored_result->current_row= 0; - stored_result->data_cursor= current_position; - retval= rnd_next(buf); - DBUG_RETURN(retval); - } - DBUG_RETURN(0); + + statistic_increment(table->in_use->status_var.ha_read_rnd_count, + &LOCK_status); + memcpy_fixed(¤t_position, pos, sizeof(MYSQL_ROW_OFFSET)); + stored_result->current_row= 0; + stored_result->data_cursor= current_position; + DBUG_RETURN(rnd_next(buf)); } diff --git a/sql/ha_federated.h b/sql/ha_federated.h index 08203d7e51d..cafd1fe59a5 100644 --- a/sql/ha_federated.h +++ b/sql/ha_federated.h @@ -153,7 +153,6 @@ class ha_federated: public handler FEDERATED_SHARE *share; /* Shared lock info */ MYSQL *mysql; /* MySQL connection */ MYSQL_RES *stored_result; - bool scan_flag; uint ref_length; uint fetch_num; // stores the fetch num MYSQL_ROW_OFFSET current_position; // Current position used by ::position() From c64c108eda29fbcb397a694056708261f2891916 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Mar 2006 17:58:01 +0400 Subject: [PATCH 05/65] Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE) union.result, union.test: Adding test case. item.cc: Allow safe character set conversion in UNION - string constant to column's charset - to unicode Thus, UNION now works the same with CONCAT (and other string functions) in respect of aggregating arguments with different character sets. sql/item.cc: Allow character set conversion in UNION - string to column's charset - to unicode Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE) mysql-test/t/union.test: Adding test case. mysql-test/r/union.result: Adding test case. --- mysql-test/r/union.result | 12 +++++++++++- mysql-test/t/union.test | 11 ++++++++++- sql/item.cc | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index a9b2345d834..d01ce6249f7 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -1185,6 +1185,16 @@ select concat('value is: ', @val) union select 'some text'; concat('value is: ', @val) value is: 6 some text +select concat(_latin1'a', _ascii'b' collate ascii_bin); +concat(_latin1'a', _ascii'b' collate ascii_bin) +ab +create table t1 (foo varchar(100)) collate ascii_bin; +insert into t1 (foo) values ("foo"); +select foo from t1 union select 'bar' as foo from dual; +foo +foo +bar +drop table t1; CREATE TABLE t1 ( a ENUM('','','') character set utf8 not null default '', b ENUM("one", "two") character set utf8, @@ -1214,7 +1224,7 @@ Field Type Null Key Default Extra a char(1) drop table t2; create table t2 select a from t1 union select c from t1; -ERROR HY000: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation 'UNION' +drop table t2; create table t2 select a from t1 union select b from t1; show columns from t2; Field Type Null Key Default Extra diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 1f6fc2c8d3b..994546e9d97 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -710,6 +710,15 @@ drop table t1; set @val:=6; select concat('value is: ', @val) union select 'some text'; +# +# Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE) +# +select concat(_latin1'a', _ascii'b' collate ascii_bin); +create table t1 (foo varchar(100)) collate ascii_bin; +insert into t1 (foo) values ("foo"); +select foo from t1 union select 'bar' as foo from dual; +drop table t1; + # # Enum merging test # @@ -729,8 +738,8 @@ drop table t2; create table t2 select a from t1 union select a from t1; show columns from t2; drop table t2; --- error 1267 create table t2 select a from t1 union select c from t1; +drop table t2; create table t2 select a from t1 union select b from t1; show columns from t2; drop table t2, t1; diff --git a/sql/item.cc b/sql/item.cc index f996e962cca..5964ed388c6 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -3258,7 +3258,7 @@ bool Item_type_holder::join_types(THD *thd, Item *item) const char *old_cs, *old_derivation; old_cs= collation.collation->name; old_derivation= collation.derivation_name(); - if (collation.aggregate(item->collation)) + if (collation.aggregate(item->collation, MY_COLL_ALLOW_CONV)) { my_error(ER_CANT_AGGREGATE_2COLLATIONS, MYF(0), old_cs, old_derivation, From da7087ddb36900c938e84b30fe0e0633626243c8 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Mar 2006 21:10:30 +0100 Subject: [PATCH 06/65] Bug#17368 General log and slow query log don't work - Add "storage/csv" to directories to be copied scripts/make_win_src_distribution.sh: Add "storage/csv" to directories to be copied(removed duplicated storage/example) --- scripts/make_win_src_distribution.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index 893ae6c188a..22c0ea7c839 100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -249,7 +249,7 @@ copy_dir_dirs() { # Input directories to be copied # -for i in client dbug extra storage/heap include storage/archive storage/example \ +for i in client dbug extra storage/heap include storage/archive storage/csv \ include/mysql libmysql libmysqld storage/myisam storage/example \ storage/myisammrg mysys regex sql strings sql-common sql/examples \ tools vio zlib From c351b5bf3842cb51d7fce16ca41b346bbafa4e37 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Mar 2006 21:19:23 +0100 Subject: [PATCH 07/65] Bug#17279 user with no global privs and with create priv in db can create database - Fix test case for systems with "lowercase names" mysql-test/r/grant2.result: Update test result mysql-test/t/grant2.test: Fix for system with "lowercase names", allow erro 1007 to be returned --- mysql-test/r/grant2.result | 2 +- mysql-test/t/grant2.test | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index 9ddd6d4281e..a42ad0d79a5 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -349,7 +349,7 @@ Warnings: Warning 1265 Data truncated for column 'Alter_routine_priv' at row 1 FLUSH PRIVILEGES; create database TEStdb; -ERROR 42000: Access denied for user 'mysqltest_1'@'%' to database 'TEStdb' +Got one of the listed errors delete from mysql.user; delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB'; insert into mysql.user select * from t1; diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test index 32861d1b184..2c62d2f1bd3 100644 --- a/mysql-test/t/grant2.test +++ b/mysql-test/t/grant2.test @@ -452,7 +452,8 @@ connect (con1,localhost,mysqltest_1,password,TESTDB); # The user mysqltest_1 should only be allowed access to # database TESTDB, not TEStdb ---error 1044 +# On system with "lowercase names" we get error "1007: Can't create db..." +--error 1044, 1007 create database TEStdb; # Clean-up From de1e87bbcd5ca4f830e7af42da34ef0d3228b28e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Mar 2006 11:50:15 +0200 Subject: [PATCH 08/65] Fix for BUG#15229. The cause of this bug was a design flaw due to which the list of natural join columns was incorrectly computed and stored for nested joins that are not natural joins, but are operands (possibly indirect) of nested joins. The patch corrects the flaw in a such a way, that the result columns of a table reference are materialized only if it is a leaf table (that is, only if it is a view, stored table, or natural/using join). mysql-test/r/join.result: Added test for BUG#15229 and uncommented failing test cases of BUG#15357 (now fixed by this patch). mysql-test/t/join.test: Added test for BUG#15229 and uncommented failing test cases of BUG#15357 (now fixed by this patch). sql/sql_base.cc: - Do not materialize the result columns of regular nested joins (that are not natural/using joins). - Moved most of the code that creates/adds new natural join column references to the method 'get_or_create_column_ref', and simplified 'mark_common_columns'. - Replaced a call to 'get_or_create_column_ref' with 'get_natural_column_ref' where it is for sure all columns are alredy created. sql/table.cc: - Modified the method 'get_or_create_column_ref' so that it adds itself the newly created natural join columns to the respective table reference. sql/table.h: - Modified the method 'get_or_create_column_ref' so that it adds itself the newly created natural join columns to the respective table reference. --- mysql-test/r/join.result | 47 +++++++++++++++++++++++++++ mysql-test/t/join.test | 41 +++++++++++++++++------- sql/sql_base.cc | 63 +++++++++++++++--------------------- sql/table.cc | 69 ++++++++++++++++++++++++++++++++++++---- sql/table.h | 2 +- 5 files changed, 166 insertions(+), 56 deletions(-) diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index 724d1b1e39f..bd86942072c 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -475,6 +475,22 @@ b c a c b y 1 10 2 3 1 2 1 3 2 3 1 11 1 3 2 3 1 2 +select * from t5 natural join ((t1 natural join t2), (t3 natural join t4)); +y z b c a c b +11 4 1 10 2 3 1 +11 4 1 3 2 3 1 +select * from ((t1 natural join t2), (t3 natural join t4)) natural join t5; +y b c a c b z +11 1 10 2 3 1 4 +11 1 3 2 3 1 4 +select * from t5 natural join ((t1 natural join t2) cross join (t3 natural join t4)); +y z b c a c b +11 4 1 10 2 3 1 +11 4 1 3 2 3 1 +select * from ((t1 natural join t2) cross join (t3 natural join t4)) natural join t5; +y b c a c b z +11 1 10 2 3 1 4 +11 1 3 2 3 1 4 select * from (t1 join t2 using (b)) join (t3 join t4 using (c)) using (c); c b a b y 3 1 2 1 11 @@ -665,6 +681,8 @@ select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6; ERROR 23000: Column 'c' in from clause is ambiguous select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6; ERROR 23000: Column 'c' in from clause is ambiguous +select * from t6 natural join ((t1 natural join t2), (t3 natural join t4)); +ERROR 23000: Column 'c' in from clause is ambiguous select * from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4); ERROR 23000: Column 'b' in from clause is ambiguous select * from (t3 natural join t4) natural join (t1 join t2 on t1.b=t2.b); @@ -673,6 +691,8 @@ select * from (t3 join (t4 natural join t5) on (b < z)) natural join (t1 natural join t2); ERROR 23000: Column 'c' in from clause is ambiguous +select * from (t1 natural join t2) natural join (t3 join (t4 natural join t5) on (b < z)); +ERROR 23000: Column 'c' in from clause is ambiguous select t1.b from v1a; ERROR 42S22: Unknown column 't1.b' in 'field list' select * from v1a join v1b on t1.b = t2.b; @@ -692,3 +712,30 @@ drop view v2b; drop view v3a; drop view v3b; drop view v4; +create table t1 (a1 int, a2 int); +create table t2 (a1 int, b int); +create table t3 (c1 int, c2 int); +create table t4 (c2 int); +insert into t1 values (1,1); +insert into t2 values (1,1); +insert into t3 values (1,1); +insert into t4 values (1); +select * from t1 join t2 using (a1) join t3 on b=c1 join t4 using (c2); +c2 a1 a2 b c1 +1 1 1 1 1 +select * from t3 join (t1 join t2 using (a1)) on b=c1 join t4 using (c2); +c2 c1 a1 a2 b +1 1 1 1 1 +select a2 from t1 join t2 using (a1) join t3 on b=c1 join t4 using (c2); +a2 +1 +select a2 from t3 join (t1 join t2 using (a1)) on b=c1 join t4 using (c2); +a2 +1 +select a2 from ((t1 join t2 using (a1)) join t3 on b=c1) join t4 using (c2); +a2 +1 +select a2 from ((t1 natural join t2) join t3 on b=c1) natural join t4; +a2 +1 +drop table t1,t2,t3,t4; diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test index 553aaf987bb..e58227df067 100644 --- a/mysql-test/t/join.test +++ b/mysql-test/t/join.test @@ -408,11 +408,10 @@ select * from t1 natural join (t2 natural join (t3 natural join t4)); select * from t5 natural right join (t4 natural right join ((t2 natural right join t1) natural right join t3)); select * from (t1 natural join t2), (t3 natural join t4); -- MySQL extension - nested comma ',' operator instead of cross join. --- BUG#15357 - natural join with nested cross-join results in incorrect columns --- select * from t5 natural join ((t1 natural join t2), (t3 natural join t4)); --- select * from ((t1 natural join t2), (t3 natural join t4)) natural join t5; --- select * from t5 natural join ((t1 natural join t2) cross join (t3 natural join t4)); --- select * from ((t1 natural join t2) cross join (t3 natural join t4)) natural join t5; +select * from t5 natural join ((t1 natural join t2), (t3 natural join t4)); +select * from ((t1 natural join t2), (t3 natural join t4)) natural join t5; +select * from t5 natural join ((t1 natural join t2) cross join (t3 natural join t4)); +select * from ((t1 natural join t2) cross join (t3 natural join t4)) natural join t5; select * from (t1 join t2 using (b)) join (t3 join t4 using (c)) using (c); select * from (t1 join t2 using (b)) natural join (t3 join t4 using (c)); @@ -500,8 +499,7 @@ select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6; -- error 1052 select * from ((t1 natural join t2), (t3 natural join t4)) natural join t6; -- error 1052 --- BUG#15357: doesn't detect non-unique column 'c', as in the above query. --- select * from t6 natural join ((t1 natural join t2), (t3 natural join t4)); +select * from t6 natural join ((t1 natural join t2), (t3 natural join t4)); -- error 1052 select * from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4); -- error 1052 @@ -512,11 +510,7 @@ select * from (t3 join (t4 natural join t5) on (b < z)) natural join (t1 natural join t2); -- error 1052 --- BUG#15357: this query should return an ambiguous column error --- Expected result: the query must return error with duplicate column 'c' ---select * from (t1 natural join t2) --- natural join --- (t3 join (t4 natural join t5) on (b < z)); +select * from (t1 natural join t2) natural join (t3 join (t4 natural join t5) on (b < z)); -- error 1054 select t1.b from v1a; @@ -540,4 +534,27 @@ drop view v3a; drop view v3b; drop view v4; +# +# BUG#15229 - columns of nested joins that are not natural joins incorrectly +# materialized +# +create table t1 (a1 int, a2 int); +create table t2 (a1 int, b int); +create table t3 (c1 int, c2 int); +create table t4 (c2 int); + +insert into t1 values (1,1); +insert into t2 values (1,1); +insert into t3 values (1,1); +insert into t4 values (1); + +select * from t1 join t2 using (a1) join t3 on b=c1 join t4 using (c2); +select * from t3 join (t1 join t2 using (a1)) on b=c1 join t4 using (c2); +select a2 from t1 join t2 using (a1) join t3 on b=c1 join t4 using (c2); +select a2 from t3 join (t1 join t2 using (a1)) on b=c1 join t4 using (c2); +select a2 from ((t1 join t2 using (a1)) join t3 on b=c1) join t4 using (c2); +select a2 from ((t1 natural join t2) join t3 on b=c1) natural join t4; + +drop table t1,t2,t3,t4; + # End of tests for WL#2486 - natural/using join diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 0e1c1525c9e..31ec95e3cc5 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -3608,8 +3608,18 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2, Natural_join_column *nj_col_1, *nj_col_2; const char *field_name_1; Query_arena *arena, backup; - bool add_columns= TRUE; bool result= TRUE; + bool first_outer_loop= TRUE; + /* + Leaf table references to which new natural join columns are added + if the leaves are != NULL. + */ + TABLE_LIST *leaf_1= (table_ref_1->nested_join && + !table_ref_1->is_natural_join) ? + NULL : table_ref_1; + TABLE_LIST *leaf_2= (table_ref_2->nested_join && + !table_ref_2->is_natural_join) ? + NULL : table_ref_2; DBUG_ENTER("mark_common_columns"); DBUG_PRINT("info", ("operand_1: %s operand_2: %s", @@ -3618,35 +3628,13 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2, *found_using_fields= 0; arena= thd->activate_stmt_arena_if_needed(&backup); - /* - TABLE_LIST::join_columns could be allocated by the previous call to - store_natural_using_join_columns() for the lower level of nested tables. - */ - if (!table_ref_1->join_columns) - { - if (!(table_ref_1->join_columns= new List)) - goto err; - table_ref_1->is_join_columns_complete= FALSE; - } - if (!table_ref_2->join_columns) - { - if (!(table_ref_2->join_columns= new List)) - goto err; - table_ref_2->is_join_columns_complete= FALSE; - } - for (it_1.set(table_ref_1); !it_1.end_of_fields(); it_1.next()) { - bool is_created_1; bool found= FALSE; - if (!(nj_col_1= it_1.get_or_create_column_ref(&is_created_1))) + if (!(nj_col_1= it_1.get_or_create_column_ref(leaf_1))) goto err; field_name_1= nj_col_1->name(); - /* If nj_col_1 was just created add it to the list of join columns. */ - if (is_created_1) - table_ref_1->join_columns->push_back(nj_col_1); - /* Find a field with the same name in table_ref_2. @@ -3657,17 +3645,12 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2, nj_col_2= NULL; for (it_2.set(table_ref_2); !it_2.end_of_fields(); it_2.next()) { - bool is_created_2; Natural_join_column *cur_nj_col_2; const char *cur_field_name_2; - if (!(cur_nj_col_2= it_2.get_or_create_column_ref(&is_created_2))) + if (!(cur_nj_col_2= it_2.get_or_create_column_ref(leaf_2))) goto err; cur_field_name_2= cur_nj_col_2->name(); - /* If nj_col_1 was just created add it to the list of join columns. */ - if (add_columns && is_created_2) - table_ref_2->join_columns->push_back(cur_nj_col_2); - /* Compare the two columns and check for duplicate common fields. A common field is duplicate either if it was already found in @@ -3686,9 +3669,15 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2, found= TRUE; } } - /* Force it_2.set() to use table_ref_2->join_columns. */ - table_ref_2->is_join_columns_complete= TRUE; - add_columns= FALSE; + if (first_outer_loop && leaf_2) + { + /* + Make sure that the next inner loop "knows" that all columns + are materialized already. + */ + leaf_2->is_join_columns_complete= TRUE; + first_outer_loop= FALSE; + } if (!found) continue; // No matching field @@ -3772,7 +3761,8 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2, ++(*found_using_fields); } } - table_ref_1->is_join_columns_complete= TRUE; + if (leaf_1) + leaf_1->is_join_columns_complete= TRUE; /* Everything is OK. @@ -4625,16 +4615,15 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name, if (tables->is_natural_join) { - bool is_created; TABLE *field_table; /* In this case we are sure that the column ref will not be created because it was already created and stored with the natural join. */ Natural_join_column *nj_col; - if (!(nj_col= field_iterator.get_or_create_column_ref(&is_created))) + if (!(nj_col= field_iterator.get_natural_column_ref())) DBUG_RETURN(TRUE); - DBUG_ASSERT(nj_col->table_field && !is_created); + DBUG_ASSERT(nj_col->table_field); field_table= nj_col->table_ref->table; if (field_table) { diff --git a/sql/table.cc b/sql/table.cc index 268d7a0be49..867ac4fb3bc 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -2816,11 +2816,31 @@ GRANT_INFO *Field_iterator_table_ref::grant() SYNOPSIS Field_iterator_table_ref::get_or_create_column_ref() - is_created [out] set to TRUE if the column was created, - FALSE if we return an already created colum + parent_table_ref the parent table reference over which the + iterator is iterating DESCRIPTION - TODO + Create a new natural join column for the current field of the + iterator if no such column was created, or return an already + created natural join column. The former happens for base tables or + views, and the latter for natural/using joins. If a new field is + created, then the field is added to 'parent_table_ref' if it is + given, or to the original table referene of the field if + parent_table_ref == NULL. + + NOTES + This method is designed so that when a Field_iterator_table_ref + walks through the fields of a table reference, all its fields + are created and stored as follows: + - If the table reference being iterated is a stored table, view or + natural/using join, store all natural join columns in a list + attached to that table reference. + - If the table reference being iterated is a nested join that is + not natural/using join, then do not materialize its result + fields. This is OK because for such table references + Field_iterator_table_ref iterates over the fields of the nested + table references (recursively). In this way we avoid the storage + of unnecessay copies of result columns of nested joins. RETURN # Pointer to a column of a natural join (or its operand) @@ -2828,22 +2848,28 @@ GRANT_INFO *Field_iterator_table_ref::grant() */ Natural_join_column * -Field_iterator_table_ref::get_or_create_column_ref(bool *is_created) +Field_iterator_table_ref::get_or_create_column_ref(TABLE_LIST *parent_table_ref) { Natural_join_column *nj_col; + bool is_created= TRUE; + uint field_count; + TABLE_LIST *add_table_ref= parent_table_ref ? + parent_table_ref : table_ref; - *is_created= TRUE; if (field_it == &table_field_it) { /* The field belongs to a stored table. */ Field *field= table_field_it.field(); nj_col= new Natural_join_column(field, table_ref); + field_count= table_ref->table->s->fields; } else if (field_it == &view_field_it) { /* The field belongs to a merge view or information schema table. */ Field_translator *translated_field= view_field_it.field_translator(); nj_col= new Natural_join_column(translated_field, table_ref); + field_count= table_ref->field_translation_end - + table_ref->field_translation; } else { @@ -2852,12 +2878,43 @@ Field_iterator_table_ref::get_or_create_column_ref(bool *is_created) already created via one of the two constructor calls above. In this case we just return the already created column reference. */ - *is_created= FALSE; + DBUG_ASSERT(table_ref->is_join_columns_complete); + is_created= FALSE; nj_col= natural_join_it.column_ref(); DBUG_ASSERT(nj_col); } DBUG_ASSERT(!nj_col->table_field || nj_col->table_ref->table == nj_col->table_field->table); + + /* + If the natural join column was just created add it to the list of + natural join columns of either 'parent_table_ref' or to the table + reference that directly contains the original field. + */ + if (is_created) + { + /* Make sure not all columns were materialized. */ + DBUG_ASSERT(!add_table_ref->is_join_columns_complete); + if (!add_table_ref->join_columns) + { + /* Create a list of natural join columns on demand. */ + if (!(add_table_ref->join_columns= new List)) + return NULL; + add_table_ref->is_join_columns_complete= FALSE; + } + add_table_ref->join_columns->push_back(nj_col); + /* + If new fields are added to their original table reference, mark if + all fields were added. We do it here as the caller has no easy way + of knowing when to do it. + If the fields are being added to parent_table_ref, then the caller + must take care to mark when all fields are created/added. + */ + if (!parent_table_ref && + add_table_ref->join_columns->elements == field_count) + add_table_ref->is_join_columns_complete= TRUE; + } + return nj_col; } diff --git a/sql/table.h b/sql/table.h index ce0616a6833..65afcac130e 100644 --- a/sql/table.h +++ b/sql/table.h @@ -782,7 +782,7 @@ public: GRANT_INFO *grant(); Item *create_item(THD *thd) { return field_it->create_item(thd); } Field *field() { return field_it->field(); } - Natural_join_column *get_or_create_column_ref(bool *is_created); + Natural_join_column *get_or_create_column_ref(TABLE_LIST *parent_table_ref); Natural_join_column *get_natural_column_ref(); }; From 97443c15d8b1bbccf74b48ec38943fa83666ef39 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Mar 2006 11:08:43 +0100 Subject: [PATCH 09/65] Fix unsigned warning on windows client/mysqltest.c: Fix unsigned warning --- client/mysqltest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 0558df7a568..1a9f6f0d34f 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -3134,7 +3134,7 @@ static void init_win_path_patterns() static void free_win_path_patterns() { - int i= 0; + uint i= 0; for (i=0 ; i < patterns.elements ; i++) { const char** pattern= dynamic_element(&patterns, i, const char**); From 6164a44bf031ab222312035372c2a0872b83f25e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Mar 2006 11:10:29 +0100 Subject: [PATCH 10/65] Make do_block return void, return value never used. client/mysqltest.c: Make do_block return "void", will never return from "die" if error is detected --- client/mysqltest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 1a9f6f0d34f..5dd2f5dc65e 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -2404,7 +2404,7 @@ int do_done(struct st_query *q) */ -int do_block(enum block_cmd cmd, struct st_query* q) +void do_block(enum block_cmd cmd, struct st_query* q) { char *p= q->first_argument; const char *expr_start, *expr_end; @@ -2428,7 +2428,7 @@ int do_block(enum block_cmd cmd, struct st_query* q) cur_block++; cur_block->cmd= cmd; cur_block->ok= FALSE; - return 0; + DBUG_VOID_RETURN; } /* Parse and evaluate test expression */ From 6ea2c3cd57e5be58bb84b94951b34dc055b178a6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Mar 2006 15:05:55 +0400 Subject: [PATCH 11/65] Fix for bug #17615: invalid handling of function results in UPDATE...SET statement. sql/item_func.cc: Fix for bug #17615: invalid handling of function results in UPDATE...SET statement. - set proper collation --- mysql-test/r/sp.result | 14 ++++++++++++++ mysql-test/t/sp.test | 23 +++++++++++++++++++++++ sql/item_func.cc | 2 ++ 3 files changed, 39 insertions(+) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index a4c920f8e15..0f874cd1ceb 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -4768,4 +4768,18 @@ Handler Inner drop procedure bug15011| drop table t3| +drop function if exists bug17615| +create table t3 (a varchar(256) unicode)| +create function bug17615() returns varchar(256) unicode +begin +declare tmp_res varchar(256) unicode; +set tmp_res= 'foo string'; +return tmp_res; +end| +insert into t3 values(bug17615())| +select * from t3| +a +foo string +drop function bug17615| +drop table t3| drop table t1,t2; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 243c1b413b7..fd79286dd0f 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -5615,6 +5615,29 @@ drop procedure bug15011| drop table t3| +# +# BUG#17615: problem with character set +# +--disable_warnings +drop function if exists bug17615| +--enable_warnings + +create table t3 (a varchar(256) unicode)| + +create function bug17615() returns varchar(256) unicode +begin + declare tmp_res varchar(256) unicode; + set tmp_res= 'foo string'; + return tmp_res; +end| + +insert into t3 values(bug17615())| +select * from t3| + +drop function bug17615| +drop table t3| + + # # BUG#NNNN: New bug synopsis # diff --git a/sql/item_func.cc b/sql/item_func.cc index a85f05c2e22..ccfb71e9d0c 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4881,6 +4881,7 @@ Item_func_sp::fix_length_and_dec() { decimals= result_field->decimals(); max_length= result_field->field_length; + collation.set(result_field->charset()); DBUG_VOID_RETURN; } @@ -4891,6 +4892,7 @@ Item_func_sp::fix_length_and_dec() } decimals= field->decimals(); max_length= field->field_length; + collation.set(field->charset()); maybe_null= 1; delete field; DBUG_VOID_RETURN; From 326acd57c1f22be0224245272c438a6658c3d8ad Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Mar 2006 16:28:45 +0100 Subject: [PATCH 12/65] Make the "system" command become executed in a bash shell in cygwin. client/mysqltest.c: Prepend the command to execute by system with "sh" to make it executed by cygwin's bash mysql-test/t/mysqldump.test: Change from " to ' to avoid bash's filename expanding. I.e to avoid that "[mysqltest1]" will be llok for any dirs in mysql-test/* that are named m, y, s, q etc. And ther is actually one dir called t, so we will get a match and thus echo "t" to the file. --- client/mysqltest.c | 13 ++++++++++++- mysql-test/t/mysqldump.test | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 5dd2f5dc65e..a039d970b18 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1367,7 +1367,9 @@ int do_modify_var(struct st_query *query, const char *name, NOTE If mysqltest is executed from cygwin shell, the command will be - executed in cygwin shell. Thus commands like "rm" etc can be used. + executed in the "windows command interpreter" cmd.exe and we prepend "sh" + to make it be executed by cygwins "bash". Thus commands like "rm", + "mkdir" as well as shellscripts can executed by "system" in Windows. */ int do_system(struct st_query *command) @@ -1379,9 +1381,18 @@ int do_system(struct st_query *command) init_dynamic_string(&ds_cmd, 0, strlen(command->first_argument) + 64, 256); +#ifdef __WIN__ + /* Execute the command in "bash", ie. sh -c "" */ + dynstr_append(&ds_cmd, "sh -c \""); +#endif + /* Eval the system command, thus replacing all environment variables */ do_eval(&ds_cmd, command->first_argument, TRUE); +#ifdef __WIN__ + dynstr_append(&ds_cmd, "\""); +#endif + DBUG_PRINT("info", ("running system command '%s' as '%s'", command->first_argument, ds_cmd.str)); if (system(ds_cmd.str)) diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 9008eff6642..b5e05579023 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -830,8 +830,8 @@ DROP TABLE t1, t2; # Bugs #9136, #12917: problems with --defaults-extra-file option # ---system echo "[mysqltest1]" > $MYSQLTEST_VARDIR/tmp/tmp.cnf ---system echo "port=1234" >> $MYSQLTEST_VARDIR/tmp/tmp.cnf +--system echo '[mysqltest1]' > $MYSQLTEST_VARDIR/tmp/tmp.cnf +--system echo 'port=1234' >> $MYSQLTEST_VARDIR/tmp/tmp.cnf --exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 --exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1 --system rm $MYSQLTEST_VARDIR/tmp/tmp.cnf From 9f055bf881b87e001e4de198e4f3231903422156 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Mar 2006 17:33:34 +0100 Subject: [PATCH 13/65] Remove superfluous DBUG_PRINT --- client/mysqltest.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index a039d970b18..12bcda267be 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1120,8 +1120,6 @@ static void do_exec(struct st_query *query) ("error: %d, status: %d", error, status)); for (i= 0; i < query->expected_errors; i++) { - DBUG_PRINT("info", - ("error: %d, status: %d", error, status)); DBUG_PRINT("info", ("expected error: %d", query->expected_errno[i].code.errnum)); if ((query->expected_errno[i].type == ERR_ERRNO) && From a74939e2401a2af905292ecacbcae31997509123 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 02:46:47 +0100 Subject: [PATCH 14/65] Makefile.am: Use libtool convenience lib, to access get_password object correctly, bug#17155 server-tools/instance-manager/Makefile.am: Use libtool convenience lib, to access get_password object correctly, bug#17155 --- server-tools/instance-manager/Makefile.am | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am index 5b9690322aa..218eceebd12 100644 --- a/server-tools/instance-manager/Makefile.am +++ b/server-tools/instance-manager/Makefile.am @@ -24,9 +24,10 @@ DEFS= -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER # default_options.h, generated from default_options.h.in) # See automake/autoconf docs for details -noinst_LIBRARIES= liboptions.a libnet.a +noinst_LTLIBRARIES= liboptions.la +noinst_LIBRARIES= libnet.a -liboptions_a_CXXFLAGS= $(CXXFLAGS) \ +liboptions_la_CXXFLAGS= $(CXXFLAGS) \ -DDEFAULT_PID_FILE_NAME="$(localstatedir)/mysqlmanager.pid" \ -DDEFAULT_LOG_FILE_NAME="$(localstatedir)/mysqlmanager.log" \ -DDEFAULT_SOCKET_FILE_NAME="/tmp/mysqlmanager.sock" \ @@ -35,8 +36,8 @@ liboptions_a_CXXFLAGS= $(CXXFLAGS) \ -DDEFAULT_CONFIG_FILE="/etc/my.cnf" \ -DPROTOCOL_VERSION=@PROTOCOL_VERSION@ -liboptions_a_SOURCES= options.h options.cc priv.h priv.cc -liboptions_a_LIBADD= $(top_builddir)/libmysql/get_password.$(OBJEXT) +liboptions_la_SOURCES= options.h options.cc priv.h priv.cc +liboptions_la_LIBADD= $(top_builddir)/libmysql/get_password.lo # MySQL sometimes uses symlinks to reuse code # All symlinked files are grouped in libnet.a @@ -77,7 +78,7 @@ mysqlmanager_SOURCES= command.cc command.h mysqlmanager.cc \ mysql_manager_error.h \ portability.h -mysqlmanager_LDADD= liboptions.a \ +mysqlmanager_LDADD= liboptions.la \ libnet.a \ $(top_builddir)/vio/libvio.a \ $(top_builddir)/mysys/libmysys.a \ From 25b3bb8bd711f0d2127f38a50c68dcc292064f82 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Mar 2006 20:49:10 -0500 Subject: [PATCH 15/65] Expanding a binary field should result in 0x00-filled positions, not 0x20 (ASCII space). For Bug#16857. sql/field_conv.cc: Bug#16857: Do not expand BINARY fields as if they are strings (which presumably /should/ be filled with spaces). Instead, fill BINARY fields with 0x00 bytes. --- mysql-test/r/binary.result | 19 +++++++++++++++++++ mysql-test/t/binary.test | 12 ++++++++++++ sql/field_conv.cc | 18 +++++++++++++++++- 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result index a8d6c3bf411..c5673d1c00d 100644 --- a/mysql-test/r/binary.result +++ b/mysql-test/r/binary.result @@ -141,3 +141,22 @@ t1 CREATE TABLE `t1` ( `a` binary(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +create table t1 (col1 binary(4)); +insert into t1 values ('a'),('a '); +select hex(col1) from t1; +hex(col1) +61000000 +61200000 +alter table t1 modify col1 binary(10); +select hex(col1) from t1; +hex(col1) +61000000000000000000 +61200000000000000000 +insert into t1 values ('b'),('b '); +select hex(col1) from t1; +hex(col1) +61000000000000000000 +61200000000000000000 +62000000000000000000 +62200000000000000000 +drop table t1; diff --git a/mysql-test/t/binary.test b/mysql-test/t/binary.test index 1ac0cfebb28..4ab6ee9eaf1 100644 --- a/mysql-test/t/binary.test +++ b/mysql-test/t/binary.test @@ -89,3 +89,15 @@ show create table t1; drop table t1; # End of 4.1 tests + +# +# Bug#16857 +# +create table t1 (col1 binary(4)); +insert into t1 values ('a'),('a '); +select hex(col1) from t1; +alter table t1 modify col1 binary(10); +select hex(col1) from t1; +insert into t1 values ('b'),('b '); +select hex(col1) from t1; +drop table t1; diff --git a/sql/field_conv.cc b/sql/field_conv.cc index bbe2dbe5e9f..895f022624c 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -379,6 +379,16 @@ static void do_cut_string_complex(Copy_field *copy) +static void do_expand_binary(Copy_field *copy) +{ + CHARSET_INFO *cs= copy->from_field->charset(); + memcpy(copy->to_ptr,copy->from_ptr,copy->from_length); + cs->cset->fill(cs, copy->to_ptr+copy->from_length, + copy->to_length-copy->from_length, '\0'); +} + + + static void do_expand_string(Copy_field *copy) { CHARSET_INFO *cs= copy->from_field->charset(); @@ -583,7 +593,13 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*) return (from->charset()->mbmaxlen == 1 ? do_cut_string : do_cut_string_complex); else if (to_length > from_length) - return do_expand_string; + { + if ((to->flags & BINARY_FLAG) != 0) + return do_expand_binary; + else + return do_expand_string; + } + } else if (to->real_type() != from->real_type() || to_length != from_length || From a91d0afdaa79b8e78571796079b8910dd8380fda Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 03:27:27 +0100 Subject: [PATCH 16/65] mysql.spec.sh: Don't create empty embedded RPM, bug#15769 support-files/mysql.spec.sh: Don't create empty embedded RPM, bug#15769 --- support-files/mysql.spec.sh | 44 ++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 613045e6ad5..599f397e351 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -204,24 +204,24 @@ the standard MySQL package. Please note that this is a dynamically linked binary! -%package embedded -Requires: %{name}-devel -Summary: MySQL - embedded library -Group: Applications/Databases -Obsoletes: mysql-embedded - -%description embedded -This package contains the MySQL server as an embedded library. - -The embedded MySQL server library makes it possible to run a -full-featured MySQL server inside the client application. -The main benefits are increased speed and more simple management -for embedded applications. - -The API is identical for the embedded MySQL version and the -client/server version. - -%{see_base} +#%package embedded +#Requires: %{name}-devel +#Summary: MySQL - embedded library +#Group: Applications/Databases +#Obsoletes: mysql-embedded +# +#%description embedded +#This package contains the MySQL server as an embedded library. +# +#The embedded MySQL server library makes it possible to run a +#full-featured MySQL server inside the client application. +#The main benefits are increased speed and more simple management +#for embedded applications. +# +#The API is identical for the embedded MySQL version and the +#client/server version. +# +#%{see_base} %prep %setup -n mysql-%{mysql_version} @@ -712,14 +712,18 @@ fi %attr(755, root, root) %{_sbindir}/mysqld-max %attr(644, root, root) %{_libdir}/mysql/mysqld-max.sym -%files embedded -%defattr(-, root, root, 0755) +#%files embedded +#%defattr(-, root, root, 0755) # %attr(644, root, root) %{_libdir}/mysql/libmysqld.a # The spec file changelog only includes changes made to the spec file # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Fri Mar 03 2006 Kent Boortz + +- Don't output an embedded package as it is empty + * Fri Jan 10 2006 Joerg Bruehe - Use "-i" on "make test-force"; From 88841e3c8569383b61bf7b0f3472a427cc0d8fea Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 11:52:52 +0100 Subject: [PATCH 17/65] Bug#17728 tests that fails are: ndb_gis rpl_ndb_multi_update2 - Fix for ndb_gis to run with all types of logging mysql-test/include/gis_generic.inc: Make the test tables for gis have a primary key with auto increment mysql-test/r/archive_gis.result: Update test result mysql-test/r/bdb_gis.result: Update test result mysql-test/r/innodb_gis.result: Update test result mysql-test/r/ndb_gis.result: Update test result mysql-test/t/ndb_gis.test: Remove the requirement to only run thiswhen binlog format is row. --- mysql-test/include/gis_generic.inc | 35 +++--- mysql-test/r/archive_gis.result | 58 +++++----- mysql-test/r/bdb_gis.result | 58 +++++----- mysql-test/r/innodb_gis.result | 58 +++++----- mysql-test/r/ndb_gis.result | 164 +++++++++++------------------ mysql-test/t/ndb_gis.test | 5 - 6 files changed, 173 insertions(+), 205 deletions(-) diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc index e5e7283e0e6..3abc18283fa 100644 --- a/mysql-test/include/gis_generic.inc +++ b/mysql-test/include/gis_generic.inc @@ -8,14 +8,14 @@ DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; --enable_warnings -CREATE TABLE gis_point (fid INTEGER, g POINT); -CREATE TABLE gis_line (fid INTEGER, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY); +CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); +CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); +CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); +CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); +CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); +CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); +CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); +CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); SHOW CREATE TABLE gis_point; SHOW FIELDS FROM gis_point; @@ -141,6 +141,7 @@ DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gi # Check that ALTER TABLE doesn't loose geometry type # CREATE TABLE t1 ( + a INTEGER PRIMARY KEY AUTO_INCREMENT, gp point, ln linestring, pg polygon, @@ -156,24 +157,24 @@ ALTER TABLE t1 ADD fid INT; SHOW FIELDS FROM t1; DROP TABLE t1; -create table t1 (a geometry not null); -insert into t1 values (GeomFromText('Point(1 2)')); +create table t1 (pk integer primary key auto_increment, a geometry not null); +insert into t1 (a) values (GeomFromText('Point(1 2)')); -- error 1416 -insert into t1 values ('Garbage'); +insert into t1 (a) values ('Garbage'); -- error 1416 -insert IGNORE into t1 values ('Garbage'); +insert IGNORE into t1 (a) values ('Garbage'); drop table t1; -create table t1 (fl geometry); +create table t1 (pk integer primary key auto_increment, fl geometry); --error 1416 -insert into t1 values (1); +insert into t1 (fl) values (1); --error 1416 -insert into t1 values (1.11); +insert into t1 (fl) values (1.11); --error 1416 -insert into t1 values ("qwerty"); +insert into t1 (fl) values ("qwerty"); --error 1416 -insert into t1 values (pointfromtext('point(1,1)')); +insert into t1 (fl) values (pointfromtext('point(1,1)')); drop table t1; diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 25a77bc9c75..c3c9ce03127 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -1,50 +1,51 @@ SET storage_engine=archive; DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER, g POINT); -CREATE TABLE gis_line (fid INTEGER, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY); +CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); +CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); +CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); +CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); +CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); +CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); +CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); +CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) NOT NULL auto_increment, + `g` point default NULL, + PRIMARY KEY (`fid`) ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g point YES NULL SHOW FIELDS FROM gis_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g linestring YES NULL SHOW FIELDS FROM gis_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g polygon YES NULL SHOW FIELDS FROM gis_multi_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipoint YES NULL SHOW FIELDS FROM gis_multi_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multilinestring YES NULL SHOW FIELDS FROM gis_multi_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipolygon YES NULL SHOW FIELDS FROM gis_geometrycollection; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometrycollection YES NULL SHOW FIELDS FROM gis_geometry; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometry YES NULL INSERT INTO gis_point VALUES (101, PointFromText('POINT(10 10)')), @@ -407,6 +408,7 @@ Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; CREATE TABLE t1 ( +a INTEGER PRIMARY KEY AUTO_INCREMENT, gp point, ln linestring, pg polygon, @@ -418,6 +420,7 @@ gm geometry ); SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -429,6 +432,7 @@ gm geometry YES NULL ALTER TABLE t1 ADD fid INT; SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -439,20 +443,20 @@ gc geometrycollection YES NULL gm geometry YES NULL fid int(11) YES NULL DROP TABLE t1; -create table t1 (a geometry not null); -insert into t1 values (GeomFromText('Point(1 2)')); -insert into t1 values ('Garbage'); +create table t1 (pk integer primary key auto_increment, a geometry not null); +insert into t1 (a) values (GeomFromText('Point(1 2)')); +insert into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 values ('Garbage'); +insert IGNORE into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; -create table t1 (fl geometry); -insert into t1 values (1); +create table t1 (pk integer primary key auto_increment, fl geometry); +insert into t1 (fl) values (1); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (1.11); +insert into t1 (fl) values (1.11); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values ("qwerty"); +insert into t1 (fl) values ("qwerty"); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (pointfromtext('point(1,1)')); +insert into t1 (fl) values (pointfromtext('point(1,1)')); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; diff --git a/mysql-test/r/bdb_gis.result b/mysql-test/r/bdb_gis.result index c0e1682e485..6d6217a7363 100644 --- a/mysql-test/r/bdb_gis.result +++ b/mysql-test/r/bdb_gis.result @@ -1,50 +1,51 @@ SET storage_engine=bdb; DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER, g POINT); -CREATE TABLE gis_line (fid INTEGER, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY); +CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); +CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); +CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); +CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); +CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); +CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); +CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); +CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) NOT NULL auto_increment, + `g` point default NULL, + PRIMARY KEY (`fid`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g point YES NULL SHOW FIELDS FROM gis_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g linestring YES NULL SHOW FIELDS FROM gis_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g polygon YES NULL SHOW FIELDS FROM gis_multi_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipoint YES NULL SHOW FIELDS FROM gis_multi_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multilinestring YES NULL SHOW FIELDS FROM gis_multi_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipolygon YES NULL SHOW FIELDS FROM gis_geometrycollection; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometrycollection YES NULL SHOW FIELDS FROM gis_geometry; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometry YES NULL INSERT INTO gis_point VALUES (101, PointFromText('POINT(10 10)')), @@ -407,6 +408,7 @@ Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; CREATE TABLE t1 ( +a INTEGER PRIMARY KEY AUTO_INCREMENT, gp point, ln linestring, pg polygon, @@ -418,6 +420,7 @@ gm geometry ); SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -429,6 +432,7 @@ gm geometry YES NULL ALTER TABLE t1 ADD fid INT; SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -439,20 +443,20 @@ gc geometrycollection YES NULL gm geometry YES NULL fid int(11) YES NULL DROP TABLE t1; -create table t1 (a geometry not null); -insert into t1 values (GeomFromText('Point(1 2)')); -insert into t1 values ('Garbage'); +create table t1 (pk integer primary key auto_increment, a geometry not null); +insert into t1 (a) values (GeomFromText('Point(1 2)')); +insert into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 values ('Garbage'); +insert IGNORE into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; -create table t1 (fl geometry); -insert into t1 values (1); +create table t1 (pk integer primary key auto_increment, fl geometry); +insert into t1 (fl) values (1); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (1.11); +insert into t1 (fl) values (1.11); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values ("qwerty"); +insert into t1 (fl) values ("qwerty"); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (pointfromtext('point(1,1)')); +insert into t1 (fl) values (pointfromtext('point(1,1)')); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index 826a17cb60d..3926be5fe64 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -1,50 +1,51 @@ SET storage_engine=innodb; DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER, g POINT); -CREATE TABLE gis_line (fid INTEGER, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY); +CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); +CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); +CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); +CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); +CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); +CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); +CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); +CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) NOT NULL auto_increment, + `g` point default NULL, + PRIMARY KEY (`fid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g point YES NULL SHOW FIELDS FROM gis_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g linestring YES NULL SHOW FIELDS FROM gis_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g polygon YES NULL SHOW FIELDS FROM gis_multi_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipoint YES NULL SHOW FIELDS FROM gis_multi_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multilinestring YES NULL SHOW FIELDS FROM gis_multi_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipolygon YES NULL SHOW FIELDS FROM gis_geometrycollection; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometrycollection YES NULL SHOW FIELDS FROM gis_geometry; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometry YES NULL INSERT INTO gis_point VALUES (101, PointFromText('POINT(10 10)')), @@ -407,6 +408,7 @@ Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; CREATE TABLE t1 ( +a INTEGER PRIMARY KEY AUTO_INCREMENT, gp point, ln linestring, pg polygon, @@ -418,6 +420,7 @@ gm geometry ); SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -429,6 +432,7 @@ gm geometry YES NULL ALTER TABLE t1 ADD fid INT; SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -439,20 +443,20 @@ gc geometrycollection YES NULL gm geometry YES NULL fid int(11) YES NULL DROP TABLE t1; -create table t1 (a geometry not null); -insert into t1 values (GeomFromText('Point(1 2)')); -insert into t1 values ('Garbage'); +create table t1 (pk integer primary key auto_increment, a geometry not null); +insert into t1 (a) values (GeomFromText('Point(1 2)')); +insert into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 values ('Garbage'); +insert IGNORE into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; -create table t1 (fl geometry); -insert into t1 values (1); +create table t1 (pk integer primary key auto_increment, fl geometry); +insert into t1 (fl) values (1); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (1.11); +insert into t1 (fl) values (1.11); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values ("qwerty"); +insert into t1 (fl) values ("qwerty"); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (pointfromtext('point(1,1)')); +insert into t1 (fl) values (pointfromtext('point(1,1)')); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index 939d9e88e86..fdda654f4cb 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -1,66 +1,51 @@ SET storage_engine=ndbcluster; DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER, g POINT); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_line (fid INTEGER, g LINESTRING); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_polygon (fid INTEGER, g POLYGON); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_multi_point (fid INTEGER, g MULTIPOINT); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_multi_line (fid INTEGER, g MULTILINESTRING); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_multi_polygon (fid INTEGER, g MULTIPOLYGON); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_geometrycollection (fid INTEGER, g GEOMETRYCOLLECTION); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); +CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); +CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); +CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); +CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); +CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); +CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); +CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) NOT NULL auto_increment, + `g` point default NULL, + PRIMARY KEY (`fid`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g point YES NULL SHOW FIELDS FROM gis_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g linestring YES NULL SHOW FIELDS FROM gis_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g polygon YES NULL SHOW FIELDS FROM gis_multi_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipoint YES NULL SHOW FIELDS FROM gis_multi_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multilinestring YES NULL SHOW FIELDS FROM gis_multi_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipolygon YES NULL SHOW FIELDS FROM gis_geometrycollection; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometrycollection YES NULL SHOW FIELDS FROM gis_geometry; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometry YES NULL INSERT INTO gis_point VALUES (101, PointFromText('POINT(10 10)')), @@ -423,6 +408,7 @@ Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; CREATE TABLE t1 ( +a INTEGER PRIMARY KEY AUTO_INCREMENT, gp point, ln linestring, pg polygon, @@ -432,10 +418,9 @@ mpg multipolygon, gc geometrycollection, gm geometry ); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -445,10 +430,9 @@ mpg multipolygon YES NULL gc geometrycollection YES NULL gm geometry YES NULL ALTER TABLE t1 ADD fid INT; -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -459,90 +443,71 @@ gc geometrycollection YES NULL gm geometry YES NULL fid int(11) YES NULL DROP TABLE t1; -create table t1 (a geometry not null); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 values (GeomFromText('Point(1 2)')); -insert into t1 values ('Garbage'); +create table t1 (pk integer primary key auto_increment, a geometry not null); +insert into t1 (a) values (GeomFromText('Point(1 2)')); +insert into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 values ('Garbage'); +insert IGNORE into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; -create table t1 (fl geometry); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 values (1); +create table t1 (pk integer primary key auto_increment, fl geometry); +insert into t1 (fl) values (1); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (1.11); +insert into t1 (fl) values (1.11); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values ("qwerty"); +insert into t1 (fl) values ("qwerty"); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (pointfromtext('point(1,1)')); +insert into t1 (fl) values (pointfromtext('point(1,1)')); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; set engine_condition_pushdown = on; DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER, g POINT); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_line (fid INTEGER, g LINESTRING); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_polygon (fid INTEGER, g POLYGON); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_multi_point (fid INTEGER, g MULTIPOINT); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_multi_line (fid INTEGER, g MULTILINESTRING); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_multi_polygon (fid INTEGER, g MULTIPOLYGON); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_geometrycollection (fid INTEGER, g GEOMETRYCOLLECTION); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -CREATE TABLE gis_geometry (fid INTEGER, g GEOMETRY); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); +CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); +CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); +CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); +CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); +CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); +CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); +CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) default NULL, - `g` point default NULL + `fid` int(11) NOT NULL auto_increment, + `g` point default NULL, + PRIMARY KEY (`fid`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g point YES NULL SHOW FIELDS FROM gis_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g linestring YES NULL SHOW FIELDS FROM gis_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g polygon YES NULL SHOW FIELDS FROM gis_multi_point; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipoint YES NULL SHOW FIELDS FROM gis_multi_line; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multilinestring YES NULL SHOW FIELDS FROM gis_multi_polygon; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g multipolygon YES NULL SHOW FIELDS FROM gis_geometrycollection; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometrycollection YES NULL SHOW FIELDS FROM gis_geometry; Field Type Null Key Default Extra -fid int(11) YES NULL +fid int(11) NO PRI NULL auto_increment g geometry YES NULL INSERT INTO gis_point VALUES (101, PointFromText('POINT(10 10)')), @@ -905,6 +870,7 @@ Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; CREATE TABLE t1 ( +a INTEGER PRIMARY KEY AUTO_INCREMENT, gp point, ln linestring, pg polygon, @@ -914,10 +880,9 @@ mpg multipolygon, gc geometrycollection, gm geometry ); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -927,10 +892,9 @@ mpg multipolygon YES NULL gc geometrycollection YES NULL gm geometry YES NULL ALTER TABLE t1 ADD fid INT; -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' SHOW FIELDS FROM t1; Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment gp point YES NULL ln linestring YES NULL pg polygon YES NULL @@ -941,24 +905,20 @@ gc geometrycollection YES NULL gm geometry YES NULL fid int(11) YES NULL DROP TABLE t1; -create table t1 (a geometry not null); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 values (GeomFromText('Point(1 2)')); -insert into t1 values ('Garbage'); +create table t1 (pk integer primary key auto_increment, a geometry not null); +insert into t1 (a) values (GeomFromText('Point(1 2)')); +insert into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 values ('Garbage'); +insert IGNORE into t1 (a) values ('Garbage'); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; -create table t1 (fl geometry); -Warnings: -Error 1538 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -insert into t1 values (1); +create table t1 (pk integer primary key auto_increment, fl geometry); +insert into t1 (fl) values (1); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (1.11); +insert into t1 (fl) values (1.11); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values ("qwerty"); +insert into t1 (fl) values ("qwerty"); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 values (pointfromtext('point(1,1)')); +insert into t1 (fl) values (pointfromtext('point(1,1)')); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; diff --git a/mysql-test/t/ndb_gis.test b/mysql-test/t/ndb_gis.test index 2281cc51cd4..e14f462c32d 100644 --- a/mysql-test/t/ndb_gis.test +++ b/mysql-test/t/ndb_gis.test @@ -1,8 +1,3 @@ -# Requires row logging because warnings produced when creating -# the tables in "gis_generic" with no PK and BLOB's differ - ---source include/have_binlog_format_row.inc - --source include/have_ndb.inc SET storage_engine=ndbcluster; --source include/gis_generic.inc From 500d6b851ca426ebbea8a36c7a24aa46beda1bab Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 15:29:39 +0400 Subject: [PATCH 18/65] Fix for bug#17826 'type_decimal' fails with ps-protocol removed unnecessary calculation of cache value otherwise Join::preapre tries to calculate undefined values(filed values) mysql-test/r/type_decimal.result: Fix for bug#17826 'type_decimal' fails with ps-protocol test case, this test case reproduce the same bug but without PS protocol mysql-test/t/type_decimal.test: Fix for bug#17826 'type_decimal' fails with ps-protocol test case, this test case reproduce the same bug but without PS protocol --- mysql-test/r/type_decimal.result | 7 +++++++ mysql-test/t/type_decimal.test | 8 ++++++++ sql/item_cmpfunc.cc | 6 ------ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index d7f5f9fa328..8b2c08065e0 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -772,3 +772,10 @@ productid zlevelprice 003trans 39.98 004trans 31.18 drop table t1, t2; +create table t1 (f1 decimal(5)); +insert into t1 values (40); +flush tables; +select f1 from t1 where f1 in (select f1 from t1); +f1 +40 +drop table t1; diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test index 07347322453..441d750004e 100644 --- a/mysql-test/t/type_decimal.test +++ b/mysql-test/t/type_decimal.test @@ -377,3 +377,11 @@ insert INTO t2 SELECT * FROM t1; select * from t2; drop table t1, t2; +# +# Bug #17826 'type_decimal' fails with ps-protocol +# +create table t1 (f1 decimal(5)); +insert into t1 values (40); +flush tables; +select f1 from t1 where f1 in (select f1 from t1); +drop table t1; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 7ba8a536ac7..304e9e8babe 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -698,12 +698,6 @@ bool Item_in_optimizer::fix_left(THD *thd, Item **ref) return 1; cache->setup(args[0]); - /* - If it is preparation PS only then we do not know values of parameters => - cant't get there values and do not need that values. - */ - if (!thd->stmt_arena->is_stmt_prepare()) - cache->store(args[0]); if (cache->cols() == 1) { if ((used_tables_cache= args[0]->used_tables())) From bb60631b5f3a904f973a67d54ac278fc185e4f9e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 14:55:05 +0100 Subject: [PATCH 19/65] Windows fixes - Use pipes "|" - Improved system command, create a temporary .sh faile that is executed with cygwins sh(bash) This makes the Windows version behave exactly as the Lunix version(well almost...) - Give unix path to DBUG, trace files is no produced if running ./mysql-test-run.pl --debug" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit client/mysqltest.c: Add new function "my_system" that run the a she script using cygwin bash on windows. mysql-test/lib/mtr_misc.pl: Return all paths to executables in windows format "c:\src\.." when run on windows. This makes it possible to use the pipes "|" to pipöe the output form exeample "mysqlbinlog" into "mysql" mysql-test/mysql-test-run.pl: DBUG want's a unix format strings for where it should put the tracefile(don't ask me why but it works) Just chop of the first "c:" from the "c:/src/.." string and DBUG will be happy --- client/mysqltest.c | 54 +++++++++++++++++++++++------------- mysql-test/lib/mtr_misc.pl | 11 +++++++- mysql-test/mysql-test-run.pl | 3 ++ 3 files changed, 48 insertions(+), 20 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 12bcda267be..3db51336553 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1351,6 +1351,35 @@ int do_modify_var(struct st_query *query, const char *name, } +/* + Wrapper for 'system' function + + NOTE + If mysqltest is executed from cygwin shell, the command will be + executed in the "windows command interpreter" cmd.exe and we prepend "sh" + to make it be executed by cygwins "bash". Thus commands like "rm", + "mkdir" as well as shellscripts can executed by "system" in Windows. + +*/ + +int my_system(DYNAMIC_STRING* ds_cmd) +{ +#ifdef __WIN__ + /* Dump the command into a sh script file and execute with "sh" */ + int err; + char tmp_sh_name[64], tmp_sh_cmd[70]; + my_snprintf(tmp_sh_name, sizeof(tmp_sh_name), "tmp_%d.sh", getpid()); + my_snprintf(tmp_sh_cmd, sizeof(tmp_sh_cmd), "sh %s", tmp_sh_name); + str_to_file(tmp_sh_name, ds_cmd->str, ds_cmd->length); + err= system(tmp_sh_cmd); + my_delete(tmp_sh_name, MYF(0)); + return err; +#else + return system(ds_cmd->str); +#endif +} + + /* SYNOPSIS @@ -1363,37 +1392,24 @@ int do_modify_var(struct st_query *query, const char *name, Eval the query to expand any $variables in the command. Execute the command with the "system" command. - NOTE - If mysqltest is executed from cygwin shell, the command will be - executed in the "windows command interpreter" cmd.exe and we prepend "sh" - to make it be executed by cygwins "bash". Thus commands like "rm", - "mkdir" as well as shellscripts can executed by "system" in Windows. - */ +*/ -int do_system(struct st_query *command) +void do_system(struct st_query *command) { DYNAMIC_STRING ds_cmd; + DBUG_ENTER("do_system"); if (strlen(command->first_argument) == 0) die("Missing arguments to system, nothing to do!"); init_dynamic_string(&ds_cmd, 0, strlen(command->first_argument) + 64, 256); -#ifdef __WIN__ - /* Execute the command in "bash", ie. sh -c "" */ - dynstr_append(&ds_cmd, "sh -c \""); -#endif - /* Eval the system command, thus replacing all environment variables */ do_eval(&ds_cmd, command->first_argument, TRUE); -#ifdef __WIN__ - dynstr_append(&ds_cmd, "\""); -#endif - DBUG_PRINT("info", ("running system command '%s' as '%s'", command->first_argument, ds_cmd.str)); - if (system(ds_cmd.str)) + if (my_system(&ds_cmd)) { if (command->abort_on_error) die("system command '%s' failed", command->first_argument); @@ -1405,7 +1421,7 @@ int do_system(struct st_query *command) } command->last_argument= command->end; - return 0; + DBUG_VOID_RETURN; } @@ -1656,7 +1672,7 @@ int do_sleep(struct st_query *query, my_bool real_sleep) char *p= query->first_argument; char *sleep_start, *sleep_end= query->end; double sleep_val; - char *cmd = (real_sleep ? "real_sleep" : "sleep"); + const char *cmd = (real_sleep ? "real_sleep" : "sleep"); while (my_isspace(charset_info, *p)) p++; diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl index a76f1b2d7b1..1f7ebdde457 100644 --- a/mysql-test/lib/mtr_misc.pl +++ b/mysql-test/lib/mtr_misc.pl @@ -96,7 +96,16 @@ sub mtr_exe_exists (@) { map {$_.= ".exe"} @path if $::glob_win32; foreach my $path ( @path ) { - return $path if -x $path; + if ( -x $path ) + { + if ( $::glob_cygwin_perl ) + { + $path= `cygpath -w $path`; + # Chop off the \n that cygpath adds + $path=~ s/\n//; + } + return $path; + } } if ( @path == 1 ) { diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 905a2b2af37..ce2dfc8f67e 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -668,6 +668,9 @@ sub command_line_setup () { $opt_vardir= "$glob_mysql_test_dir/var"; } $opt_vardir_trace= $opt_vardir; + # Chop off any "c:", DBUG likes a unix path ex: c:/src/... => /src/... + $opt_vardir_trace=~ s/^\w://; + # We make the path absolute, as the server will do a chdir() before usage unless ( $opt_vardir =~ m,^/, or ($glob_win32 and $opt_vardir =~ m,^[a-z]:/,i) ) From f31783ccce1b0a42c09116cd1f279ce0ef576a72 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 12:15:01 -0600 Subject: [PATCH 20/65] mysql-stress-test.pl, README.stress: Revise stress-test README mysql-test/README.stress: Revise stress-test README mysql-test/mysql-stress-test.pl: Revise stress-test README --- mysql-test/README.stress | 108 +++++++++++++++++--------------- mysql-test/mysql-stress-test.pl | 21 ++++--- 2 files changed, 67 insertions(+), 62 deletions(-) diff --git a/mysql-test/README.stress b/mysql-test/README.stress index 001ecceef1b..6be4e9a0236 100644 --- a/mysql-test/README.stress +++ b/mysql-test/README.stress @@ -2,114 +2,118 @@ Overview -------- -Stress script is designed to perform testsing of mysql server in -multi-thread environment. +The stress script is designed to perform testing of the MySQL server in +a multi-threaded environment. -Stress script allows: +All functionality regarding stress testing is implemented in the +mysql-stress-test.pl script. + +The stress script allows: - - to use for stress testing mysqltest binary as test engine - - to use for stress testing both regular test suite and any - additional test suites (e.g. mysql-test-extra-5.0) - - to specify files with lists of tests both for initialization of - stress db and for further testing itself - - to define number of threads that will be concurrently used in testing - - to define limitations for test run. e.g. number of tests or loops - for execution or duration of testing, delay between test executions, etc. - - to get readable log file which can be used for identification of - errors arose during testing + - To stress test the mysqltest binary test engine. + - To stress test the regular test suite and any additional test suites + (such as mysql-test-extra-5.0). + - To specify files with lists of tests both for initialization of + stress db and for further testing itself. + - To define the number of threads to be concurrently used in testing. + - To define limitations for the test run. such as the number of tests or + loops for execution or duration of testing, delay between test + executions, and so forth. + - To get a readable log file that can be used for identification of + errors that occur during testing. -All functionality regarding stress testing was implemeted in -mysql-stress-test.pl script and there are two ways to run stress test: +There are two ways to run the mysql-stress-test.pl script: - - for most cases it is enough to use options below for starting of - stress test from mysql-test-run wrapper. In this case server will - be run automatically, all preparation steps will be performed - and after that stress test will be started. + - For most cases, it is enough to use the options below for starting + the stress test from the mysql-test-run wrapper. In this case, the + server is run automatically, all preparation steps are performed, + and after that the stress test is started. - - in advanced case one can run mysql-stress-test.pl script directly. - But it requires to perform some preparation steps and to specify a - bunch of options as well so this way may look a bit complicate. + - In advanced case, you can run the mysql-stress-test.pl script directly. + But this requires that you perform some preparation steps and to specify + a bunch of options as well, so this invocation method may be a bit + complicated. Usage ----- -Below is list of stress test specific options for mysql-test-run: +The following mysql-test-run options are specific to stress-testing: --stress Enable stress mode --stress-suite= - Test suite name that will be used in stress testing. - We assume that all suites are located in mysql-test/suite directory + Test suite name to use in stress testing. We assume that all suites + are located in the mysql-test/suite directory. There is one special suite name - that corresponds - to regular test suite located in mysql-test directory. + to the regular test suite located in the mysql-test directory. --stress-threads= - Number of threads that will be used in stress testing + The number of threads to use in stress testing. --stress-tests-file= - Filename with list of tests(without .test suffix) that will be used in - stress testing. Default filename is stress_tests.txt and default + The file that contains the list of tests (without .test suffix) to use in + stress testing. The default filename is stress_tests.txt and the default location of this file is suite//stress_tests.txt --stress-init-file= - Filename with list of tests(without .test suffix) that will be used in - stress testing for initialization of stress db. These tests will be - executed only once before starting of test itself. Default filename - is stress_init.txt and default location of this file is + The file that contains list of tests (without .test suffix) to use in + stress testing for initialization of the stress db. These tests will be + executed only once before starting the test itself. The default filename + is stress_init.txt and the default location of this file is suite//stress_init.txt --stress-mode= Possible values are: random(default), seq - There are two possible modes which affect order of selecting of tests + There are two possible modes that affect the order of test selection from the list: - - in random mode tests will be selected in random order - - in seq mode each thread will execute tests in the loop one by one as - they specified in the list file. + - In random mode, tests are selected in random order + - In seq mode, each thread executes tests in a loop one by one in + the order specified in the list file. ---stress-test-count= +--stress-test-count= Total number of tests that will be executed concurrently by all threads ---stress-loop-count= +--stress-loop-count= Total number of loops in seq mode that will be executed concurrently by all threads ---stress-test-duration= +--stress-test-duration= Duration of stress testing in seconds Examples -------- -1. Example of simple command line to start stress test: +1. Example of a simple command line to start a stress test: mysql-test-run --stress alias -Runs stress test with default values for number of threads and number of tests, -with test 'alias' from suite 'main'. +Runs a stress test with default values for number of threads and number +of tests, with test 'alias' from suite 'main'. 2. Using in stress testing tests from other suites: - mysql-test-run --stress --stress-threads=10 --stress-test-count=1000 \ --stress-suite=example --stress-tests-file=testslist.txt - Will run stress test with 10 threads, will execute 1000 tests by all - threads, test will be used from suite 'example', list of test will be + Runs a stress test with 10 threads, executes 1000 tests by all + threads, tests are used from suite 'example', the list of tests is taken from file 'testslist.txt' - mysql-test-run --stress --stress-threads=10 --stress-test-count=1000 \ --stress-suite=example sum_distinct - Will run stress test with 10 threads, will execute 1000 tests by all - threads, test will be used from suite 'example', list of test contains - only one test 'sum_distinct' + Runs stress test with 10 threads, executes 1000 tests by all + threads, tests are used from suite 'example', the list of tests + contains only one test 'sum_distinct' 3. Debugging of issues found with stress test - Right now stress test is not fully integrated in mysql-test-run - and does not support --gdb option so to debug issue found with stress - test you have to start separately mysql server under debuger and then - run stress test as: + Right now, the stress test is not fully integrated in mysql-test-run + and does not support the --gdb option. To debug issues found with the + stress test, you must start the MySQL server separately under a debugger + and then run the stress test like this: - mysql-test-run --extern --stress --stress-threads=10 \ --stress-test-count=1000 --stress-suite=example \ diff --git a/mysql-test/mysql-stress-test.pl b/mysql-test/mysql-stress-test.pl index 899dd06a746..3061506da51 100755 --- a/mysql-test/mysql-stress-test.pl +++ b/mysql-test/mysql-stress-test.pl @@ -14,16 +14,17 @@ # # Design of stress script should allow one: # -# - to use for stress testing mysqltest binary as test engine -# - to use for stress testing both regular test suite and any -# additional test suites (e.g. mysql-test-extra-5.0) -# - to specify files with lists of tests both for initialization of -# stress db and for further testing itself -# - to define number of threads that will be concurrently used in testing -# - to define limitations for test run. e.g. number of tests or loops -# for execution or duration of testing, delay between test executions, etc. -# - to get readable log file which can be used for identification of -# errors arose during testing +# - To stress test the mysqltest binary test engine. +# - To stress test the regular test suite and any additional test suites +# (such as mysql-test-extra-5.0). +# - To specify files with lists of tests both for initialization of +# stress db and for further testing itself. +# - To define the number of threads to be concurrently used in testing. +# - To define limitations for the test run. such as the number of tests or +# loops for execution or duration of testing, delay between test +# executions, and so forth. +# - To get a readable log file that can be used for identification of +# errors that occur during testing. # # Basic scenarios: # From 0dcd02587dbcfee967e508da856c021398f2192d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 20:30:28 +0100 Subject: [PATCH 21/65] mysql.spec.sh: Use installed libz.a to avoid hard to solve static linking problems support-files/mysql.spec.sh: Use installed libz.a to avoid hard to solve static linking problems --- support-files/mysql.spec.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 599f397e351..5860e612e66 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -369,8 +369,8 @@ BuildMySQL "--disable-shared \ --with-client-ldflags='-all-static' \ $USE_OTHER_LIBC_DIR \ %else -%endif --with-zlib-dir=bundled \ +%endif --with-comment=\"MySQL Community Edition - Standard (GPL)\" \ --with-server-suffix='%{server_suffix}' \ --with-archive-storage-engine \ @@ -690,8 +690,11 @@ fi %{_libdir}/mysql/libndbclient.a %{_libdir}/mysql/libndbclient.la %{_libdir}/mysql/libvio.a +%if %{STATIC_BUILD} +%else %{_libdir}/mysql/libz.a %{_libdir}/mysql/libz.la +%endif %files shared %defattr(-, root, root, 0755) @@ -723,6 +726,11 @@ fi * Fri Mar 03 2006 Kent Boortz - Don't output an embedded package as it is empty +- Can't use bundled zlib when doing static build. Might be a + automake/libtool problem, having two .la files, "libmysqlclient.la" + and "libz.la", on the same command line to link "thread_test" + expands to too many "-lc", "-lpthread" and other libs giving hard + to nail down duplicate symbol defintion problems. * Fri Jan 10 2006 Joerg Bruehe From 3d997647aa3a74b0e637afda989c948081877e5e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 13:57:49 -0600 Subject: [PATCH 22/65] mysqltest.c: Better fix for do_sleep(). client/mysqltest.c: Better fix for do_sleep(). --- client/mysqltest.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index a525adfd819..3f2e7d8edb6 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1550,19 +1550,20 @@ int do_sleep(struct st_query *query, my_bool real_sleep) char *p= query->first_argument; char *sleep_start, *sleep_end= query->end; double sleep_val; - char *cmd = (real_sleep ? "real_sleep" : "sleep"); while (my_isspace(charset_info, *p)) p++; if (!*p) - die("Missing argument to %s", cmd); + die("Missing argument to %.*s", query->first_word_len, query->query); sleep_start= p; /* Check that arg starts with a digit, not handled by my_strtod */ if (!my_isdigit(charset_info, *sleep_start)) - die("Invalid argument to %s \"%s\"", cmd, query->first_argument); + die("Invalid argument to %.*s \"%s\"", query->first_word_len, query->query, + query->first_argument); sleep_val= my_strtod(sleep_start, &sleep_end, &error); if (error) - die("Invalid argument to %s \"%s\"", cmd, query->first_argument); + die("Invalid argument to %.*s \"%s\"", query->first_word_len, query->query, + query->first_argument); /* Fixed sleep time selected by --sleep option */ if (opt_sleep && !real_sleep) From d8af174ae3c6d64e1dfe321407a4fc36eb432a20 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 14:34:30 -0600 Subject: [PATCH 23/65] mysqltest.c: Typos. client/mysqltest.c: Typos. --- client/mysqltest.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 0558df7a568..0dd8892bfd1 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -2529,8 +2529,8 @@ my_bool end_of_query(int c) size size of the buffer i.e max size to read DESCRIPTION - This function actually reads several lines an adds them to the - buffer buf. It will continue to read until it finds what it believes + This function actually reads several lines and adds them to the + buffer buf. It continues to read until it finds what it believes is a complete query. Normally that means it will read lines until it reaches the @@ -3760,7 +3760,7 @@ static void handle_no_error(struct st_query *q) command - currrent command pointer query - query string to execute query_len - length query string to execute - ds - output buffer wherte to store result form query + ds - output buffer where to store result form query RETURN VALUE error - function will not return @@ -3778,7 +3778,7 @@ static void run_query_stmt(MYSQL *mysql, struct st_query *command, DBUG_PRINT("query", ("'%-.60s'", query)); /* - Init a new stmt if it's not alreday one created for this connectoon + Init a new stmt if it's not already one created for this connection */ if(!(stmt= cur_con->stmt)) { @@ -3867,7 +3867,7 @@ static void run_query_stmt(MYSQL *mysql, struct st_query *command, goto end; } - /* If we got here the statement was both executed and read succeesfully */ + /* If we got here the statement was both executed and read successfully */ handle_no_error(command); if (!disable_result_log) { @@ -4594,7 +4594,7 @@ int main(int argc, char **argv) case Q_QUERY_HORIZONTAL: { my_bool old_display_result_vertically= display_result_vertically; - /* fix up query pointer if this is * first iteration for this line */ + /* fix up query pointer if this is first iteration for this line */ if (q->query == q->query_buf) q->query += q->first_word_len + 1; display_result_vertically= (q->type==Q_QUERY_VERTICAL); @@ -4639,15 +4639,15 @@ int main(int argc, char **argv) case Q_SEND: if (!q->query[q->first_word_len]) { - /* This happens when we use 'send' on it's own line */ + /* This happens when we use 'send' on its own line */ q_send_flag=1; break; } - /* fix up query pointer if this is * first iteration for this line */ + /* fix up query pointer if this is first iteration for this line */ if (q->query == q->query_buf) q->query += q->first_word_len; /* - run_query() can execute a query partially, depending on the flags + run_query() can execute a query partially, depending on the flags. QUERY_SEND flag without QUERY_REAP tells it to just send the query and read the result some time later when reap instruction is given on this connection. @@ -4731,7 +4731,7 @@ int main(int argc, char **argv) break; case Q_ENABLE_PARSING: /* - Ensure we don't get parsing_disabled < 0 as this would accidently + Ensure we don't get parsing_disabled < 0 as this would accidentally disable code we don't want to have disabled */ if (parsing_disabled > 0) @@ -4777,9 +4777,9 @@ int main(int argc, char **argv) start_lineno= 0; /* - The whole test has been executed _sucessfully_ - Time to compare result or save it to record file - The entire output from test is now kept in ds_res + The whole test has been executed _sucessfully_. + Time to compare result or save it to record file. + The entire output from test is now kept in ds_res. */ if (ds_res.length) { @@ -5509,7 +5509,7 @@ static int get_next_bit(REP_SET *set,uint lastpos) } /* find if there is a same set in sets. If there is, use it and - free given set, else put in given set in sets and return it's + free given set, else put in given set in sets and return its position */ static int find_set(REP_SETS *sets,REP_SET *find) @@ -5528,7 +5528,7 @@ static int find_set(REP_SETS *sets,REP_SET *find) /* find if there is a found_set with same table_offset & found_offset If there is return offset to it, else add new offset and return pos. - Pos returned is -offset-2 in found_set_structure because it's is + Pos returned is -offset-2 in found_set_structure because it is saved in set->next and set->next[] >= 0 points to next set and set->next[] == -1 is reserved for end without replaces. */ From 21d6e172f5cb182132f1869dac0707da98a462bb Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 16:26:38 -0500 Subject: [PATCH 24/65] Bug#16859 involves truncating column data at NUL characters. Instead, the client will now substitute spaces for NULs, so that the grid isn't messed up due to silently consumed NULs and that the full field is shown. client/mysql.cc: For non-numbers, print each character at a time, instead of using the fprintf() facility, which interprets an array of chars as a C string, which is necessarily NUL terminated. We mustn't terminate on NULs, and since we know the length of the data, we needn't. mysql-test/r/mysql.result: Add a test. mysql-test/t/mysql.test: Add a test. --- client/mysql.cc | 55 +++++++++++++++++++++++++++++++++------ mysql-test/r/mysql.result | 7 +++++ mysql-test/t/mysql.test | 5 ++++ 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 8d578aac58b..eb6970691bb 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -185,6 +185,7 @@ void tee_fprintf(FILE *file, const char *fmt, ...); void tee_fputs(const char *s, FILE *file); void tee_puts(const char *s, FILE *file); void tee_putc(int c, FILE *file); +static void tee_print_sized_data(const char *data, unsigned int length, unsigned int width); /* The names of functions that actually do the manipulation. */ static int get_options(int argc,char **argv); static int com_quit(String *str,char*), @@ -2308,20 +2309,29 @@ print_table_data(MYSQL_RES *result) for (uint off= 0; off < mysql_num_fields(result); off++) { const char *str= cur[off] ? cur[off] : "NULL"; + uint currlength; + uint maxlength; + uint numcells; + field= mysql_fetch_field(result); - uint maxlength= field->max_length; + maxlength= field->max_length; + currlength= (uint) lengths[off]; + numcells= charset_info->cset->numcells(charset_info, + str, str + currlength); if (maxlength > MAX_COLUMN_LENGTH) { - tee_fputs(str, PAGER); - tee_fputs(" |", PAGER); + tee_print_sized_data(str, currlength, maxlength); + tee_fputs(" |", PAGER); } else { - uint currlength= (uint) lengths[off]; - uint numcells= charset_info->cset->numcells(charset_info, - str, str + currlength); - tee_fprintf(PAGER, num_flag[off] ? "%*s |" : " %-*s|", - maxlength + currlength - numcells, str); + if (num_flag[off] != 0) + tee_fprintf(PAGER, " %-*s|", maxlength + currlength - numcells, str); + else + { + tee_print_sized_data(str, currlength, maxlength); + tee_fputs(" |", PAGER); + } } } (void) tee_fputs("\n", PAGER); @@ -2331,6 +2341,35 @@ print_table_data(MYSQL_RES *result) } +static void +tee_print_sized_data(const char *data, unsigned int length, unsigned int width) +{ + /* + It is not a number, so print each character justified to the left. + For '\0's print ASCII spaces instead, as '\0' is eaten by (at + least my) console driver, and that messes up the pretty table + grid. (The \0 is also the reason we can't use fprintf() .) + */ + unsigned int i; + const char *p; + + tee_putc(' ', PAGER); + + for (i= 0, p= data; i < length; i+= 1, p+= 1) + { + if (*p == '\0') + tee_putc((int)' ', PAGER); + else + tee_putc((int)*p, PAGER); + } + + i+= 1; + for ( ; i < width; i+= 1) + tee_putc((int)' ', PAGER); +} + + + static void print_table_data_html(MYSQL_RES *result) { diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 611813d9c3f..57067bea36b 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -69,3 +69,10 @@ c_cp932 ソ ソ ソ ++----------------------+------------+--------+ +| concat('>',col1,'<') | col2 | col3 | ++----------------------+------------+--------+ +| >a < | b | 123421 | +| >a < | 0123456789 | 4 | +| >abcd< | | 4 | ++----------------------+------------+--------+ diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 4712e7e8266..dbf65845e6a 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -56,3 +56,8 @@ drop table t1; --exec $MYSQL --default-character-set=utf8 test -e "charset cp932; set character_set_client= cp932; select '\'" --exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set character_set_client= cp932; select '\'" --exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set character_set_client= cp932; select '\'" + +# +# Bug#16859 -- NULLs in columns must not truncate data as if a C-language "string". +# +--exec $MYSQL -t test -e "create table t1 (col1 binary(4), col2 varchar(10), col3 int); insert into t1 values ('a', 'b', 123421),('a ', '0123456789', 4), ('abcd', '', 4); select concat('>',col1,'<'), col2, col3 from t1; drop table t1;" 2>&1 From 8f84c9f99ec92b188c386a07b342a0746ec17965 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Mar 2006 22:05:40 -0600 Subject: [PATCH 25/65] Some cmake script fixes win/cmakefiles/client: fix dependencies win/cmakefiles/libmysql: fix dependencies win/cmakefiles/regex: removed definitions defined here. They are defined globally win/cmakefiles/strings: removed definitions defined here. They are defined globally win/cmakefiles/tests: fixed dependencies win/cmakefiles/vio: removed definitions defined here. They are defined globally win/cmakefiles/zlib: removed definitions defined here. They are defined globally --- win/cmakefiles/client | 2 +- win/cmakefiles/libmysql | 2 +- win/cmakefiles/regex | 3 +-- win/cmakefiles/strings | 5 ++--- win/cmakefiles/tests | 2 +- win/cmakefiles/vio | 6 +++--- win/cmakefiles/zlib | 6 +++--- 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/win/cmakefiles/client b/win/cmakefiles/client index 7914f8aac1b..5da9189b0ae 100644 --- a/win/cmakefiles/client +++ b/win/cmakefiles/client @@ -77,4 +77,4 @@ ADD_EXECUTABLE(mysqladmin mysqladmin.cc) TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl zlib wsock32) ADD_EXECUTABLE(mysqlslap mysqlslap.c) -TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys zlib wsock32) +TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys zlib wsock32 dbug) diff --git a/win/cmakefiles/libmysql b/win/cmakefiles/libmysql index a1953244c0a..cb3453fc222 100644 --- a/win/cmakefiles/libmysql +++ b/win/cmakefiles/libmysql @@ -45,7 +45,7 @@ ADD_LIBRARY(libmysql MODULE dll.c libmysql.def ../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c ../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c ../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c) -ADD_DEPENDENCIES(libmysql GenError zlib) +ADD_DEPENDENCIES(libmysql dbug vio mysys strings GenError zlib) TARGET_LINK_LIBRARIES(libmysql mysys strings wsock32) # ToDo: We should move the mytest.c program out in libmysql/ diff --git a/win/cmakefiles/regex b/win/cmakefiles/regex index 77b3d05f55e..e00f339b3b9 100644 --- a/win/cmakefiles/regex +++ b/win/cmakefiles/regex @@ -1,6 +1,5 @@ -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX") -ADD_DEFINITIONS(-D_WINDOWS -D__WIN__) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) ADD_LIBRARY(regex debug.c regcomp.c regerror.c regexec.c regfree.c reginit.c split.c) diff --git a/win/cmakefiles/strings b/win/cmakefiles/strings index 8a2004ac26a..7b78e5f6b39 100644 --- a/win/cmakefiles/strings +++ b/win/cmakefiles/strings @@ -1,7 +1,6 @@ -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX") -ADD_DEFINITIONS(-D_WINDOWS -D__WIN__) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) ADD_LIBRARY(strings bchange.c bcmp.c bfill.c bmove512.c bmove_upp.c ctype-big5.c ctype-bin.c ctype-cp932.c ctype-czech.c ctype-euc_kr.c ctype-eucjpms.c ctype-extra.c ctype-gb2312.c ctype-gbk.c diff --git a/win/cmakefiles/tests b/win/cmakefiles/tests index cde41dca85c..1b627329028 100644 --- a/win/cmakefiles/tests +++ b/win/cmakefiles/tests @@ -6,4 +6,4 @@ ADD_DEFINITIONS("-DMYSQL_CLIENT") INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) ADD_EXECUTABLE(mysql_client_test mysql_client_test.c) -TARGET_LINK_LIBRARIES(mysql_client_test mysqlclient zlib wsock32) +TARGET_LINK_LIBRARIES(mysql_client_test dbug mysqlclient zlib wsock32) diff --git a/win/cmakefiles/vio b/win/cmakefiles/vio index 91b51e3793d..a3cbb304289 100644 --- a/win/cmakefiles/vio +++ b/win/cmakefiles/vio @@ -1,6 +1,6 @@ -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR") +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX") -ADD_DEFINITIONS(-D_WINDOWS -D__WIN__) +ADD_DEFINITIONS(-DUSE_SYMDIR) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/extra/yassl/include) ADD_LIBRARY(vio vio.c viosocket.c viossl.c viosslfactories.c) diff --git a/win/cmakefiles/zlib b/win/cmakefiles/zlib index 2a3abacd3c2..53560adf6d1 100644 --- a/win/cmakefiles/zlib +++ b/win/cmakefiles/zlib @@ -1,7 +1,7 @@ -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -D __WIN32__") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -D __WIN32__") +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") -ADD_DEFINITIONS(-DUSE_TLS -DMYSQL_CLIENT -D_WINDOWS -D__WIN__) +ADD_DEFINITIONS(-DUSE_TLS -DMYSQL_CLIENT -D__WIN32__) ADD_LIBRARY(zlib adler32.c compress.c crc32.c crc32.h deflate.c deflate.h gzio.c infback.c inffast.c inffast.h inffixed.h inflate.c inflate.h inftrees.c inftrees.h trees.c trees.h uncompr.c zconf.h zlib.h zutil.c zutil.h) From 422d11c2188e79440ce5b1415085b501748c25be Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 4 Mar 2006 11:20:56 +0300 Subject: [PATCH 26/65] Remove unused thd->options's flag -- OPTION_UPDATE_LOG The update log itself was removed back in 5.0. Recommit with post-review fixes. sql/log.cc: OPTION_UPDATE_LOG was set in all threads but replication ones. So, it seems that the check filtered out slow log records from replication threads. Now we do it with explicit check. sql/mysql_priv.h: remove unused define sql/mysqld.cc: Do not set OPTION_UPDATE_LOG. It is not used anymore. sql/set_var.cc: We never check for OPTION_UPDATE_LOG. So, we should not bother setting it. --- sql/log.cc | 3 ++- sql/mysql_priv.h | 3 +-- sql/mysqld.cc | 5 ++--- sql/set_var.cc | 25 +++++++------------------ 4 files changed, 12 insertions(+), 24 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index ff14b986aa4..7d893eadc52 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -714,7 +714,8 @@ bool LOGGER::slow_log_print(THD *thd, const char *query, uint query_length, { current_time= time(NULL); - if (!(thd->options & OPTION_UPDATE_LOG)) + /* do not log slow queries from replication threads */ + if (thd->slave_thread) return 0; lock(); diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index eb63d3de5b8..937d7e33f85 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -259,7 +259,7 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset; #define OPTION_BIG_TABLES (LL(1) << 8) // THD, user #define OPTION_BIG_SELECTS (LL(1) << 9) // THD, user #define OPTION_LOG_OFF (LL(1) << 10) // THD, user -#define OPTION_UPDATE_LOG (LL(1) << 11) // THD, user, unused +#define OPTION_QUOTE_SHOW_CREATE (LL(1) << 11) // THD, user #define TMP_TABLE_ALL_COLUMNS (LL(1) << 12) // SELECT, intern #define OPTION_WARNINGS (LL(1) << 13) // THD, user #define OPTION_AUTO_IS_NULL (LL(1) << 14) // THD, user, binlog @@ -271,7 +271,6 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset; #define OPTION_BEGIN (LL(1) << 20) // THD, intern #define OPTION_TABLE_LOCK (LL(1) << 21) // THD, intern #define OPTION_QUICK (LL(1) << 22) // SELECT (for DELETE) -#define OPTION_QUOTE_SHOW_CREATE (LL(1) << 23) // THD, user /* Thr following is used to detect a conflict with DISTINCT in the user query has requested */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 4f8944593bc..59af5a529d0 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -6982,9 +6982,8 @@ static void mysql_init_variables(void) log_error_file_ptr= log_error_file; language_ptr= language; mysql_data_home= mysql_real_data_home; - thd_startup_options= (OPTION_UPDATE_LOG | OPTION_AUTO_IS_NULL | - OPTION_BIN_LOG | OPTION_QUOTE_SHOW_CREATE | - OPTION_SQL_NOTES); + thd_startup_options= (OPTION_AUTO_IS_NULL | OPTION_BIN_LOG | + OPTION_QUOTE_SHOW_CREATE | OPTION_SQL_NOTES); protocol_version= PROTOCOL_VERSION; what_to_log= ~ (1L << (uint) COM_TIME); refresh_version= flush_version= 1L; /* Increments on each reload */ diff --git a/sql/set_var.cc b/sql/set_var.cc index 7ff3401b102..47a5aa07d40 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -22,9 +22,6 @@ - Use one of the 'sys_var... classes from set_var.h or write a specific one for the variable type. - Define it in the 'variable definition list' in this file. - - If the variable should be changeable or one should be able to access it - with @@variable_name, it should be added to the 'list of all variables' - list (sys_variables) in this file. - If the variable is thread specific, add it to 'system_variables' struct. If not, add it to mysqld.cc and an declaration in 'mysql_priv.h' - If the variable should be changed from the command line, add a definition @@ -140,7 +137,6 @@ static bool set_option_autocommit(THD *thd, set_var *var); static int check_log_update(THD *thd, set_var *var); static bool set_log_update(THD *thd, set_var *var); static int check_pseudo_thread_id(THD *thd, set_var *var); -static bool set_log_bin(THD *thd, set_var *var); void fix_binlog_format_after_update(THD *thd, enum_var_type type); static void fix_low_priority_updates(THD *thd, enum_var_type type); static int check_tx_isolation(THD *thd, set_var *var); @@ -170,7 +166,10 @@ static byte *get_warning_count(THD *thd); Variable definition list These are variables that can be set from the command line, in - alphabetic order + alphabetic order. + + The variables are linked into the list. A variable is added to + it in the constructor (see sys_var class for details). */ sys_var *sys_var::first= NULL; @@ -557,10 +556,10 @@ static sys_var_thd_bit sys_log_off("sql_log_off", 0, static sys_var_thd_bit sys_log_update("sql_log_update", check_log_update, set_log_update, - OPTION_UPDATE_LOG); + OPTION_BIN_LOG); static sys_var_thd_bit sys_log_binlog("sql_log_bin", check_log_update, - set_log_bin, + set_option_bit, OPTION_BIN_LOG); static sys_var_thd_bit sys_sql_warnings("sql_warnings", 0, set_option_bit, @@ -2775,11 +2774,9 @@ static bool set_log_update(THD *thd, set_var *var) See sql/mysqld.cc/, comments in function init_server_components() for an explaination of the different warnings we send below */ - + if (opt_sql_bin_update) { - ((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG | - OPTION_UPDATE_LOG); push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_UPDATE_LOG_DEPRECATED_TRANSLATED, ER(ER_UPDATE_LOG_DEPRECATED_TRANSLATED)); @@ -2792,14 +2789,6 @@ static bool set_log_update(THD *thd, set_var *var) return 0; } -static bool set_log_bin(THD *thd, set_var *var) -{ - if (opt_sql_bin_update) - ((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG | - OPTION_UPDATE_LOG); - set_option_bit(thd, var); - return 0; -} static int check_pseudo_thread_id(THD *thd, set_var *var) { From 350475fae41d31c37214705a54bdd93bb435a4f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 4 Mar 2006 16:55:06 +0300 Subject: [PATCH 27/65] Fix for bug #17866 "Problem with renaming table with triggers with fully qualified subject table" which was introduced during work on bug #13525 "Rename table does not keep info of triggers". The bug was caused by the fact that during reconstruction of CREATE TRIGGER statement stored in .TRG file which happened during RENAME TABLE we damaged trigger definition in case when it contained fully qualified name of subject table (see comment for sql_yacc.yy for more info). mysql-test/r/trigger.result: Added test for bug #17866 "Problem with renaming table with triggers with fully qualified subject table". mysql-test/t/trigger.test: Added test for bug #17866 "Problem with renaming table with triggers with fully qualified subject table". sql/sql_trigger.cc: Table_triggers_list::change_table_name_in_triggers(): Instead of trying to use pointer to the end of subject table identifier we use pointer to the beginning of FOR lexeme now, so during reconstruction of CREATE TRIGGER statement in this function we need to add extra space before part which begins with FOR to get nice trigger definition. sql/sql_yacc.yy: trigger_tail: In this rule we can't rely on using remember_end token after table_ident token, since value returned depends on whether table name is fully qualified or not. So instead of trying to get pointer to the end of table identifier we use pointer to the beginning of FOR lexeme. --- mysql-test/r/trigger.result | 30 ++++++++++++++++++------------ mysql-test/t/trigger.test | 14 +++++++++----- sql/sql_trigger.cc | 1 + sql/sql_yacc.yy | 4 ++-- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 320f4e5c3d9..c9a91758336 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -787,46 +787,52 @@ drop trigger t1_bi; ERROR 3D000: No database selected create table t1 (id int); create trigger t1_bi before insert on t1 for each row set @a:=new.id; +create trigger t1_ai after insert on test.t1 for each row set @b:=new.id; insert into t1 values (101); -select @a; -@a -101 +select @a, @b; +@a @b +101 101 select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; trigger_schema trigger_name event_object_schema event_object_table action_statement test t1_bi test t1 set @a:=new.id +test t1_ai test t1 set @b:=new.id rename table t1 to t2; insert into t2 values (102); -select @a; -@a -102 +select @a, @b; +@a @b +102 102 select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; trigger_schema trigger_name event_object_schema event_object_table action_statement test t1_bi test t2 set @a:=new.id +test t1_ai test t2 set @b:=new.id alter table t2 rename to t3; insert into t3 values (103); -select @a; -@a -103 +select @a, @b; +@a @b +103 103 select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; trigger_schema trigger_name event_object_schema event_object_table action_statement test t1_bi test t3 set @a:=new.id +test t1_ai test t3 set @b:=new.id alter table t3 rename to t4, add column val int default 0; insert into t4 values (104, 1); -select @a; -@a -104 +select @a, @b; +@a @b +104 104 select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; trigger_schema trigger_name event_object_schema event_object_table action_statement test t1_bi test t4 set @a:=new.id +test t1_ai test t4 set @b:=new.id drop trigger t1_bi; +drop trigger t1_ai; drop table t4; create database mysqltest; use mysqltest; diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 0ac57394c2f..1d68b519f1d 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -960,38 +960,42 @@ drop trigger t1_bi; connection default; # -# Test for bug #13525 "Rename table does not keep info of triggers" +# Tests for bug #13525 "Rename table does not keep info of triggers" +# and bug #17866 "Problem with renaming table with triggers with fully +# qualified subject table". # create table t1 (id int); create trigger t1_bi before insert on t1 for each row set @a:=new.id; +create trigger t1_ai after insert on test.t1 for each row set @b:=new.id; insert into t1 values (101); -select @a; +select @a, @b; select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; rename table t1 to t2; # Trigger should work after rename insert into t2 values (102); -select @a; +select @a, @b; select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; # Let us check that the same works for simple ALTER TABLE ... RENAME alter table t2 rename to t3; insert into t3 values (103); -select @a; +select @a, @b; select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; # And for more complex ALTER TABLE alter table t3 rename to t4, add column val int default 0; insert into t4 values (104, 1); -select @a; +select @a, @b; select trigger_schema, trigger_name, event_object_schema, event_object_table, action_statement from information_schema.triggers where event_object_schema = 'test'; # .TRN file should be updated with new table name drop trigger t1_bi; +drop trigger t1_ai; drop table t4; # Rename between different databases if triggers exist should fail create database mysqltest; diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 4c3ae5c032d..cef8c4dd1dc 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1217,6 +1217,7 @@ Table_triggers_list::change_table_name_in_triggers(THD *thd, buff.append(def->str, before_on_len); buff.append(STRING_WITH_LEN("ON ")); append_identifier(thd, &buff, new_table_name->str, new_table_name->length); + buff.append(STRING_WITH_LEN(" ")); on_q_table_name_len= buff.length() - before_on_len; buff.append(on_table_name->str + on_table_name->length, def->length - (before_on_len + on_table_name->length)); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 468ade1bbbd..86d50bcd707 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -9127,7 +9127,7 @@ view_check_option: trigger_tail: TRIGGER_SYM remember_name sp_name trg_action_time trg_event - ON remember_name table_ident remember_end FOR_SYM EACH_SYM ROW_SYM + ON remember_name table_ident FOR_SYM remember_name EACH_SYM ROW_SYM { LEX *lex= Lex; sp_head *sp; @@ -9145,7 +9145,7 @@ trigger_tail: lex->trigger_definition_begin= $2; lex->ident.str= $7; - lex->ident.length= $9 - $7; + lex->ident.length= $10 - $7; sp->m_type= TYPE_ENUM_TRIGGER; lex->sphead= sp; From 4391f938922a7f62831481c350ad4a680c64c827 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Mar 2006 00:38:54 +0300 Subject: [PATCH 28/65] Revert the changeset for Bug#16144 "mysql_stmt_attr_get type error": it breaks binary compatibility. The patch will be left intact in 5.1. libmysql/libmysql.c: Revert the changeset for Bug#16144: it breaks binary compatibility. tests/mysql_client_test.c: Revert the changeset for Bug#16144: it breaks binary compatibility. --- libmysql/libmysql.c | 2 +- tests/mysql_client_test.c | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 498881aa947..898e0ad3273 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2733,7 +2733,7 @@ my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, { switch (attr_type) { case STMT_ATTR_UPDATE_MAX_LENGTH: - *(my_bool*) value= stmt->update_max_length; + *(unsigned long *) value= stmt->update_max_length; break; default: return TRUE; diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index dbc2f582466..71ae5e4f052 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -11784,25 +11784,6 @@ static void test_bug12925() } -/* Bug #16144: mysql_stmt_attr_get type error */ - -static void test_bug16144() -{ - const my_bool flag_orig= (my_bool) 0xde; - my_bool flag= flag_orig; - MYSQL_STMT *stmt; - myheader("test_bug16144"); - - /* Check that attr_get returns correct data on little and big endian CPUs */ - stmt= mysql_stmt_init(mysql); - mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void*) &flag); - mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &flag); - DIE_UNLESS(flag == flag_orig); - - mysql_stmt_close(stmt); -} - - /* Bug #15613: "libmysqlclient API function mysql_stmt_prepare returns wrong field length" @@ -12089,7 +12070,6 @@ static struct my_tests_st my_tests[]= { { "test_bug12001", test_bug12001 }, { "test_bug11718", test_bug11718 }, { "test_bug12925", test_bug12925 }, - { "test_bug16144", test_bug16144 }, { "test_bug15613", test_bug15613 }, { 0, 0 } }; From 572f03cb51e06007b03ca102fdc9c40d79bb01bc Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Mar 2006 22:49:38 +0100 Subject: [PATCH 29/65] ndb - bug#17761 blob tables patch 3a [requires next patch 3b] storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: parse blob table name (temp hack) storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: parse blob table name (temp hack) storage/ndb/src/ndbapi/DictCache.cpp: do not put blob tables in ndb api dict cache main table is cached and blob tables are owned by its blob columns storage/ndb/src/ndbapi/Ndb.cpp: do not put blob tables in ndb api dict cache main table is cached and blob tables are owned by its blob columns storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: do not put blob tables in ndb api dict cache main table is cached and blob tables are owned by its blob columns storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: do not put blob tables in ndb api dict cache main table is cached and blob tables are owned by its blob columns --- .../include/kernel/signaldata/DictTabInfo.hpp | 4 + .../debugger/signaldata/DictTabInfo.cpp | 30 ++++ storage/ndb/src/ndbapi/DictCache.cpp | 10 ++ storage/ndb/src/ndbapi/Ndb.cpp | 4 +- storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp | 149 ++++++++++-------- storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp | 25 ++- 6 files changed, 138 insertions(+), 84 deletions(-) diff --git a/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp b/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp index 2f2b26f34a4..5c0781944c3 100644 --- a/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp +++ b/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp @@ -196,6 +196,10 @@ public: Datafile = 22, ///< Datafile Undofile = 23 ///< Undofile }; + + // used 1) until type BlobTable added 2) in upgrade code + static bool + isBlobTableName(const char* name, Uint32* ptab_id = 0, Uint32* pcol_no = 0); static inline bool isTable(int tableType) { diff --git a/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp b/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp index d0f48597c77..9833601ed5c 100644 --- a/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp +++ b/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp @@ -260,3 +260,33 @@ DictFilegroupInfo::File::init(){ FileSizeLo = 0; FileFreeExtents = 0; } + +// blob table name hack + +bool +DictTabInfo::isBlobTableName(const char* name, Uint32* ptab_id, Uint32* pcol_no) +{ + const char* const prefix = "NDB$BLOB_"; + const char* s = strrchr(name, table_name_separator); + s = (s == NULL ? name : s + 1); + if (strncmp(s, prefix, strlen(prefix)) != 0) + return false; + s += strlen(prefix); + uint i, n; + for (i = 0, n = 0; '0' <= s[i] && s[i] <= '9'; i++) + n += 10 * n + (s[i] - '0'); + if (i == 0 || s[i] != '_') + return false; + const uint tab_id = n; + s = &s[i + 1]; + for (i = 0, n = 0; '0' <= s[i] && s[i] <= '9'; i++) + n += 10 * n + (s[i] - '0'); + if (i == 0 || s[i] != 0) + return false; + const uint col_no = n; + if (ptab_id) + *ptab_id = tab_id; + if (pcol_no) + *pcol_no = col_no; + return true; +} diff --git a/storage/ndb/src/ndbapi/DictCache.cpp b/storage/ndb/src/ndbapi/DictCache.cpp index f3c9a934b90..fc276472c48 100644 --- a/storage/ndb/src/ndbapi/DictCache.cpp +++ b/storage/ndb/src/ndbapi/DictCache.cpp @@ -27,6 +27,7 @@ static NdbTableImpl f_altered_table; Ndb_local_table_info * Ndb_local_table_info::create(NdbTableImpl *table_impl, Uint32 sz) { + assert(! is_ndb_blob_table(table_impl)); Uint32 tot_size= sizeof(Ndb_local_table_info) - sizeof(Uint64) + ((sz+7) & ~7); // round to Uint64 void *data= malloc(tot_size); @@ -44,6 +45,7 @@ void Ndb_local_table_info::destroy(Ndb_local_table_info *info) Ndb_local_table_info::Ndb_local_table_info(NdbTableImpl *table_impl) { + assert(! is_ndb_blob_table(table_impl)); m_table_impl= table_impl; } @@ -61,18 +63,21 @@ LocalDictCache::~LocalDictCache(){ Ndb_local_table_info * LocalDictCache::get(const char * name){ + assert(! is_ndb_blob_table(name)); const Uint32 len = strlen(name); return m_tableHash.getData(name, len); } void LocalDictCache::put(const char * name, Ndb_local_table_info * tab_info){ + assert(! is_ndb_blob_table(name)); const Uint32 id = tab_info->m_table_impl->m_id; m_tableHash.insertKey(name, strlen(name), id, tab_info); } void LocalDictCache::drop(const char * name){ + assert(! is_ndb_blob_table(name)); Ndb_local_table_info *info= m_tableHash.deleteKey(name, strlen(name)); DBUG_ASSERT(info != 0); Ndb_local_table_info::destroy(info); @@ -142,6 +147,7 @@ GlobalDictCache::get(const char * name) { DBUG_ENTER("GlobalDictCache::get"); DBUG_PRINT("enter", ("name: %s", name)); + assert(! is_ndb_blob_table(name)); const Uint32 len = strlen(name); Vector * versions = 0; @@ -196,6 +202,7 @@ GlobalDictCache::put(const char * name, NdbTableImpl * tab) tab ? tab->m_internalName.c_str() : "tab NULL", tab ? tab->m_version & 0xFFFFFF : 0, tab ? tab->m_version >> 24 : 0)); + assert(! is_ndb_blob_table(name)); const Uint32 len = strlen(name); Vector * vers = m_tableHash.getData(name, len); @@ -261,6 +268,7 @@ GlobalDictCache::drop(NdbTableImpl * tab) { DBUG_ENTER("GlobalDictCache::drop"); DBUG_PRINT("enter", ("internal_name: %s", tab->m_internalName.c_str())); + assert(! is_ndb_blob_table(tab)); unsigned i; const Uint32 len = strlen(tab->m_internalName.c_str()); @@ -316,6 +324,7 @@ GlobalDictCache::release(NdbTableImpl * tab) { DBUG_ENTER("GlobalDictCache::release"); DBUG_PRINT("enter", ("internal_name: %s", tab->m_internalName.c_str())); + assert(! is_ndb_blob_table(tab)); unsigned i; const Uint32 len = strlen(tab->m_internalName.c_str()); @@ -365,6 +374,7 @@ GlobalDictCache::alter_table_rep(const char * name, Uint32 tableVersion, bool altered) { + assert(! is_ndb_blob_table(name)); const Uint32 len = strlen(name); Vector * vers = m_tableHash.getData(name, len); diff --git a/storage/ndb/src/ndbapi/Ndb.cpp b/storage/ndb/src/ndbapi/Ndb.cpp index fefd573b2ff..bdece3974c4 100644 --- a/storage/ndb/src/ndbapi/Ndb.cpp +++ b/storage/ndb/src/ndbapi/Ndb.cpp @@ -754,7 +754,7 @@ Ndb::getAutoIncrementValue(const char* aTableName, Uint32 cacheSize) BaseString internal_tabname(internalize_table_name(aTableName)); Ndb_local_table_info *info= - theDictionary->get_local_table_info(internal_tabname, false); + theDictionary->get_local_table_info(internal_tabname); if (info == 0) DBUG_RETURN(~(Uint64)0); const NdbTableImpl *table= info->m_table_impl; @@ -846,7 +846,7 @@ Ndb::setAutoIncrementValue(const char* aTableName, Uint64 val, bool increase) BaseString internal_tabname(internalize_table_name(aTableName)); Ndb_local_table_info *info= - theDictionary->get_local_table_info(internal_tabname, false); + theDictionary->get_local_table_info(internal_tabname); if (info == 0) { theError= theDictionary->getNdbError(); DBUG_RETURN(false); diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp index 3f2752172c9..c1a69be0d1a 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -49,6 +49,18 @@ extern Uint64 g_latest_trans_gci; +bool +is_ndb_blob_table(const char* name) +{ + return DictTabInfo::isBlobTableName(name); +} + +bool +is_ndb_blob_table(const NdbTableImpl* t) +{ + return is_ndb_blob_table(t->m_internalName.c_str()); +} + //#define EVENT_DEBUG /** @@ -239,6 +251,9 @@ NdbColumnImpl::init(Type t) NdbColumnImpl::~NdbColumnImpl() { + if (m_blobTable != NULL) + delete m_blobTable; + m_blobTable = NULL; } bool @@ -1282,6 +1297,14 @@ NdbDictionaryImpl::fetchGlobalTableImpl(const BaseString& internalTableName) if (impl == 0){ impl = m_receiver.getTable(internalTableName, m_ndb.usingFullyQualifiedNames()); + if (impl != 0) { + int ret = getBlobTables(*impl); + if (ret != 0) { + delete impl; + return 0; + } + } + m_globalHash->lock(); m_globalHash->put(internalTableName.c_str(), impl); m_globalHash->unlock(); @@ -1307,6 +1330,9 @@ NdbDictionaryImpl::putTable(NdbTableImpl *impl) { NdbTableImpl *old; + int ret = getBlobTables(*impl); + assert(ret == 0); + m_globalHash->lock(); if ((old= m_globalHash->get(impl->m_internalName.c_str()))) { @@ -1321,13 +1347,42 @@ NdbDictionaryImpl::putTable(NdbTableImpl *impl) Ndb_local_table_info::create(impl, m_local_table_data_size); m_localHash.put(impl->m_internalName.c_str(), info); - - addBlobTables(*impl); m_ndb.theFirstTupleId[impl->getTableId()] = ~0; m_ndb.theLastTupleId[impl->getTableId()] = ~0; } +int +NdbDictionaryImpl::getBlobTables(NdbTableImpl &t) +{ + unsigned n= t.m_noOfBlobs; + DBUG_ENTER("NdbDictionaryImpl::addBlobTables"); + // optimized for blob column being the last one + // and not looking for more than one if not neccessary + for (unsigned i = t.m_columns.size(); i > 0 && n > 0;) { + i--; + NdbColumnImpl & c = *t.m_columns[i]; + if (! c.getBlobType() || c.getPartSize() == 0) + continue; + n--; + // retrieve blob table def from DICT - by-pass cache + char btname[NdbBlobImpl::BlobTableNameSize]; + NdbBlob::getBlobTableName(btname, &t, &c); + BaseString btname_internal = m_ndb.internalize_table_name(btname); + NdbTableImpl* bt = + m_receiver.getTable(btname_internal, m_ndb.usingFullyQualifiedNames()); + if (bt == NULL) + DBUG_RETURN(-1); + + // TODO check primary id/version when returned by DICT + + // the blob column owns the blob table + assert(c.m_blobTable == NULL); + c.m_blobTable = bt; + } + DBUG_RETURN(0); +} + #if 0 bool NdbDictionaryImpl::setTransporter(class TransporterFacade * tf) @@ -2148,31 +2203,6 @@ NdbDictionaryImpl::createBlobTables(NdbTableImpl &t) DBUG_RETURN(0); } -int -NdbDictionaryImpl::addBlobTables(NdbTableImpl &t) -{ - unsigned n= t.m_noOfBlobs; - DBUG_ENTER("NdbDictionaryImpl::addBlobTables"); - // optimized for blob column being the last one - // and not looking for more than one if not neccessary - for (unsigned i = t.m_columns.size(); i > 0 && n > 0;) { - i--; - NdbColumnImpl & c = *t.m_columns[i]; - if (! c.getBlobType() || c.getPartSize() == 0) - continue; - n--; - char btname[NdbBlobImpl::BlobTableNameSize]; - NdbBlob::getBlobTableName(btname, &t, &c); - // Save BLOB table handle - NdbTableImpl * cachedBlobTable = getTable(btname); - if (cachedBlobTable == 0) { - DBUG_RETURN(-1); - } - c.m_blobTable = cachedBlobTable; - } - DBUG_RETURN(0); -} - int NdbDictInterface::createTable(Ndb & ndb, NdbTableImpl & impl) @@ -2188,7 +2218,7 @@ int NdbDictionaryImpl::alterTable(NdbTableImpl &impl) DBUG_ENTER("NdbDictionaryImpl::alterTable"); Ndb_local_table_info * local = 0; - if((local= get_local_table_info(originalInternalName, false)) == 0) + if((local= get_local_table_info(originalInternalName)) == 0) { m_error.code = 709; DBUG_RETURN(-1); @@ -2727,15 +2757,21 @@ NdbDictionaryImpl::dropBlobTables(NdbTableImpl & t) NdbColumnImpl & c = *t.m_columns[i]; if (! c.getBlobType() || c.getPartSize() == 0) continue; - char btname[NdbBlobImpl::BlobTableNameSize]; - NdbBlob::getBlobTableName(btname, &t, &c); - if (dropTable(btname) != 0) { - if (m_error.code != 709 && m_error.code != 723){ - DBUG_PRINT("exit",("error %u - exiting",m_error.code)); - DBUG_RETURN(-1); - } - DBUG_PRINT("info",("error %u - continuing",m_error.code)); + NdbTableImpl* bt = c.m_blobTable; + if (bt == NULL) { + DBUG_PRINT("info", ("col %s: blob table pointer is NULL", + c.m_name.c_str())); + continue; // "force" mode on } + // drop directly - by-pass cache + int ret = m_receiver.dropTable(*c.m_blobTable); + if (ret != 0) { + DBUG_PRINT("info", ("col %s: blob table %s: error %d", + c.m_name.c_str(), bt->m_internalName.c_str(), m_error.code)); + if (! (ret == 709 || ret == 723)) // "force" mode on + DBUG_RETURN(-1); + } + // leave c.m_blobTable defined } DBUG_RETURN(0); } @@ -2794,53 +2830,31 @@ NdbDictInterface::execDROP_TABLE_REF(NdbApiSignal * signal, } int -NdbDictionaryImpl::invalidateObject(NdbTableImpl & impl, bool lock) +NdbDictionaryImpl::invalidateObject(NdbTableImpl & impl) { const char * internalTableName = impl.m_internalName.c_str(); DBUG_ENTER("NdbDictionaryImpl::invalidateObject"); DBUG_PRINT("enter", ("internal_name: %s", internalTableName)); - if (lock) - m_globalHash->lock(); - if (impl.m_noOfBlobs != 0) { - for (uint i = 0; i < impl.m_columns.size(); i++) { - NdbColumnImpl& c = *impl.m_columns[i]; - if (! c.getBlobType() || c.getPartSize() == 0) - continue; - assert(c.m_blobTable != NULL); - invalidateObject(*c.m_blobTable, false); - } - } m_localHash.drop(internalTableName); + m_globalHash->lock(); impl.m_status = NdbDictionary::Object::Invalid; m_globalHash->drop(&impl); - if (lock) - m_globalHash->unlock(); + m_globalHash->unlock(); DBUG_RETURN(0); } int -NdbDictionaryImpl::removeCachedObject(NdbTableImpl & impl, bool lock) +NdbDictionaryImpl::removeCachedObject(NdbTableImpl & impl) { const char * internalTableName = impl.m_internalName.c_str(); DBUG_ENTER("NdbDictionaryImpl::removeCachedObject"); DBUG_PRINT("enter", ("internal_name: %s", internalTableName)); - if (lock) - m_globalHash->lock(); - if (impl.m_noOfBlobs != 0) { - for (uint i = 0; i < impl.m_columns.size(); i++) { - NdbColumnImpl& c = *impl.m_columns[i]; - if (! c.getBlobType() || c.getPartSize() == 0) - continue; - assert(c.m_blobTable != NULL); - removeCachedObject(*c.m_blobTable, false); - } - } m_localHash.drop(internalTableName); + m_globalHash->lock(); m_globalHash->release(&impl); - if (lock) - m_globalHash->unlock(); + m_globalHash->unlock(); DBUG_RETURN(0); } @@ -2851,8 +2865,7 @@ NdbIndexImpl* NdbDictionaryImpl::getIndexImpl(const char * externalName, const BaseString& internalName) { - Ndb_local_table_info * info = get_local_table_info(internalName, - false); + Ndb_local_table_info * info = get_local_table_info(internalName); if(info == 0){ m_error.code = 4243; return 0; @@ -3503,7 +3516,7 @@ NdbDictionaryImpl::getEvent(const char * eventName, NdbTableImpl* tab) // We only have the table name with internal name DBUG_PRINT("info",("table %s", ev->getTableName())); Ndb_local_table_info *info; - info= get_local_table_info(ev->getTableName(), true); + info= get_local_table_info(ev->getTableName()); if (info == 0) { DBUG_PRINT("error",("unable to find table %s", ev->getTableName())); @@ -3513,7 +3526,7 @@ NdbDictionaryImpl::getEvent(const char * eventName, NdbTableImpl* tab) if (info->m_table_impl->m_status != NdbDictionary::Object::Retrieved) { removeCachedObject(*info->m_table_impl); - info= get_local_table_info(ev->getTableName(), true); + info= get_local_table_info(ev->getTableName()); if (info == 0) { DBUG_PRINT("error",("unable to find table %s", ev->getTableName())); diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp index 5c26d386c99..aa4f13b9d5f 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp @@ -30,6 +30,9 @@ #include "NdbWaiter.hpp" #include "DictCache.hpp" +bool is_ndb_blob_table(const char* name); +bool is_ndb_blob_table(const class NdbTableImpl* t); + class NdbDictObjectImpl { public: int m_id; @@ -542,13 +545,12 @@ public: int createTable(NdbTableImpl &t); int createBlobTables(NdbTableImpl& t); - int addBlobTables(NdbTableImpl &); int alterTable(NdbTableImpl &t); int dropTable(const char * name); int dropTable(NdbTableImpl &); int dropBlobTables(NdbTableImpl &); - int invalidateObject(NdbTableImpl &, bool lock = true); - int removeCachedObject(NdbTableImpl &, bool lock = true); + int invalidateObject(NdbTableImpl &); + int removeCachedObject(NdbTableImpl &); int createIndex(NdbIndexImpl &ix); int dropIndex(const char * indexName, @@ -573,8 +575,9 @@ public: NdbTableImpl * getTable(const char * tableName, void **data= 0); void putTable(NdbTableImpl *impl); - Ndb_local_table_info* get_local_table_info( - const BaseString& internalTableName, bool do_add_blob_tables); + int getBlobTables(NdbTableImpl &); + Ndb_local_table_info* + get_local_table_info(const BaseString& internalTableName); NdbIndexImpl * getIndex(const char * indexName, const char * tableName); NdbEventImpl * getEvent(const char * eventName, NdbTableImpl* = NULL); @@ -848,7 +851,7 @@ NdbDictionaryImpl::getTable(const char * table_name, void **data) { const BaseString internal_tabname(m_ndb.internalize_table_name(table_name)); Ndb_local_table_info *info= - get_local_table_info(internal_tabname, true); + get_local_table_info(internal_tabname); if (info == 0) return 0; if (data) @@ -858,8 +861,7 @@ NdbDictionaryImpl::getTable(const char * table_name, void **data) inline Ndb_local_table_info * -NdbDictionaryImpl::get_local_table_info(const BaseString& internalTableName, - bool do_add_blob_tables) +NdbDictionaryImpl::get_local_table_info(const BaseString& internalTableName) { Ndb_local_table_info *info= m_localHash.get(internalTableName.c_str()); if (info == 0) { @@ -868,9 +870,6 @@ NdbDictionaryImpl::get_local_table_info(const BaseString& internalTableName, return 0; } } - if (do_add_blob_tables && info->m_table_impl->m_noOfBlobs) - addBlobTables(*(info->m_table_impl)); - return info; // autoincrement already initialized } @@ -891,7 +890,7 @@ NdbDictionaryImpl::getIndex(const char * index_name, if (internal_indexname.length()) { Ndb_local_table_info * info= - get_local_table_info(internal_indexname, false); + get_local_table_info(internal_indexname); if (info) { NdbTableImpl * tab= info->m_table_impl; @@ -956,6 +955,4 @@ NdbUndofileImpl::getImpl(const NdbDictionary::Undofile & t){ return t.m_impl; } - - #endif From bb453729b8860fca3f3064287fecf566faa35397 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 12:52:38 +0400 Subject: [PATCH 30/65] Fix for bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8 calculate Item_func_format::max_length using charset->mbmaxlen mysql-test/r/func_math.result: Fix for bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8 test case mysql-test/t/func_math.test: Fix for bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8 test case --- mysql-test/r/func_math.result | 20 ++++++++++++++++++++ mysql-test/t/func_math.test | 22 ++++++++++++++++++++++ sql/item_strfunc.h | 4 +++- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 1507f959ae6..43748257203 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -218,3 +218,23 @@ truncate(-5000111000111000155,-1) select truncate(15000111000111000155,-1); truncate(15000111000111000155,-1) 15000111000111000150 +set names utf8; +create table t1 +(f1 varchar(32) not null, +f2 smallint(5) unsigned not null, +f3 int(10) unsigned not null default '0') +engine=myisam default charset=utf8; +insert into t1 values ('zombie',0,0),('gold',1,10000),('silver',2,10000); +create table t2 +(f1 int(10) unsigned not null, +f2 int(10) unsigned not null, +f3 smallint(5) unsigned not null) +engine=myisam default charset=utf8; +insert into t2 values (16777216,16787215,1),(33554432,33564431,2); +select format(t2.f2-t2.f1+1,0) from t1,t2 +where t1.f2 = t2.f3 order by t1.f1; +format(t2.f2-t2.f1+1,0) +10,000 +10,000 +drop table t1, t2; +set names default; diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 8dc4eb215c7..4041c267134 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -155,3 +155,25 @@ select truncate(-5000111000111000155,-1); # truncate on unsigned bigint select truncate(15000111000111000155,-1); +# +# Bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8 +# +set names utf8; +create table t1 +(f1 varchar(32) not null, + f2 smallint(5) unsigned not null, + f3 int(10) unsigned not null default '0') +engine=myisam default charset=utf8; +insert into t1 values ('zombie',0,0),('gold',1,10000),('silver',2,10000); + +create table t2 +(f1 int(10) unsigned not null, + f2 int(10) unsigned not null, + f3 smallint(5) unsigned not null) +engine=myisam default charset=utf8; +insert into t2 values (16777216,16787215,1),(33554432,33564431,2); + +select format(t2.f2-t2.f1+1,0) from t1,t2 +where t1.f2 = t2.f3 order by t1.f1; +drop table t1, t2; +set names default; diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 50ec0b36ce8..6a95a9e5d1f 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -471,7 +471,9 @@ public: void fix_length_and_dec() { collation.set(default_charset()); - max_length=args[0]->max_length+(args[0]->max_length-args[0]->decimals)/3; + uint char_length= args[0]->max_length/args[0]->collation.collation->mbmaxlen; + max_length= ((char_length + (char_length-args[0]->decimals)/3) * + collation.collation->mbmaxlen); } const char *func_name() const { return "format"; } void print(String *); From 5465a1489946d428fd0133db3343d956fd4fc217 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 10:24:06 +0100 Subject: [PATCH 31/65] Fix for Bug#17888 DD: ADD INDEX causes error 756 'Index on disk column is not supported --- mysql-test/r/ndb_dd_ddl.result | 2 +- mysql-test/t/ndb_dd_ddl.test | 2 +- sql/sql_table.cc | 24 ++++++++++++++++++------ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/ndb_dd_ddl.result b/mysql-test/r/ndb_dd_ddl.result index cdead642134..30986526e2c 100644 --- a/mysql-test/r/ndb_dd_ddl.result +++ b/mysql-test/r/ndb_dd_ddl.result @@ -175,7 +175,7 @@ CREATE TABLE t1 (pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) TABLESPACE ts1 STORAGE DISK ENGINE NDB; -CREATE INDEX c on t1(c); +CREATE INDEX c on t1(b, c); DROP TABLE t1; ALTER TABLESPACE ts1 DROP DATAFILE 'datafile2.dat' diff --git a/mysql-test/t/ndb_dd_ddl.test b/mysql-test/t/ndb_dd_ddl.test index dde65d4b52b..b6aa9e13936 100644 --- a/mysql-test/t/ndb_dd_ddl.test +++ b/mysql-test/t/ndb_dd_ddl.test @@ -263,7 +263,7 @@ CREATE TABLE t1 TABLESPACE ts1 STORAGE DISK ENGINE NDB; -CREATE INDEX c on t1(c); +CREATE INDEX c on t1(b, c); DROP TABLE t1; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 757321b5ccf..9513f7ba48f 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3706,6 +3706,8 @@ static uint compare_tables(TABLE *table, List *create_list, uint changes= 0, tmp; List_iterator_fast new_field_it(*create_list); create_field *new_field; + KEY_PART_INFO *key_part; + KEY_PART_INFO *end; DBUG_ENTER("compare_tables"); /* @@ -3833,9 +3835,14 @@ static uint compare_tables(TABLE *table, List *create_list, /* Key modified. Add the offset of the key to both buffers. */ index_drop_buffer[(*index_drop_count)++]= table_key - table->key_info; index_add_buffer[(*index_add_count)++]= new_key - key_info_buffer; - field= table->field[new_key->key_part->fieldnr]; - // Mark field to be part of new key - field->add_index= 1; + key_part= new_key->key_part; + end= key_part + new_key->key_parts; + for(; key_part != end; key_part++) + { + // Mark field to be part of new key + field= table->field[key_part->fieldnr]; + field->add_index= 1; + } DBUG_PRINT("info", ("index changed: '%s'", table_key->name)); } /*end of for (; table_key < table_key_end;) */ @@ -3855,9 +3862,14 @@ static uint compare_tables(TABLE *table, List *create_list, { /* Key not found. Add the offset of the key to the add buffer. */ index_add_buffer[(*index_add_count)++]= new_key - key_info_buffer; - field= table->field[new_key->key_part->fieldnr]; - // Mark field to be part of new key - field->add_index= 1; + key_part= new_key->key_part; + end= key_part + new_key->key_parts; + for(; key_part != end; key_part++) + { + // Mark field to be part of new key + field= table->field[key_part->fieldnr]; + field->add_index= 1; + } DBUG_PRINT("info", ("index added: '%s'", new_key->name)); } } From d5f8b5c6e680f3699d0dc764c50fb525706a0da6 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 10:55:44 +0100 Subject: [PATCH 32/65] Added test for Bug#17888 DD: ADD INDEX causes error 756 'Index on disk column is not supported --- mysql-test/r/ndb_dd_ddl.result | 3 ++- mysql-test/t/ndb_dd_ddl.test | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/ndb_dd_ddl.result b/mysql-test/r/ndb_dd_ddl.result index 30986526e2c..4f3354b1859 100644 --- a/mysql-test/r/ndb_dd_ddl.result +++ b/mysql-test/r/ndb_dd_ddl.result @@ -175,7 +175,8 @@ CREATE TABLE t1 (pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) TABLESPACE ts1 STORAGE DISK ENGINE NDB; -CREATE INDEX c on t1(b, c); +CREATE INDEX b_i on t1(b); +CREATE INDEX bc_i on t1(b, c); DROP TABLE t1; ALTER TABLESPACE ts1 DROP DATAFILE 'datafile2.dat' diff --git a/mysql-test/t/ndb_dd_ddl.test b/mysql-test/t/ndb_dd_ddl.test index b6aa9e13936..ff1532ec1de 100644 --- a/mysql-test/t/ndb_dd_ddl.test +++ b/mysql-test/t/ndb_dd_ddl.test @@ -263,7 +263,8 @@ CREATE TABLE t1 TABLESPACE ts1 STORAGE DISK ENGINE NDB; -CREATE INDEX c on t1(b, c); +CREATE INDEX b_i on t1(b); +CREATE INDEX bc_i on t1(b, c); DROP TABLE t1; From e2f92ba5c5fd1921b18370025326dadd409a4b65 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 10:57:57 +0100 Subject: [PATCH 33/65] ndb - enable rpl_ndb_charset Bug#17246 for test mysql-test/t/disabled.def: enable rpl_ndb_charset Bug#17246 for test since I dont see any bug here --- mysql-test/t/disabled.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index c32750d89e4..ec99bd26a2c 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -26,7 +26,7 @@ rpl_ndb_2innodb : Bugs#17400: delete & update of rows in table without p rpl_ndb_2myisam : Bugs#17400: delete & update of rows in table without pk fails rpl_ndb_auto_inc : Bug#17086 rpl_ndb_basic : Bug#16228 [IN REVIEW] -rpl_ndb_charset : Bug#17246 +#rpl_ndb_charset : Bug#17246 enable for test (no patch) rpl_ndb_ddl : Bug#17400: delete & update of rows in table without pk fails rpl_ndb_delete_nowhere : Bug#17400: delete & update of rows in table without pk fails rpl_ndb_innodb2ndb : Bugs#17400: delete & update of rows in table without pk fails From 3ecf9f040a7cbbbab243a31a9189ecbe94796d68 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 14:03:40 +0400 Subject: [PATCH 34/65] Fix for bug#14385 GRANT and mapping to correct user account problems Check if the host of table hash record exactly matches host from GRANT command mysql-test/r/grant.result: Fix for bug#14385 GRANT and mapping to correct user account problems test case mysql-test/t/grant.test: Fix for bug#14385 GRANT and mapping to correct user account problems test case --- mysql-test/r/grant.result | 18 ++++++++++++++++++ mysql-test/t/grant.test | 16 ++++++++++++++++ sql/sql_acl.cc | 5 ++++- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 13593ec2a88..dffa4988ea7 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -473,3 +473,21 @@ GRANT USAGE ON *.* TO 'mysqltest_7'@'' IDENTIFIED BY PASSWORD '*2FB071A056F9BB74 drop user mysqltest_7@; show grants for mysqltest_7@; ERROR 42000: There is no such grant defined for user 'mysqltest_7' on host '' +create database mysqltest; +use mysqltest; +create table t1(f1 int); +GRANT DELETE ON mysqltest.t1 TO mysqltest1@'%'; +GRANT SELECT ON mysqltest.t1 TO mysqltest1@'192.%'; +show grants for mysqltest1@'192.%'; +Grants for mysqltest1@192.% +GRANT USAGE ON *.* TO 'mysqltest1'@'192.%' +GRANT SELECT ON `mysqltest`.`t1` TO 'mysqltest1'@'192.%' +show grants for mysqltest1@'%'; +Grants for mysqltest1@% +GRANT USAGE ON *.* TO 'mysqltest1'@'%' +GRANT DELETE ON `mysqltest`.`t1` TO 'mysqltest1'@'%' +delete from mysql.user where user='mysqltest1'; +delete from mysql.db where user='mysqltest1'; +delete from mysql.tables_priv where user='mysqltest1'; +flush privileges; +drop database mysqltest; diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 805fa881399..60b60547fcc 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -433,4 +433,20 @@ drop user mysqltest_7@; --error 1141 show grants for mysqltest_7@; +# +# Bug#14385: GRANT and mapping to correct user account problems +# +create database mysqltest; +use mysqltest; +create table t1(f1 int); +GRANT DELETE ON mysqltest.t1 TO mysqltest1@'%'; +GRANT SELECT ON mysqltest.t1 TO mysqltest1@'192.%'; +show grants for mysqltest1@'192.%'; +show grants for mysqltest1@'%'; +delete from mysql.user where user='mysqltest1'; +delete from mysql.db where user='mysqltest1'; +delete from mysql.tables_priv where user='mysqltest1'; +flush privileges; +drop database mysqltest; + # End of 4.1 tests diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index c1847d010c5..4626e5892a4 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2001,7 +2001,10 @@ static GRANT_TABLE *table_hash_search(const char *host,const char* ip, { if (exact) { - if (compare_hostname(&grant_table->host, host, ip)) + if ((host && + !my_strcasecmp(system_charset_info, host, + grant_table->host.hostname)) || + (ip && !strcmp(ip, grant_table->host.hostname))) return grant_table; } else From 5cfc63f896b9f620553bf86e1a597ae11d98065b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 11:15:23 +0100 Subject: [PATCH 35/65] ndb - bug#17761 blob tables patch 3b [closes the bug] storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: oops (but did not affect previous patch) storage/ndb/include/ndbapi/NdbDictionary.hpp: allow NDB API programs direct access to blob tables via main table or by name (hack) storage/ndb/src/ndbapi/NdbDictionary.cpp: allow NDB API programs direct access to blob tables via main table or by name (hack) storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: allow NDB API programs direct access to blob tables via main table or by name (hack) storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: allow NDB API programs direct access to blob tables via main table or by name (hack) storage/ndb/src/ndbapi/ndberror.c: allow NDB API programs direct access to blob tables via main table or by name (hack) --- storage/ndb/include/ndbapi/NdbDictionary.hpp | 6 +++ .../debugger/signaldata/DictTabInfo.cpp | 4 +- storage/ndb/src/ndbapi/NdbDictionary.cpp | 19 ++++++++ storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp | 45 ++++++++++++++++--- storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp | 32 ++++++++++--- storage/ndb/src/ndbapi/ndberror.c | 5 ++- 6 files changed, 95 insertions(+), 16 deletions(-) diff --git a/storage/ndb/include/ndbapi/NdbDictionary.hpp b/storage/ndb/include/ndbapi/NdbDictionary.hpp index 63b3d407e65..dcb83b5a1ab 100644 --- a/storage/ndb/include/ndbapi/NdbDictionary.hpp +++ b/storage/ndb/include/ndbapi/NdbDictionary.hpp @@ -1602,6 +1602,12 @@ public: const Table * getTable(const char * name) const; #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL + /** + * Given main table, get blob table. + */ + const Table * getBlobTable(const Table *, const char * col_name); + const Table * getBlobTable(const Table *, Uint32 col_no); + /* * Save a table definition in dictionary cache * @param table Object to put into cache diff --git a/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp b/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp index 9833601ed5c..47b2dfb1c77 100644 --- a/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp +++ b/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp @@ -274,13 +274,13 @@ DictTabInfo::isBlobTableName(const char* name, Uint32* ptab_id, Uint32* pcol_no) s += strlen(prefix); uint i, n; for (i = 0, n = 0; '0' <= s[i] && s[i] <= '9'; i++) - n += 10 * n + (s[i] - '0'); + n = 10 * n + (s[i] - '0'); if (i == 0 || s[i] != '_') return false; const uint tab_id = n; s = &s[i + 1]; for (i = 0, n = 0; '0' <= s[i] && s[i] <= '9'; i++) - n += 10 * n + (s[i] - '0'); + n = 10 * n + (s[i] - '0'); if (i == 0 || s[i] != 0) return false; const uint col_no = n; diff --git a/storage/ndb/src/ndbapi/NdbDictionary.cpp b/storage/ndb/src/ndbapi/NdbDictionary.cpp index 6e777599fd6..0c9243887d0 100644 --- a/storage/ndb/src/ndbapi/NdbDictionary.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionary.cpp @@ -1367,6 +1367,25 @@ NdbDictionary::Dictionary::getTable(const char * name) const return getTable(name, 0); } +const NdbDictionary::Table * +NdbDictionary::Dictionary::getBlobTable(const NdbDictionary::Table* table, + const char* col_name) +{ + const NdbDictionary::Column* col = table->getColumn(col_name); + if (col == NULL) { + m_impl.m_error.code = 4318; + return NULL; + } + return getBlobTable(table, col->getColumnNo()); +} + +const NdbDictionary::Table * +NdbDictionary::Dictionary::getBlobTable(const NdbDictionary::Table* table, + Uint32 col_no) +{ + return m_impl.getBlobTable(NdbTableImpl::getImpl(*table), col_no); +} + void NdbDictionary::Dictionary::invalidateTable(const char * name){ DBUG_ENTER("NdbDictionaryImpl::invalidateTable"); diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp index c1a69be0d1a..5f2780cd931 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -50,9 +50,9 @@ extern Uint64 g_latest_trans_gci; bool -is_ndb_blob_table(const char* name) +is_ndb_blob_table(const char* name, Uint32* ptab_id, Uint32* pcol_no) { - return DictTabInfo::isBlobTableName(name); + return DictTabInfo::isBlobTableName(name, ptab_id, pcol_no); } bool @@ -1383,6 +1383,43 @@ NdbDictionaryImpl::getBlobTables(NdbTableImpl &t) DBUG_RETURN(0); } +NdbTableImpl* +NdbDictionaryImpl::getBlobTable(const NdbTableImpl& tab, uint col_no) +{ + if (col_no < tab.m_columns.size()) { + NdbColumnImpl* col = tab.m_columns[col_no]; + if (col != NULL) { + NdbTableImpl* bt = col->m_blobTable; + if (bt != NULL) + return bt; + else + m_error.code = 4273; // No blob table.. + } else + m_error.code = 4249; // Invalid table.. + } else + m_error.code = 4318; // Invalid attribute.. + return NULL; +} + +NdbTableImpl* +NdbDictionaryImpl::getBlobTable(uint tab_id, uint col_no) +{ + DBUG_ENTER("NdbDictionaryImpl::getBlobTable"); + DBUG_PRINT("enter", ("tab_id: %u col_no %u", tab_id, col_no)); + + NdbTableImpl* tab = m_receiver.getTable(tab_id, + m_ndb.usingFullyQualifiedNames()); + if (tab == NULL) + DBUG_RETURN(NULL); + Ndb_local_table_info* info = + get_local_table_info(tab->m_internalName); + delete tab; + if (info == NULL) + DBUG_RETURN(NULL); + NdbTableImpl* bt = getBlobTable(*info->m_table_impl, col_no); + DBUG_RETURN(bt); +} + #if 0 bool NdbDictionaryImpl::setTransporter(class TransporterFacade * tf) @@ -1697,7 +1734,7 @@ NdbDictInterface::dictSignal(NdbApiSignal* sig, } DBUG_RETURN(-1); } -#if 0 + /* Get dictionary information for a table using table id as reference @@ -1721,8 +1758,6 @@ NdbDictInterface::getTable(int tableId, bool fullyQualifiedNames) return getTable(&tSignal, 0, 0, fullyQualifiedNames); } -#endif - /* Get dictionary information for a table using table name as the reference diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp index aa4f13b9d5f..cbeca3a1fcd 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp @@ -30,8 +30,10 @@ #include "NdbWaiter.hpp" #include "DictCache.hpp" -bool is_ndb_blob_table(const char* name); -bool is_ndb_blob_table(const class NdbTableImpl* t); +bool +is_ndb_blob_table(const char* name, Uint32* ptab_id = 0, Uint32* pcol_no = 0); +bool +is_ndb_blob_table(const class NdbTableImpl* t); class NdbDictObjectImpl { public: @@ -440,7 +442,7 @@ public: int listObjects(NdbDictionary::Dictionary::List& list, Uint32 requestData, bool fullyQualifiedNames); int listObjects(NdbApiSignal* signal); -/* NdbTableImpl * getTable(int tableId, bool fullyQualifiedNames); */ + NdbTableImpl * getTable(int tableId, bool fullyQualifiedNames); NdbTableImpl * getTable(const BaseString& name, bool fullyQualifiedNames); NdbTableImpl * getTable(class NdbApiSignal * signal, LinearSectionPtr ptr[3], @@ -574,6 +576,8 @@ public: int listIndexes(List& list, Uint32 indexId); NdbTableImpl * getTable(const char * tableName, void **data= 0); + NdbTableImpl * getBlobTable(const NdbTableImpl&, uint col_no); + NdbTableImpl * getBlobTable(uint tab_id, uint col_no); void putTable(NdbTableImpl *impl); int getBlobTables(NdbTableImpl &); Ndb_local_table_info* @@ -849,28 +853,42 @@ inline NdbTableImpl * NdbDictionaryImpl::getTable(const char * table_name, void **data) { + DBUG_ENTER("NdbDictionaryImpl::getTable"); + DBUG_PRINT("enter", ("table: %s", table_name)); + + if (unlikely(strchr(table_name, '$') != 0)) { + Uint32 tab_id, col_no; + if (is_ndb_blob_table(table_name, &tab_id, &col_no)) { + NdbTableImpl* t = getBlobTable(tab_id, col_no); + DBUG_RETURN(t); + } + } + const BaseString internal_tabname(m_ndb.internalize_table_name(table_name)); Ndb_local_table_info *info= get_local_table_info(internal_tabname); if (info == 0) - return 0; + DBUG_RETURN(0); if (data) *data= info->m_local_data; - return info->m_table_impl; + DBUG_RETURN(info->m_table_impl); } inline Ndb_local_table_info * NdbDictionaryImpl::get_local_table_info(const BaseString& internalTableName) { + DBUG_ENTER("NdbDictionaryImpl::get_local_table_info"); + DBUG_PRINT("enter", ("table: %s", internalTableName.c_str())); + Ndb_local_table_info *info= m_localHash.get(internalTableName.c_str()); if (info == 0) { info= fetchGlobalTableImpl(internalTableName); if (info == 0) { - return 0; + DBUG_RETURN(0); } } - return info; // autoincrement already initialized + DBUG_RETURN(info); // autoincrement already initialized } inline diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index 979313d6f83..bb4616a9ee2 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -506,7 +506,7 @@ ErrorBundle ErrorCodes[] = { { 4315, DMEC, AE, "No more key attributes allowed after defining variable length key attribute" }, { 4316, DMEC, AE, "Key attributes are not allowed to be NULL attributes" }, { 4317, DMEC, AE, "Too many primary keys defined in table" }, - { 4318, DMEC, AE, "Invalid attribute name" }, + { 4318, DMEC, AE, "Invalid attribute name or number" }, { 4319, DMEC, AE, "createAttribute called at erroneus place" }, { 4322, DMEC, AE, "Attempt to define distribution key when not prepared to" }, { 4323, DMEC, AE, "Distribution Key set on table but not defined on first attribute" }, @@ -598,7 +598,8 @@ ErrorBundle ErrorCodes[] = { { 4335, DMEC, AE, "Only one autoincrement column allowed per table. Having a table without primary key uses an autoincremented hidden key, i.e. a table without a primary key can not have an autoincremented column" }, { 4336, DMEC, AE, "Auto-increment value set below current value" }, { 4271, DMEC, AE, "Invalid index object, not retrieved via getIndex()" }, - { 4272, DMEC, AE, "Table definition has undefined column" } + { 4272, DMEC, AE, "Table definition has undefined column" }, + { 4273, DMEC, IE, "No blob table in dict cache" } }; static From 76e5c1b4b6bb3e748e46a204157409f7ba73a7bf Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 15:14:15 +0400 Subject: [PATCH 36/65] post-merge fix --- mysql-test/r/grant.result | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 603cf8bd675..3432de5179a 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -642,4 +642,3 @@ delete from mysql.db where user='mysqltest1'; delete from mysql.tables_priv where user='mysqltest1'; flush privileges; drop database mysqltest; - From f8763944e50cc90ba116b4919c6cd196ef3fa68d Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 12:21:42 +0100 Subject: [PATCH 37/65] Fix merge error, missing "," in result file --- mysql-test/r/bdb_gis.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/bdb_gis.result b/mysql-test/r/bdb_gis.result index 969cdb34788..b1a74eac2da 100644 --- a/mysql-test/r/bdb_gis.result +++ b/mysql-test/r/bdb_gis.result @@ -11,7 +11,7 @@ CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); SHOW CREATE TABLE gis_point; Table Create Table gis_point CREATE TABLE `gis_point` ( - `fid` int(11) NOT NULL AUTO_INCREMENT + `fid` int(11) NOT NULL AUTO_INCREMENT, `g` point DEFAULT NULL, PRIMARY KEY (`fid`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 From df72c73d6ddd82992967dab3d58328284bf90010 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 12:58:54 +0100 Subject: [PATCH 38/65] BUG#10460 SHOW CREATE TABLE uses inconsistent upper/lower case - Fix result files mysql-test/r/ndb_dd_backuprestore.result: Changes "auto_increment" to uppercase --- mysql-test/r/ndb_dd_backuprestore.result | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mysql-test/r/ndb_dd_backuprestore.result b/mysql-test/r/ndb_dd_backuprestore.result index 0410589e93a..e7568e4ce49 100644 --- a/mysql-test/r/ndb_dd_backuprestore.result +++ b/mysql-test/r/ndb_dd_backuprestore.result @@ -170,7 +170,7 @@ CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT SHOW CREATE TABLE test.t1; Table Create Table t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` varchar(150) NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -179,7 +179,7 @@ t1 CREATE TABLE `t1` ( SHOW CREATE TABLE test.t2; Table Create Table t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` text NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -188,7 +188,7 @@ t2 CREATE TABLE `t2` ( SHOW CREATE TABLE test.t3; Table Create Table t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` varchar(202) NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -197,7 +197,7 @@ t3 CREATE TABLE `t3` ( SHOW CREATE TABLE test.t4; Table Create Table t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` varchar(180) NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -206,7 +206,7 @@ t4 CREATE TABLE `t4` ( SHOW CREATE TABLE test.t5; Table Create Table t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` text NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -215,7 +215,7 @@ t5 CREATE TABLE `t5` ( SHOW CREATE TABLE test.t6; Table Create Table t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` varchar(220) NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -336,7 +336,7 @@ ENGINE =NDB; SHOW CREATE TABLE test.t1; Table Create Table t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` varchar(150) NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -345,7 +345,7 @@ t1 CREATE TABLE `t1` ( SHOW CREATE TABLE test.t2; Table Create Table t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` text NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -354,7 +354,7 @@ t2 CREATE TABLE `t2` ( SHOW CREATE TABLE test.t3; Table Create Table t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` varchar(202) NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -363,7 +363,7 @@ t3 CREATE TABLE `t3` ( SHOW CREATE TABLE test.t4; Table Create Table t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` varchar(180) NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -372,7 +372,7 @@ t4 CREATE TABLE `t4` ( SHOW CREATE TABLE test.t5; Table Create Table t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` text NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, @@ -381,7 +381,7 @@ t5 CREATE TABLE `t5` ( SHOW CREATE TABLE test.t6; Table Create Table t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL auto_increment, + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, `c2` varchar(220) NOT NULL, `c3` int(11) NOT NULL, `c4` bit(1) NOT NULL, From 850d692aa1d2db36e0f0b8b1276e2109c3940fd3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 13:51:57 +0100 Subject: [PATCH 39/65] ndb - close non-bug rpl_ndb_charset Bug#17246 mysql-test/t/disabled.def: close non-bug rpl_ndb_charset Bug#17246 --- mysql-test/t/disabled.def | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index ec99bd26a2c..d613645cdf7 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -26,7 +26,6 @@ rpl_ndb_2innodb : Bugs#17400: delete & update of rows in table without p rpl_ndb_2myisam : Bugs#17400: delete & update of rows in table without pk fails rpl_ndb_auto_inc : Bug#17086 rpl_ndb_basic : Bug#16228 [IN REVIEW] -#rpl_ndb_charset : Bug#17246 enable for test (no patch) rpl_ndb_ddl : Bug#17400: delete & update of rows in table without pk fails rpl_ndb_delete_nowhere : Bug#17400: delete & update of rows in table without pk fails rpl_ndb_innodb2ndb : Bugs#17400: delete & update of rows in table without pk fails From 7b8f4fc6f1c7680e7cf07c713bfd07dd26d50db9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 14:13:01 +0100 Subject: [PATCH 40/65] configure.in: Change default value --with-fast-mutexes=no configure.in: Change default value --with-fast-mutexes=no --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index f7017e4455c..46dd8317def 100644 --- a/configure.in +++ b/configure.in @@ -1592,7 +1592,7 @@ then AC_ARG_WITH([fast-mutexes], AC_HELP_STRING([--with-fast-mutexes], [compile with fast mutexes (default is enabled)]), - [with_fast_mutexes=$withval], [with_fast_mutexes=yes]) + [with_fast_mutexes=$withval], [with_fast_mutexes=no]) fi if test "$with_fast_mutexes" = "yes" From a36af20a0622d0659492ec9ad59dc1c2a0cc0936 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 14:25:18 +0100 Subject: [PATCH 41/65] configure.in: Change comment for fast-mutex configure.in: Change comment for fast-mutex --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 46dd8317def..8d1fcf70461 100644 --- a/configure.in +++ b/configure.in @@ -1591,7 +1591,7 @@ if test "$with_debug" = "no" then AC_ARG_WITH([fast-mutexes], AC_HELP_STRING([--with-fast-mutexes], - [compile with fast mutexes (default is enabled)]), + [Compile with fast mutexes (default is disabled)]), [with_fast_mutexes=$withval], [with_fast_mutexes=no]) fi From 95dd9bdc0057369657c445837238ac55492f91bd Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 14:57:41 +0100 Subject: [PATCH 42/65] mysql.spec.sh: Enabled fast mutexes, now default is off support-files/mysql.spec.sh: Enabled fast mutexes, now default is off --- support-files/mysql.spec.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index dd8953ce02e..ce734eb36a2 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -224,6 +224,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ --with-zlib-dir=bundled \ --enable-assembler \ --enable-local-infile \ + --with-fast-mutexes \ --with-mysqld-user=%{mysqld_user} \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --prefix=/ \ @@ -708,6 +709,11 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Mon Mar 06 2006 Kent Boortz + +- Fast mutexes is now disabled by default, but should be + used in Linux builds. + * Mon Feb 20 2006 Kent Boortz - Reintroduced a max build From 820bc464d70133713cdebfef53af1400828b41a4 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 17:09:23 +0100 Subject: [PATCH 43/65] Disable rpl_ndb_multt_update2 --- mysql-test/t/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index d613645cdf7..470ec96a694 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -38,3 +38,4 @@ rpl_ndb_sp007 : Bug #17290 rpl_sp : Bug#16456 rpl_until : Unstable test case, bug#15886 sp-goto : GOTO is currently is disabled - will be fixed in the future +rpl_ndb_multi_update2 : BUG#17738 In progress From 44bcc85b1212bc2c7c08709d8fb4a136c26350cd Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 17:17:22 +0100 Subject: [PATCH 44/65] Build fix, liboptions.a is now a libtool convenience library -liboptions.a -> liboptions.la server-tools/instance-manager/Makefile.am: Link with liboptions.la --- server-tools/instance-manager/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am index 3d7bfb5f4f9..ab08df99fd9 100644 --- a/server-tools/instance-manager/Makefile.am +++ b/server-tools/instance-manager/Makefile.am @@ -79,7 +79,7 @@ mysqlmanager_SOURCES= command.cc command.h mysqlmanager.cc \ portability.h mysqlmanager_LDADD= @CLIENT_EXTRA_LDFLAGS@ \ - liboptions.a \ + liboptions.la \ libnet.a \ $(top_builddir)/vio/libvio.a \ $(top_builddir)/mysys/libmysys.a \ From 807a74a33566372e36a3a4d009f4a0f9f2891b53 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 18:06:21 +0100 Subject: [PATCH 45/65] Tables are now removed remotely by binlog_thread --- mysql-test/r/ndb_multi_row.result | 4 +++- mysql-test/t/ndb_multi_row.test | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/ndb_multi_row.result b/mysql-test/r/ndb_multi_row.result index 2717314e30e..64b151d42a9 100644 --- a/mysql-test/r/ndb_multi_row.result +++ b/mysql-test/r/ndb_multi_row.result @@ -60,4 +60,6 @@ t2 t3 t4 drop table t1, t2, t3, t4; -drop table t1, t3, t4; +drop table if exists t1, t3, t4; +Warnings: +Error 155 Table 'test.t3' doesn't exist diff --git a/mysql-test/t/ndb_multi_row.test b/mysql-test/t/ndb_multi_row.test index bc1389ac654..05a0944e99a 100644 --- a/mysql-test/t/ndb_multi_row.test +++ b/mysql-test/t/ndb_multi_row.test @@ -71,6 +71,6 @@ show tables; drop table t1, t2, t3, t4; connection server2; -drop table t1, t3, t4; +drop table if exists t1, t3, t4; # End of 4.1 tests From a127344a6c6954012c5d750e07927501f40d907b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 18:26:39 +0100 Subject: [PATCH 46/65] kill (subquery) - three years old bugfix that never worked --- mysql-test/r/kill.result | 2 ++ mysql-test/t/kill.test | 3 +++ sql/sql_yacc.yy | 17 +++++++---------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index ba9ba2833f6..7e38311a556 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -17,3 +17,5 @@ select 4; 4 4 drop table t1; +kill (select count(*) from mysql.user); +ERROR 42000: 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 count(*) from mysql.user)' at line 1 diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index aada8dd2ef3..e9136ce49b4 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -40,4 +40,7 @@ connection con2; select 4; drop table t1; +--error 1064 +kill (select count(*) from mysql.user); + # End of 4.1 tests diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index c99abc7d349..05d95b57abb 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -3564,9 +3564,8 @@ select_derived2: { LEX *lex= Lex; lex->derived_tables= 1; - if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN && - lex->sql_command <= (int)SQLCOM_HA_READ) || - lex->sql_command == (int)SQLCOM_KILL) + if (lex->sql_command == (int)SQLCOM_HA_READ || + lex->sql_command == (int)SQLCOM_KILL) { yyerror(ER(ER_SYNTAX_ERROR)); YYABORT; @@ -4739,16 +4738,15 @@ purge_option: /* kill threads */ kill: - KILL_SYM expr + KILL_SYM { Lex->sql_command= SQLCOM_KILL; } expr { LEX *lex=Lex; - if ($2->fix_fields(lex->thd, 0, &$2) || $2->check_cols(1)) + if ($3->fix_fields(lex->thd, 0, &$3) || $3->check_cols(1)) { send_error(lex->thd, ER_SET_CONSTANTS_ONLY); YYABORT; } - lex->sql_command=SQLCOM_KILL; - lex->thread_id= (ulong) $2->val_int(); + lex->thread_id= (ulong) $3->val_int(); }; /* change database */ @@ -6162,9 +6160,8 @@ subselect_start: '(' SELECT_SYM { LEX *lex=Lex; - if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN && - lex->sql_command <= (int)SQLCOM_HA_READ) || - lex->sql_command == (int)SQLCOM_KILL) + if (lex->sql_command == (int)SQLCOM_HA_READ || + lex->sql_command == (int)SQLCOM_KILL) { yyerror(ER(ER_SYNTAX_ERROR)); YYABORT; From 7388e0bda19f3925061d43094c245e63d6bf2a58 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 20:06:56 +0100 Subject: [PATCH 47/65] Update test result mysql-test/r/lowercase_table2.result: Update test result for "lowercase_tabe2" after push of fix for bug10460 --- mysql-test/r/lowercase_table2.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result index 44235cbf900..a55ebaf7766 100644 --- a/mysql-test/r/lowercase_table2.result +++ b/mysql-test/r/lowercase_table2.result @@ -13,7 +13,7 @@ T1 SHOW CREATE TABLE T1; Table Create Table T1 CREATE TABLE `T1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 RENAME TABLE T1 TO T2; SHOW TABLES LIKE "T2"; @@ -68,7 +68,7 @@ T1 SHOW CREATE TABLE T1; Table Create Table T1 CREATE TABLE `T1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 RENAME TABLE T1 TO T2; SHOW TABLES LIKE "T2"; From 44693a63021b4b1627f18de0c380d626347700e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 20:09:16 +0100 Subject: [PATCH 48/65] Update test result mysql-test/r/rpl_row_UUID.result: Update test result for "rpl_row_UUID" after push of fix for bug10460 --- mysql-test/r/rpl_row_UUID.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/rpl_row_UUID.result b/mysql-test/r/rpl_row_UUID.result index 8043148a542..f56dc145901 100644 --- a/mysql-test/r/rpl_row_UUID.result +++ b/mysql-test/r/rpl_row_UUID.result @@ -29,9 +29,9 @@ insert into t2 values(fn1(2)); SHOW CREATE TABLE test.t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL DEFAULT '0', `blob_column` longblob, - `vchar_column` varchar(100) default NULL, + `vchar_column` varchar(100) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP PROCEDURE test.p1; From 1ba0179301fa78dfb238058ab4d9bf42885bd4ed Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 20:12:48 +0100 Subject: [PATCH 49/65] Update test result mysql-test/r/rpl_row_create_table.result: Update test results for "rpl_row_create_table" after push of fix for bug10460 --- mysql-test/r/rpl_row_create_table.result | 68 ++++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/mysql-test/r/rpl_row_create_table.result b/mysql-test/r/rpl_row_create_table.result index 4d485802a53..bf6a2fd0e8b 100644 --- a/mysql-test/r/rpl_row_create_table.result +++ b/mysql-test/r/rpl_row_create_table.result @@ -37,39 +37,39 @@ Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8 SHOW CREATE TABLE t1; Table t1 Create Table CREATE TABLE `t1` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW CREATE TABLE t2; Table t2 Create Table CREATE TABLE `t2` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() SHOW CREATE TABLE t3; Table t3 Create Table CREATE TABLE `t3` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 **** On Slave **** SHOW CREATE TABLE t1; Table t1 Create Table CREATE TABLE `t1` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 SHOW CREATE TABLE t2; Table t2 Create Table CREATE TABLE `t2` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() SHOW CREATE TABLE t3; Table t3 Create Table CREATE TABLE `t3` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 CREATE TABLE t5 (b INT, c INT) SELECT * FROM t3; CREATE TEMPORARY TABLE tt3 (a INT, b INT); @@ -79,18 +79,18 @@ CREATE TABLE t6 (b INT, c INT) SELECT * FROM tt3; SHOW CREATE TABLE t5; Table t5 Create Table CREATE TABLE `t5` ( - `c` int(11) default NULL, - `a` int(11) default NULL, - `b` int(11) default NULL + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT * FROM t5 ORDER BY a,b,c; c a b SHOW CREATE TABLE t6; Table t6 Create Table CREATE TABLE `t6` ( - `c` int(11) default NULL, - `a` int(11) default NULL, - `b` int(11) default NULL + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT * FROM t6 ORDER BY a,b,c; c a b @@ -104,18 +104,18 @@ NULL 6 12 SHOW CREATE TABLE t5; Table t5 Create Table CREATE TABLE `t5` ( - `c` int(11) default NULL, - `a` int(11) default NULL, - `b` int(11) default NULL + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 SELECT * FROM t5 ORDER BY a,b,c; c a b SHOW CREATE TABLE t6; Table t6 Create Table CREATE TABLE `t6` ( - `c` int(11) default NULL, - `a` int(11) default NULL, - `b` int(11) default NULL + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 SELECT * FROM t6 ORDER BY a,b,c; c a b @@ -182,32 +182,32 @@ CREATE TEMPORARY TABLE tt6 LIKE tt4; SHOW CREATE TABLE t8; Table t8 Create Table CREATE TABLE `t8` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() SHOW CREATE TABLE t9; Table t9 Create Table CREATE TABLE `t9` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW BINLOG EVENTS FROM 1548; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 1548 Query 1 1634 use `test`; CREATE TABLE t8 LIKE t4 master-bin.000001 1634 Query 1 1773 use `test`; CREATE TABLE `t9` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) **** On Slave **** SHOW CREATE TABLE t8; Table t8 Create Table CREATE TABLE `t8` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() SHOW CREATE TABLE t9; Table t9 Create Table CREATE TABLE `t9` ( - `a` int(11) default NULL, - `b` int(11) default NULL + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1 From 57839602acdaf93eb4d5076c94f75ce15deb46b8 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 21:45:13 +0100 Subject: [PATCH 50/65] Use grep instead of egrep Use system inestad of exec mysql-test/t/trigger-grant.test: Use "system" instead of exec for system admin tasks No need to use "egrep", changing to "grep" --- mysql-test/t/trigger-grant.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/t/trigger-grant.test b/mysql-test/t/trigger-grant.test index 297aa445322..7a3f7a9fa94 100644 --- a/mysql-test/t/trigger-grant.test +++ b/mysql-test/t/trigger-grant.test @@ -232,9 +232,9 @@ CREATE TRIGGER trg5 BEFORE DELETE ON t1 FOR EACH ROW SET @a = 5; ---exec egrep -v '^definers=' $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG > $MYSQLTEST_VARDIR/tmp/t1.TRG ---exec echo "definers='' '@' '@abc@def@@' '@hostname' '@abcdef@@@hostname'" >> $MYSQLTEST_VARDIR/tmp/t1.TRG ---exec mv $MYSQLTEST_VARDIR/tmp/t1.TRG $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG +--system grep -v '^definers=' $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG > $MYSQLTEST_VARDIR/tmp/t1.TRG +--system echo "definers='' '@' '@abc@def@@' '@hostname' '@abcdef@@@hostname'" >> $MYSQLTEST_VARDIR/tmp/t1.TRG +--system mv $MYSQLTEST_VARDIR/tmp/t1.TRG $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG --echo From 4a311f0a50a7e8a18a046def80cae1928164dc19 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 22:05:39 +0100 Subject: [PATCH 51/65] Win fixes - Use tmp sh file both in system and popen client/mysqltest.c: Introduce common functions to handle unix emulation on windows using a temporary sh file. Use it both in my_popen and my_system. mysql-test/r/mysqltest.result: Update test result mysql-test/t/mysqltest.test: Fix "windows paths" in three places that doesn't automatically get fixed Uset the output file mysqltest.sql instead of con.sql as con is not an allowed filename on Windows Use system for util functions --- client/mysqltest.c | 43 +++++++++++++++++++++++------ mysql-test/r/mysqltest.result | 6 ++-- mysql-test/t/mysqltest.test | 52 +++++++++++++++++++---------------- 3 files changed, 66 insertions(+), 35 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 5836a109b6e..2486aab4c65 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -455,6 +455,7 @@ static void do_eval(DYNAMIC_STRING *query_eval, const char *query, static void str_to_file(const char *fname, char *str, int size); #ifdef __WIN__ +static void free_tmp_sh_file(); static void free_win_path_patterns(); #endif @@ -604,6 +605,7 @@ static void free_used_memory() mysql_server_end(); free_re(); #ifdef __WIN__ + free_tmp_sh_file(); free_win_path_patterns(); #endif DBUG_VOID_RETURN; @@ -1046,6 +1048,35 @@ int do_source(struct st_query *query) return open_file(name); } +//#ifdef __WIN__ +/* Variables used for temuprary sh files used for emulating Unix on Windows */ +char tmp_sh_name[64], tmp_sh_cmd[70]; + +static void init_tmp_sh_file() +{ + /* Format a name for the tmp sh file that is unique for this process */ + my_snprintf(tmp_sh_name, sizeof(tmp_sh_name), "tmp_%d.sh", getpid()); + /* Format the command to execute in order to run the script */ + my_snprintf(tmp_sh_cmd, sizeof(tmp_sh_cmd), "sh %s", tmp_sh_name); +} + +static void free_tmp_sh_file() +{ + my_delete(tmp_sh_name, MYF(0)); +} + + +FILE* my_popen(DYNAMIC_STRING* ds_cmd, const char* mode) +{ +#ifdef __WIN__ + /* Dump the command into a sh script file and execute with popen */ + str_to_file(tmp_sh_name, ds_cmd->str, ds_cmd->length); + return popen(tmp_sh_cmd, mode); +#else + return popen(ds_cmd->str, mode); +#endif +} + /* Execute given command. @@ -1092,7 +1123,7 @@ static void do_exec(struct st_query *query) DBUG_PRINT("info", ("Executing '%s' as '%s'", query->first_argument, cmd)); - if (!(res_file= popen(cmd, "r")) && query->abort_on_error) + if (!(res_file= my_popen(&ds_cmd, "r")) && query->abort_on_error) die("popen(\"%s\", \"r\") failed", query->first_argument); while (fgets(buf, sizeof(buf), res_file)) @@ -1365,15 +1396,9 @@ int do_modify_var(struct st_query *query, const char *name, int my_system(DYNAMIC_STRING* ds_cmd) { #ifdef __WIN__ - /* Dump the command into a sh script file and execute with "sh" */ - int err; - char tmp_sh_name[64], tmp_sh_cmd[70]; - my_snprintf(tmp_sh_name, sizeof(tmp_sh_name), "tmp_%d.sh", getpid()); - my_snprintf(tmp_sh_cmd, sizeof(tmp_sh_cmd), "sh %s", tmp_sh_name); + /* Dump the command into a sh script file and execute with system */ str_to_file(tmp_sh_name, ds_cmd->str, ds_cmd->length); - err= system(tmp_sh_cmd); - my_delete(tmp_sh_name, MYF(0)); - return err; + return system(tmp_sh_cmd); #else return system(ds_cmd->str); #endif diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 9512a99e35e..d6b635ce6da 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -379,9 +379,9 @@ mysqltest: At line 1: Could not open connection 'con2': 1049 Unknown database 'i mysqltest: At line 1: Illegal argument for port: 'illegal_port' mysqltest: At line 1: Illegal option to connect: SMTP OK -mysqltest: In included file "MYSQLTEST_VARDIR/tmp/con.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c -mysqltest: In included file "MYSQLTEST_VARDIR/tmp/con.sql": At line 3: connection 'test_con1' not found in connection pool -mysqltest: In included file "MYSQLTEST_VARDIR/tmp/con.sql": At line 2: Connection test_con1 already exists +mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c +mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool +mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET); Output from mysqltest-x.inc Output from mysqltest-x.inc diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index f28df916ca1..a93aa24e812 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -599,6 +599,8 @@ echo $var3_var3; --error 1 --exec echo "source ;" | $MYSQL_TEST 2>&1 +# Fix win paths +--replace_result \\ / --error 1 --exec echo "source non_existingFile;" | $MYSQL_TEST 2>&1 @@ -806,6 +808,8 @@ while (!$i) } # Exceed max nesting level +# Fix win path +--replace_result \\ / --error 1 --exec echo "source include/mysqltest_while.inc;" | $MYSQL_TEST 2>&1 --error 1 @@ -925,41 +929,41 @@ select "a" as col1, "c" as col2; --exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $MYSQL_TEST 2>&1 # Repeat connect/disconnect ---exec echo "let \$i=100;" > $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "{" >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "}" >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql; echo OK;" | $MYSQL_TEST 2>&1 +--system echo "let \$i=100;" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "{" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "}" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1 # Repeat connect/disconnect, exceed max number of connections ---exec echo "let \$i=200;" > $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "{" >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "}" >> $MYSQLTEST_VARDIR/tmp/con.sql +--system echo "let \$i=200;" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "{" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "}" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1 ---exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1 # Select disconnected connection ---exec echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "connection test_con1;" >> $MYSQLTEST_VARDIR/tmp/con.sql +--system echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "connection test_con1;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1 ---exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1 # Connection name already used ---exec echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/con.sql ---exec echo "connect (test_con1,localhost,root,,);" >> $MYSQLTEST_VARDIR/tmp/con.sql +--system echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql +--system echo "connect (test_con1,localhost,root,,);" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1 ---exec echo "source $MYSQLTEST_VARDIR/tmp/con.sql;" | $MYSQL_TEST 2>&1 +--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1 # connect when "disable_abort_on_error" caused "connection not found" --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT @@ -977,6 +981,8 @@ connection con1; --exec $MYSQL_TEST < $MYSQL_TEST_DIR/include/mysqltest-x.inc --exec $MYSQL_TEST -x $MYSQL_TEST_DIR/include/mysqltest-x.inc --exec $MYSQL_TEST --test_file=$MYSQL_TEST_DIR/include/mysqltest-x.inc +# Fix Win paths +--replace_result \\ / --error 1 --exec $MYSQL_TEST -x non_existing_file.inc 2>&1 From 502b30735857df97a3ca2e652b3a32375d122507 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 22:08:29 +0100 Subject: [PATCH 52/65] compilation fixes BitKeeper/etc/ignore: Added include/openssl to the ignore list --- .bzrignore | 1 + libmysqld/lib_sql.cc | 51 +++++++++++++++++++------------------------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/.bzrignore b/.bzrignore index a16ed70a812..e521692f6c2 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1274,3 +1274,4 @@ vio/viotest.cpp zlib/*.ds? zlib/*.vcproj scripts/mysql_upgrade +include/openssl diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index e4c9d8cb4e9..a2fdae994b1 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -38,6 +38,7 @@ int check_user(THD *thd, enum enum_server_command command, const char *passwd, uint passwd_len, const char *db, bool check_count); C_MODE_START + #include #undef ER #include "errmsg.h" @@ -46,19 +47,6 @@ C_MODE_START static my_bool emb_read_query_result(MYSQL *mysql); -void THD::clear_data_list() -{ - while (first_data) - { - MYSQL_DATA *data= first_data; - first_data= data->embedded_info->next; - free_rows(data); - } - data_tail= &first_data; - free_rows(cur_data); - cur_data= 0; -} - /* Reads error information from the MYSQL_DATA and puts @@ -423,15 +411,6 @@ MYSQL_METHODS embedded_methods= emb_read_rows_from_cursor }; -C_MODE_END - -void THD::clear_error() -{ - net.last_error[0]= 0; - net.last_errno= 0; - net.report_error= 0; -} - /* Make a copy of array and the strings array points to */ @@ -458,11 +437,7 @@ char **copy_arguments(int argc, char **argv) return res; } - -extern "C" -{ - -char ** copy_arguments_ptr= 0; +char ** copy_arguments_ptr= 0; int init_embedded_server(int argc, char **argv, char **groups) { @@ -571,9 +546,7 @@ void end_embedded_server() clean_up(0); } -} /* extern "C" */ -C_MODE_START void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db) { THD *thd = (THD *)mysql->thd; @@ -693,6 +666,26 @@ err: C_MODE_END +void THD::clear_data_list() +{ + while (first_data) + { + MYSQL_DATA *data= first_data; + first_data= data->embedded_info->next; + free_rows(data); + } + data_tail= &first_data; + free_rows(cur_data); + cur_data= 0; +} + +void THD::clear_error() +{ + net.last_error[0]= 0; + net.last_errno= 0; + net.report_error= 0; +} + static char *dup_str_aux(MEM_ROOT *root, const char *from, uint length, CHARSET_INFO *fromcs, CHARSET_INFO *tocs) { From 187f89a443d25312d8d83c719dfbe9612827abf6 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 22:08:34 +0100 Subject: [PATCH 53/65] Remove unused var Reduce code client/mysqltest.c: Remove the "cmd" variable in do_sleep, left unintentionaly after merge Implement the same elegeant solution to fund the command name in do_modify_ar --- client/mysqltest.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 2486aab4c65..d37f60959d0 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1346,7 +1346,6 @@ enum enum_operator SYNOPSIS do_modify_var() query called command - name human readable name of operator operator operation to perform on the var DESCRIPTION @@ -1355,15 +1354,16 @@ enum enum_operator */ -int do_modify_var(struct st_query *query, const char *name, +int do_modify_var(struct st_query *query, enum enum_operator operator) { const char *p= query->first_argument; VAR* v; if (!*p) - die("Missing arguments to %s", name); + die("Missing argument to %.*s", query->first_word_len, query->query); if (*p != '$') - die("First argument to %s must be a variable (start with $)", name); + die("First argument to %.*s must be a variable (start with $)", + query->first_word_len, query->query); v= var_get(p, &p, 1, 0); switch (operator) { case DO_DEC: @@ -1697,7 +1697,6 @@ int do_sleep(struct st_query *query, my_bool real_sleep) char *p= query->first_argument; char *sleep_start, *sleep_end= query->end; double sleep_val; - const char *cmd = (real_sleep ? "real_sleep" : "sleep"); while (my_isspace(charset_info, *p)) p++; @@ -4617,8 +4616,8 @@ int main(int argc, char **argv) case Q_SERVER_START: do_server_start(q); break; case Q_SERVER_STOP: do_server_stop(q); break; #endif - case Q_INC: do_modify_var(q, "inc", DO_INC); break; - case Q_DEC: do_modify_var(q, "dec", DO_DEC); break; + case Q_INC: do_modify_var(q, DO_INC); break; + case Q_DEC: do_modify_var(q, DO_DEC); break; case Q_ECHO: do_echo(q); query_executed= 1; break; case Q_SYSTEM: do_system(q); break; case Q_DELIMITER: From e33e0bfc938c7cc7c7c5e836109ad7302f4d5940 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 22:14:06 +0100 Subject: [PATCH 54/65] Revert mysql-test/lib/mtr_misc.pl: Revert change to outpout exe path and name in win format --- mysql-test/lib/mtr_misc.pl | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl index 1f7ebdde457..a76f1b2d7b1 100644 --- a/mysql-test/lib/mtr_misc.pl +++ b/mysql-test/lib/mtr_misc.pl @@ -96,16 +96,7 @@ sub mtr_exe_exists (@) { map {$_.= ".exe"} @path if $::glob_win32; foreach my $path ( @path ) { - if ( -x $path ) - { - if ( $::glob_cygwin_perl ) - { - $path= `cygpath -w $path`; - # Chop off the \n that cygpath adds - $path=~ s/\n//; - } - return $path; - } + return $path if -x $path; } if ( @path == 1 ) { From 01a35c19cb81aa31934af62d4217bfcfe2bb6dd1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 22:18:04 +0100 Subject: [PATCH 55/65] Fix typo client/mysqltest.c: Fix typo, add extra "s" --- client/mysqltest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index d37f60959d0..09072d430f9 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1360,7 +1360,7 @@ int do_modify_var(struct st_query *query, const char *p= query->first_argument; VAR* v; if (!*p) - die("Missing argument to %.*s", query->first_word_len, query->query); + die("Missing arguments to %.*s", query->first_word_len, query->query); if (*p != '$') die("First argument to %.*s must be a variable (start with $)", query->first_word_len, query->query); From b267660646fb4b05d3237d4f59007294a7d45efd Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 23:43:47 +0100 Subject: [PATCH 56/65] after merge mysql-test/mysql-test-run.sh: tests depend on umask --- mysql-test/mysql-test-run.sh | 2 ++ mysql-test/r/kill.result | 12 ------------ mysql-test/t/kill.test | 1 - 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index c36e9a936f1..7c5a810bf73 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -19,6 +19,8 @@ TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work LOCAL_SOCKET=@MYSQL_UNIX_ADDR@ MYSQL_TCP_PORT=@MYSQL_TCP_PORT@ +umask 022 + # For query_cache test case `uname` in SCO_SV | UnixWare | OpenUNIX ) diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index c390745da16..b78c677fb02 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -29,18 +29,6 @@ select ((@id := kill_id) - kill_id) from t3; kill @id; Got one of the listed errors drop table t1, t2, t3; -create table t1 (id int primary key); -create table t2 (id int unsigned not null); -insert into t2 select id from t1; -create table t3 (kill_id int); -insert into t3 values(connection_id()); - select id from t1 where id in (select distinct id from t2); -select ((@id := kill_id) - kill_id) from t3; -((@id := kill_id) - kill_id) -0 -kill @id; -Got one of the listed errors -drop table t1, t2, t3; select get_lock("a", 10); get_lock("a", 10) 1 diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index eaeb174248b..f8ba649b3eb 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -47,7 +47,6 @@ connection con2; select 4; drop table t1; connection default; -disconnect con2; --error 1064 kill (select count(*) from mysql.user); From 60ee2bbecb795abba4e19aca3908a3ea01932025 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 07:50:04 +0100 Subject: [PATCH 57/65] Improve error message for faulty usage of "inc" and "dec" client/mysqltest.c: Improve error messages for "inc" and "dec" mysql-test/r/mysqltest.result: Update test result --- client/mysqltest.c | 6 +++--- mysql-test/r/mysqltest.result | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 09072d430f9..05304c1dd6d 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1360,9 +1360,9 @@ int do_modify_var(struct st_query *query, const char *p= query->first_argument; VAR* v; if (!*p) - die("Missing arguments to %.*s", query->first_word_len, query->query); + die("Missing argument to %.*s", query->first_word_len, query->query); if (*p != '$') - die("First argument to %.*s must be a variable (start with $)", + die("The argument to %.*s must be a variable (start with $)", query->first_word_len, query->query); v= var_get(p, &p, 1, 0); switch (operator) { @@ -1373,7 +1373,7 @@ int do_modify_var(struct st_query *query, v->int_val++; break; default: - die("Invalid operator to do_operator"); + die("Invalid operator to do_modify_var"); break; } v->int_dirty= 1; diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index d6b635ce6da..8055a33ec7d 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -305,8 +305,8 @@ mysqltest: At line 1: Invalid argument to real_sleep "abc" 101 hej 1 -mysqltest: At line 1: Missing arguments to inc -mysqltest: At line 1: First argument to inc must be a variable (start with $) +mysqltest: At line 1: Missing argument to inc +mysqltest: At line 1: The argument to inc must be a variable (start with $) mysqltest: At line 1: End of line junk detected: "1000" 4 4 @@ -315,8 +315,8 @@ mysqltest: At line 1: End of line junk detected: "1000" 99 hej -1 -mysqltest: At line 1: Missing arguments to dec -mysqltest: At line 1: First argument to dec must be a variable (start with $) +mysqltest: At line 1: Missing argument to dec +mysqltest: At line 1: The argument to dec must be a variable (start with $) mysqltest: At line 1: End of line junk detected: "1000" mysqltest: At line 1: Missing arguments to system, nothing to do! mysqltest: At line 1: Missing arguments to system, nothing to do! From 28e6f6c43c0fa9d6697e1bf98d3b25d346cfdc0c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 08:33:20 +0100 Subject: [PATCH 58/65] Bug#17874 (Test failure: rpl_row_basic_3innodb): Some storage engines does not set the filler bits, so we set them before calling the record-reading functions. sql/log_event.cc: Set the null byte containing filler bits before calling any record- reading functions. --- sql/log_event.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sql/log_event.cc b/sql/log_event.cc index e589f46e0e0..46f9535bba7 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -6424,6 +6424,13 @@ static int find_and_fetch_row(TABLE *table, byte *key) if (table->s->keys > 0) { int error; + /* + We need to set the null bytes to ensure that the filler bit + are all set when returning. There are storage engines that + just set the necessary bits on the bytes and don't set the + filler bits correctly. + */ + table->record[1][table->s->null_bytes - 1]= 0xFF; if ((error= table->file->index_read_idx(table->record[1], 0, key, table->key_info->key_length, HA_READ_KEY_EXACT))) @@ -6452,6 +6459,13 @@ static int find_and_fetch_row(TABLE *table, byte *key) while (record_compare(table)) { int error; + /* + We need to set the null bytes to ensure that the filler bit + are all set when returning. There are storage engines that + just set the necessary bits on the bytes and don't set the + filler bits correctly. + */ + table->record[1][table->s->null_bytes - 1]= 0xFF; if ((error= table->file->index_next(table->record[1]))) { table->file->print_error(error, MYF(0)); @@ -6466,6 +6480,13 @@ static int find_and_fetch_row(TABLE *table, byte *key) int error= 0; do { + /* + We need to set the null bytes to ensure that the filler bit + are all set when returning. There are storage engines that + just set the necessary bits on the bytes and don't set the + filler bits correctly. + */ + table->record[1][table->s->null_bytes - 1]= 0xFF; error= table->file->rnd_next(table->record[1]); switch (error) { From 07d36fb99a4b9419f60d4c09efc7e6c3fde0051c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 08:57:57 +0100 Subject: [PATCH 59/65] Enable ifdef for windows specific functions --- client/mysqltest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 05304c1dd6d..770ca7e2d2a 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1048,7 +1048,7 @@ int do_source(struct st_query *query) return open_file(name); } -//#ifdef __WIN__ +#ifdef __WIN__ /* Variables used for temuprary sh files used for emulating Unix on Windows */ char tmp_sh_name[64], tmp_sh_cmd[70]; @@ -1064,7 +1064,7 @@ static void free_tmp_sh_file() { my_delete(tmp_sh_name, MYF(0)); } - +#endif FILE* my_popen(DYNAMIC_STRING* ds_cmd, const char* mode) { From 06691fc3c6a7310669c236f4c533ffeafee3a754 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 13:05:24 +0400 Subject: [PATCH 60/65] Bug#17142 Crash if create with encoded name upgrade.result, upgrade.test: Adding test case. table.cc: Don't try to open a table with old-formatted name, if the table name contains "@" character. This is to avoid mixing two different names to each other. Thanks Monty for suggesting this fix. sql/table.cc: Bug#17142 Crash if create with encoded name Don't try to open a table with old-formatted name, if the table name contains "@" character. This is to avoid mixing two different names to each other. mysql-test/t/upgrade.test: Adding test case. mysql-test/r/upgrade.result: Adding test case. --- mysql-test/r/upgrade.result | 16 ++++++++++++++++ mysql-test/t/upgrade.test | 18 ++++++++++++++++++ sql/table.cc | 3 +++ 3 files changed, 37 insertions(+) diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result index bd60b02cb6a..9d35314d0c6 100644 --- a/mysql-test/r/upgrade.result +++ b/mysql-test/r/upgrade.result @@ -41,3 +41,19 @@ t1 t-1 drop database `mysqltest1`; drop database `mysqltest-1`; +drop table if exists `txu@0023P@0023p1`; +drop table if exists `txu#P#p1`; +create table `txu#P#p1` (s1 int); +insert into `txu#P#p1` values (1); +select * from `txu@0023P@0023p1`; +ERROR 42S02: Table 'test.txu@0023P@0023p1' doesn't exist +create table `txu@0023P@0023p1` (s1 int); +insert into `txu@0023P@0023p1` values (2); +select * from `txu@0023P@0023p1`; +s1 +2 +select * from `txu#P#p1`; +s1 +1 +drop table `txu@0023P@0023p1`; +drop table `txu#P#p1`; diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test index 42e32b686c2..f2017d81d5c 100644 --- a/mysql-test/t/upgrade.test +++ b/mysql-test/t/upgrade.test @@ -29,3 +29,21 @@ show tables in `mysqltest1`; show tables in `mysqltest-1`; drop database `mysqltest1`; drop database `mysqltest-1`; + +# +# Bug#17142: Crash if create with encoded name +# +--disable_warnings +drop table if exists `txu@0023P@0023p1`; +drop table if exists `txu#P#p1`; +--enable_warnings +create table `txu#P#p1` (s1 int); +insert into `txu#P#p1` values (1); +--error 1146 +select * from `txu@0023P@0023p1`; +create table `txu@0023P@0023p1` (s1 int); +insert into `txu@0023P@0023p1` values (2); +select * from `txu@0023P@0023p1`; +select * from `txu#P#p1`; +drop table `txu@0023P@0023p1`; +drop table `txu#P#p1`; diff --git a/sql/table.cc b/sql/table.cc index d6a715ae1b4..d0d8e6ad1b1 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -298,6 +298,9 @@ int open_table_def(THD *thd, TABLE_SHARE *share, uint db_flags) strxmov(path, share->normalized_path.str, reg_ext, NullS); if ((file= my_open(path, O_RDONLY | O_SHARE, MYF(0))) < 0) { + if (strchr(share->table_name.str, '@')) + goto err_not_open; + /* Try unecoded 5.0 name */ uint length; strxnmov(path, sizeof(path)-1, From f4ab06ee15ad47ac037502782e427ebdce28da84 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 12:19:27 +0100 Subject: [PATCH 61/65] Bug #16874 memory leaks in rpl_row_basic_7ndb.test - free ndb shares at server shutdown - free_table_share at free of ndb_share --- sql/ha_ndbcluster.cc | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index ff8a1221052..b1836b113e7 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -5995,6 +5995,22 @@ static int ndbcluster_end(ha_panic_function type) delete g_ndb_cluster_connection; g_ndb_cluster_connection= NULL; +#ifdef HAVE_NDB_BINLOG + { + pthread_mutex_lock(&ndbcluster_mutex); + for (uint i= 0; i < ndbcluster_open_tables.records; i++) + { + NDB_SHARE *share= + (NDB_SHARE*) hash_element(&ndbcluster_open_tables, i); +#ifndef DBUG_OFF + fprintf(stderr, "NDB: table share %s with use_count %d not freed\n", + share->key, share->use_count); +#endif + real_free_share(&share); + } + pthread_mutex_unlock(&ndbcluster_mutex); + } +#endif hash_free(&ndbcluster_open_tables); pthread_mutex_destroy(&ndbcluster_mutex); pthread_mutex_destroy(&LOCK_ndb_util_thread); @@ -6843,11 +6859,10 @@ void ndbcluster_real_free_share(NDB_SHARE **share) #ifdef HAVE_NDB_BINLOG if ((*share)->table) { + // (*share)->table->mem_root is freed by closefrm closefrm((*share)->table, 0); -#if 0 // todo ? - free_root(&(*share)->table->mem_root, MYF(0)); -#endif - + // (*share)->table_share->mem_root is freed by free_table_share + free_table_share((*share)->table_share); #ifndef DBUG_OFF bzero((gptr)(*share)->table_share, sizeof(*(*share)->table_share)); bzero((gptr)(*share)->table, sizeof(*(*share)->table)); From 807c7a6a49e6a78d87edb835185d3e69acaeea98 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 15:25:08 +0400 Subject: [PATCH 62/65] Fix for bug#15447 Partitions: NULL is treated as zero NULL value handling mysql-test/r/ndb_partition_error.result: Fix for bug#15447 Partitions: NULL is treated as zero test case mysql-test/r/partition.result: Fix for bug#15447 Partitions: NULL is treated as zero test case mysql-test/t/ndb_partition_error.test: Fix for bug#15447 Partitions: NULL is treated as zero test case mysql-test/t/partition.test: Fix for bug#15447 Partitions: NULL is treated as zero test case sql/partition_element.h: Fix for bug#15447 Partitions: NULL is treated as zero added null value flag to partition_element object sql/partition_info.h: Fix for bug#15447 Partitions: NULL is treated as zero added null value flag to partition_info object added has_null partition id variable --- mysql-test/r/ndb_partition_error.result | 9 ++++ mysql-test/r/partition.result | 49 +++++++++++++++++++++ mysql-test/t/ndb_partition_error.test | 13 ++++++ mysql-test/t/partition.test | 57 +++++++++++++++++++++++++ sql/ha_ndbcluster.cc | 1 + sql/ha_partition.cc | 1 + sql/partition_element.h | 3 +- sql/partition_info.h | 7 ++- sql/sql_partition.cc | 41 ++++++++++++++++++ sql/sql_show.cc | 6 +++ sql/sql_yacc.yy | 46 +++++++++++++++----- 11 files changed, 221 insertions(+), 12 deletions(-) diff --git a/mysql-test/r/ndb_partition_error.result b/mysql-test/r/ndb_partition_error.result index 66f623dee13..d86dc382185 100644 --- a/mysql-test/r/ndb_partition_error.result +++ b/mysql-test/r/ndb_partition_error.result @@ -36,3 +36,12 @@ INSERT INTO t1 VALUES (2); UPDATE t1 SET id=5 WHERE id=2; ERROR HY000: Table has no partition for value 5 DROP TABLE t1; +create table t1 (a int,b int, c int) +engine = ndb +partition by list(a) +partitions 2 +(partition x123 values in (11, 12), +partition x234 values in (5, 1)); +insert into t1 values (NULL,1,1); +ERROR HY000: Table has no partition for value NULL +drop table t1; diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index cd333cc5fb4..59e29046d90 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -373,4 +373,53 @@ end// call p()// drop procedure p// drop table t1// +create table t1 (a int,b int,c int,key(a,b)) +partition by range (a) +partitions 3 +(partition x1 values less than (0) tablespace ts1, +partition x2 values less than (10) tablespace ts2, +partition x3 values less than maxvalue tablespace ts3); +insert into t1 values (NULL, 1, 1); +insert into t1 values (0, 1, 1); +insert into t1 values (12, 1, 1); +select partition_name, partition_description, table_rows +from information_schema.partitions where table_schema ='test'; +partition_name partition_description table_rows +x1 0 1 +x2 10 1 +x3 MAXVALUE 1 +drop table t1; +create table t1 (a int,b int, c int) +partition by list(a) +partitions 2 +(partition x123 values in (11,12), +partition x234 values in (1 ,NULL, NULL)); +ERROR HY000: Multiple definition of same constant in list partitioning +create table t1 (a int,b int, c int) +partition by list(a) +partitions 2 +(partition x123 values in (11, NULL), +partition x234 values in (1 ,NULL)); +ERROR HY000: Multiple definition of same constant in list partitioning +create table t1 (a int,b int, c int) +partition by list(a) +partitions 2 +(partition x123 values in (11, 12), +partition x234 values in (5, 1)); +insert into t1 values (NULL,1,1); +ERROR HY000: Table has no partition for value NULL +drop table t1; +create table t1 (a int,b int, c int) +partition by list(a) +partitions 2 +(partition x123 values in (11, 12), +partition x234 values in (NULL, 1)); +insert into t1 values (11,1,6); +insert into t1 values (NULL,1,1); +select partition_name, partition_description, table_rows +from information_schema.partitions where table_schema ='test'; +partition_name partition_description table_rows +x123 11,12 1 +x234 NULL,1 1 +drop table t1; End of 5.1 tests diff --git a/mysql-test/t/ndb_partition_error.test b/mysql-test/t/ndb_partition_error.test index c84266b66f7..b2b6017ce7b 100644 --- a/mysql-test/t/ndb_partition_error.test +++ b/mysql-test/t/ndb_partition_error.test @@ -56,3 +56,16 @@ INSERT INTO t1 VALUES (2); --error ER_NO_PARTITION_FOR_GIVEN_VALUE UPDATE t1 SET id=5 WHERE id=2; DROP TABLE t1; + +# +# NULL for LIST partition +# +create table t1 (a int,b int, c int) +engine = ndb +partition by list(a) +partitions 2 +(partition x123 values in (11, 12), + partition x234 values in (5, 1)); +--error 1504 +insert into t1 values (NULL,1,1); +drop table t1; diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 47c25652ae9..f22edb54756 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -483,4 +483,61 @@ drop procedure p// drop table t1// delimiter ;// +# +# Bug #15447 Partitions: NULL is treated as zero +# + +# NULL for RANGE partition +create table t1 (a int,b int,c int,key(a,b)) +partition by range (a) +partitions 3 +(partition x1 values less than (0) tablespace ts1, + partition x2 values less than (10) tablespace ts2, + partition x3 values less than maxvalue tablespace ts3); + +insert into t1 values (NULL, 1, 1); +insert into t1 values (0, 1, 1); +insert into t1 values (12, 1, 1); + +select partition_name, partition_description, table_rows +from information_schema.partitions where table_schema ='test'; +drop table t1; + +# NULL for LIST partition +--error 1473 +create table t1 (a int,b int, c int) +partition by list(a) +partitions 2 +(partition x123 values in (11,12), + partition x234 values in (1 ,NULL, NULL)); + +--error 1473 +create table t1 (a int,b int, c int) +partition by list(a) +partitions 2 +(partition x123 values in (11, NULL), + partition x234 values in (1 ,NULL)); + +create table t1 (a int,b int, c int) +partition by list(a) +partitions 2 +(partition x123 values in (11, 12), + partition x234 values in (5, 1)); +--error 1504 +insert into t1 values (NULL,1,1); +drop table t1; + +create table t1 (a int,b int, c int) +partition by list(a) +partitions 2 +(partition x123 values in (11, 12), + partition x234 values in (NULL, 1)); + +insert into t1 values (11,1,6); +insert into t1 values (NULL,1,1); + +select partition_name, partition_description, table_rows +from information_schema.partitions where table_schema ='test'; +drop table t1; + --echo End of 5.1 tests diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index ff8a1221052..7f1eb343139 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -6012,6 +6012,7 @@ void ha_ndbcluster::print_error(int error, myf errflag) { char buf[100]; my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), + m_part_info->part_expr->null_value ? "NULL" : llstr(m_part_info->part_expr->val_int(), buf)); } else diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index e7a324481db..927b5a4a065 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5092,6 +5092,7 @@ void ha_partition::print_error(int error, myf errflag) { char buf[100]; my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), + m_part_info->part_expr->null_value ? "NULL" : llstr(m_part_info->part_expr->val_int(), buf)); } else diff --git a/sql/partition_element.h b/sql/partition_element.h index 8a11c332897..d20715d2408 100644 --- a/sql/partition_element.h +++ b/sql/partition_element.h @@ -51,13 +51,14 @@ public: handlerton *engine_type; enum partition_state part_state; uint16 nodegroup_id; + bool has_null_value; partition_element() : part_max_rows(0), part_min_rows(0), partition_name(NULL), tablespace_name(NULL), range_value(0), part_comment(NULL), data_file_name(NULL), index_file_name(NULL), engine_type(NULL),part_state(PART_NORMAL), - nodegroup_id(UNDEF_NODEGROUP) + nodegroup_id(UNDEF_NODEGROUP), has_null_value(FALSE) { subpartitions.empty(); list_val_list.empty(); diff --git a/sql/partition_info.h b/sql/partition_info.h index c8cb4ae407a..4a00f5c889f 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -181,6 +181,9 @@ public: bool linear_hash_ind; bool fixed; bool from_openfrm; + bool has_null_value; + uint has_null_part_id; + partition_info() : get_partition_id(NULL), get_part_partition_id(NULL), @@ -211,7 +214,9 @@ public: list_of_part_fields(FALSE), list_of_subpart_fields(FALSE), linear_hash_ind(FALSE), fixed(FALSE), - from_openfrm(FALSE) + from_openfrm(FALSE), + has_null_value(FALSE), + has_null_part_id(0) { all_fields_in_PF.clear_all(); all_fields_in_PPF.clear_all(); diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index c98f8f915b9..257c1988cbd 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -531,6 +531,7 @@ static bool check_list_constants(partition_info *part_info) bool result= TRUE; longlong curr_value, prev_value; partition_element* part_def; + bool found_null= FALSE; List_iterator list_func_it(part_info->partitions); DBUG_ENTER("check_list_constants"); @@ -556,6 +557,17 @@ static bool check_list_constants(partition_info *part_info) do { part_def= list_func_it++; + if (part_def->has_null_value) + { + if (found_null) + { + my_error(ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR, MYF(0)); + goto end; + } + part_info->has_null_value= TRUE; + part_info->has_null_part_id= i; + found_null= TRUE; + } List_iterator list_val_it1(part_def->list_val_list); while (list_val_it1++) no_list_values++; @@ -2041,6 +2053,16 @@ static int add_partition_values(File fptr, partition_info *part_info, err+= add_string(fptr, "VALUES IN "); uint no_items= p_elem->list_val_list.elements; err+= add_begin_parenthesis(fptr); + if (p_elem->has_null_value) + { + err+= add_string(fptr, "NULL"); + if (no_items == 0) + { + err+= add_end_parenthesis(fptr); + goto end; + } + err+= add_comma(fptr); + } i= 0; do { @@ -2051,6 +2073,7 @@ static int add_partition_values(File fptr, partition_info *part_info, } while (++i < no_items); err+= add_end_parenthesis(fptr); } +end: return err + add_space(fptr); } @@ -2631,6 +2654,15 @@ int get_partition_id_list(partition_info *part_info, longlong part_func_value= part_val_int(part_info->part_expr); DBUG_ENTER("get_partition_id_list"); + if (part_info->part_expr->null_value) + { + if (part_info->has_null_value) + { + *part_id= part_info->has_null_part_id; + DBUG_RETURN(0); + } + goto notfound; + } *func_value= part_func_value; while (max_list_index >= min_list_index) { @@ -2741,6 +2773,11 @@ int get_partition_id_range(partition_info *part_info, longlong part_func_value= part_val_int(part_info->part_expr); DBUG_ENTER("get_partition_id_int_range"); + if (part_info->part_expr->null_value) + { + *part_id= 0; + DBUG_RETURN(0); + } while (max_part_id > min_part_id) { loc_part_id= (max_part_id + min_part_id + 1) >> 1; @@ -2814,6 +2851,10 @@ uint32 get_partition_id_range_for_endpoint(partition_info *part_info, uint min_part_id= 0, max_part_id= max_partition, loc_part_id; /* Get the partitioning function value for the endpoint */ longlong part_func_value= part_val_int(part_info->part_expr); + + if (part_info->part_expr->null_value) + DBUG_RETURN(0); + while (max_part_id > min_part_id) { loc_part_id= (max_part_id + min_part_id + 1) >> 1; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 13f880ef228..51c92977a27 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3832,6 +3832,12 @@ static int get_schema_partitions_record(THD *thd, struct st_table_list *tables, uint no_items= part_elem->list_val_list.elements; tmp_str.length(0); tmp_res.length(0); + if (part_elem->has_null_value) + { + tmp_str.append("NULL"); + if (no_items > 0) + tmp_str.append(","); + } while ((list_value= list_val_it++)) { tmp_res.set(*list_value, cs); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 6c8b52d243c..235e78c6657 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -42,6 +42,12 @@ #include #include +typedef struct p_elem_val +{ + longlong value; + bool null_value; +} part_elem_value; + int yylex(void *yylval, void *yythd); const LEX_STRING null_lex_str={0,0}; @@ -105,6 +111,7 @@ inline Item *is_truth_value(Item *A, bool v1, bool v2) sp_name *spname; struct st_lex *lex; sp_head *sphead; + struct p_elem_val *p_elem_value; } %{ @@ -752,7 +759,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %type ulonglong_num size_number -%type +%type part_bit_expr %type @@ -3781,7 +3788,7 @@ part_func_max: part_range_func: '(' part_bit_expr ')' { - Lex->part_info->curr_part_elem->range_value= $2; + Lex->part_info->curr_part_elem->range_value= $2->value; } ; @@ -3793,12 +3800,12 @@ part_list_func: part_list_item: part_bit_expr { - longlong *value_ptr; - if (!(value_ptr= (longlong*)sql_alloc(sizeof(longlong))) || - ((*value_ptr= $1, FALSE) || - Lex->part_info->curr_part_elem->list_val_list.push_back(value_ptr))) + part_elem_value *value_ptr= $1; + if (!value_ptr->null_value && + Lex->part_info->curr_part_elem-> + list_val_list.push_back((longlong*) &value_ptr->value)) { - mem_alloc_error(sizeof(longlong)); + mem_alloc_error(sizeof(part_elem_value)); YYABORT; } } @@ -3818,6 +3825,15 @@ part_bit_expr: context->table_list= 0; thd->where= "partition function"; + + part_elem_value *value_ptr= + (part_elem_value*)sql_alloc(sizeof(part_elem_value)); + if (!value_ptr) + { + mem_alloc_error(sizeof(part_elem_value)); + YYABORT; + } + if (part_expr->fix_fields(YYTHD, (Item**)0) || ((context->table_list= save_list), FALSE) || (!part_expr->const_item()) || @@ -3827,13 +3843,23 @@ part_bit_expr: YYABORT; } thd->where= save_where; - if (part_expr->result_type() != INT_RESULT) + value_ptr->value= part_expr->val_int(); + if ((value_ptr->null_value= part_expr->null_value)) + { + if (Lex->part_info->curr_part_elem->has_null_value) + { + my_error(ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR, MYF(0)); + YYABORT; + } + Lex->part_info->curr_part_elem->has_null_value= TRUE; + } + else if (part_expr->result_type() != INT_RESULT && + !part_expr->null_value) { yyerror(ER(ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR)); YYABORT; } - item_value= part_expr->val_int(); - $$= item_value; + $$= value_ptr; } ; From 6d63797306d26c9cc565778d166f30c25ce7f7b9 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 13:29:53 +0100 Subject: [PATCH 63/65] Bug#16228 (RBR: Slave SQL thread retries infinitely): Transaction aborted on slave should be retries. The OPTION_BEGIN bit was cleared prematurely. Removed dependence of code on value of OPTION_BEGIN bit when executing retries. mysql-test/r/rpl_ndb_basic.result: Result change. mysql-test/t/disabled.def: Enabling test. mysql-test/t/rpl_ndb_basic.test: Changing test to allow checking that slave did not stop. sql/slave.cc: Rolling back transaction before retrying it. Only resetting transaction retries counter on a successful execution or a non-transitional error. --- mysql-test/r/rpl_ndb_basic.result | 40 ++++++++++++++++++++++++++++--- mysql-test/t/disabled.def | 2 +- mysql-test/t/rpl_ndb_basic.test | 6 +++-- sql/slave.cc | 13 ++++++++-- 4 files changed, 53 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/rpl_ndb_basic.result b/mysql-test/r/rpl_ndb_basic.result index 0fe681622c9..40e3384be3b 100644 --- a/mysql-test/r/rpl_ndb_basic.result +++ b/mysql-test/r/rpl_ndb_basic.result @@ -71,13 +71,47 @@ CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', PRIMARY KEY USING HASH (`nid`)) ENGINE=ndbcluster DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); +**** On Slave **** BEGIN; UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; set GLOBAL slave_transaction_retries=1; +**** On Master **** UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes No 146 Error in Write_rows event: error during transaction execution on table test.t1 0 None 0 No +**** On Slave **** +SHOW SLAVE STATUS;; +Slave_IO_State +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos +Relay_Log_File +Relay_Log_Pos +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 146 +Last_Error Error in Write_rows event: error during transaction execution on table test.t1 +Skip_Counter 0 +Exec_Master_Log_Pos +Relay_Log_Space +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master set GLOBAL slave_transaction_retries=10; START SLAVE; select * from t1 order by nid; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index c32750d89e4..0954e2a1732 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -25,7 +25,7 @@ rpl_ddl : Bug#15963 SBR does not show "Definer" correctly rpl_ndb_2innodb : Bugs#17400: delete & update of rows in table without pk fails rpl_ndb_2myisam : Bugs#17400: delete & update of rows in table without pk fails rpl_ndb_auto_inc : Bug#17086 -rpl_ndb_basic : Bug#16228 [IN REVIEW] +#rpl_ndb_basic : Bug#16228 [IN REVIEW] rpl_ndb_charset : Bug#17246 rpl_ndb_ddl : Bug#17400: delete & update of rows in table without pk fails rpl_ndb_delete_nowhere : Bug#17400: delete & update of rows in table without pk fails diff --git a/mysql-test/t/rpl_ndb_basic.test b/mysql-test/t/rpl_ndb_basic.test index 57028464179..bcce0284642 100644 --- a/mysql-test/t/rpl_ndb_basic.test +++ b/mysql-test/t/rpl_ndb_basic.test @@ -98,6 +98,7 @@ INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); # cause a lock on that row on the slave --sync_slave_with_master --connection slave +--echo **** On Slave **** BEGIN; UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; @@ -107,6 +108,7 @@ set GLOBAL slave_transaction_retries=1; # now do a change to this row on the master # will deadlock on the slave because of lock above --connection master +--echo **** On Master **** UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; # wait for deadlock to be detected @@ -119,14 +121,14 @@ UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; # replication should have stopped, since max retries where not enough # verify with show slave status --connection slave +--echo **** On Slave **** --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 7 8 9 16 22 23 33 -SHOW SLAVE STATUS; +--query_vertical SHOW SLAVE STATUS; # now set max retries high enough to succeed, and start slave again set GLOBAL slave_transaction_retries=10; START SLAVE; - # wait for deadlock to be detected and retried # should be the same sleep as above for test to be valid --sleep 5 diff --git a/sql/slave.cc b/sql/slave.cc index 39656700e1c..68c4757b735 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3093,6 +3093,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) else { exec_res= 0; + end_trans(thd, ROLLBACK); /* chance for concurrent connection to get more locks */ safe_sleep(thd, min(rli->trans_retries, MAX_SLAVE_RETRY_PAUSE), (CHECK_KILLED_FUNC)sql_slave_killed, (void*)rli); @@ -3110,8 +3111,16 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) "the slave_transaction_retries variable.", slave_trans_retries); } - if (!((thd->options & OPTION_BEGIN) && opt_using_transactions)) - rli->trans_retries= 0; // restart from fresh + else if (!((thd->options & OPTION_BEGIN) && opt_using_transactions)) + { + /* + Only reset the retry counter if the event succeeded or + failed with a non-transient error. On a successful event, + the execution will proceed as usual; in the case of a + non-transient error, the slave will stop with an error. + */ + rli->trans_retries= 0; // restart from fresh + } } return exec_res; } From f4c81a219a8842f9bb46fa79e5e5ff652b244850 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 14:34:20 +0100 Subject: [PATCH 64/65] Fix missing call to init_tmp_sh_file client/mysqltest.c: Add call to init_tmp_sh_file --- client/mysqltest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/mysqltest.c b/client/mysqltest.c index 770ca7e2d2a..468b75c927f 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -4563,6 +4563,7 @@ int main(int argc, char **argv) init_var_hash(&cur_con->mysql); #ifdef __WIN__ + init_tmp_sh_file(); init_win_path_patterns(); #endif From dd42550b139bc00549d2797bebece2f5e0954d21 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 18:53:26 +0100 Subject: [PATCH 65/65] mysql.spec.sh: Changed product name from "Community Edition" to "Community Server", bug#17970 support-files/mysql.spec.sh: Changed product name from "Community Edition" to "Community Server", bug#17970 --- support-files/mysql.spec.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index ce734eb36a2..3a0dca94267 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -302,7 +302,7 @@ BuildMySQL "--enable-shared \ --with-blackhole-storage-engine \ --with-federated-storage-engine \ --with-big-tables \ - --with-comment=\"MySQL Community Edition - Debug (GPL)\"") + --with-comment=\"MySQL Community Server - Debug (GPL)\"") # We might want to save the config log file if test -n "$MYSQL_DEBUGCONFLOG_DEST" @@ -333,7 +333,7 @@ BuildMySQL "--enable-shared \ --with-blackhole-storage-engine \ --with-federated-storage-engine \ --with-big-tables \ - --with-comment=\"MySQL Community Edition - Max (GPL)\"") + --with-comment=\"MySQL Community Server - Max (GPL)\"") # We might want to save the config log file if test -n "$MYSQL_MAXCONFLOG_DEST" @@ -363,7 +363,7 @@ BuildMySQL "--enable-shared \ --with-blackhole-storage-engine \ --with-federated-storage-engine \ --with-big-tables \ - --with-comment=\"MySQL Community Edition (GPL)\"") + --with-comment=\"MySQL Community Server (GPL)\"") # We might want to save the config log file if test -n "$MYSQL_CONFLOG_DEST" @@ -709,6 +709,10 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Wed Mar 07 2006 Kent Boortz + +- Changed product name from "Community Edition" to "Community Server" + * Mon Mar 06 2006 Kent Boortz - Fast mutexes is now disabled by default, but should be