Loading client/mysql.cc +5 −4 Original line number Diff line number Diff line Loading @@ -1133,10 +1133,11 @@ static COMMANDS *find_command(char *name,char cmd_char) parsing the row and calling find_command() */ if (strstr(name, "\\g") || (strstr(name, delimiter) && strlen(name) >= 9 && my_strnncoll(charset_info,(uchar*) name, 9, (const uchar*) "delimiter", 9))) !(strlen(name) >= 9 && !my_strnncoll(charset_info, (uchar*) name, 9, (const uchar*) "delimiter", 9)))) DBUG_RETURN((COMMANDS *) 0); if ((end=strcont(name," \t"))) { Loading client/mysqltest.c +9 −4 Original line number Diff line number Diff line Loading @@ -3616,19 +3616,24 @@ static int run_query_stmt(MYSQL *mysql, struct st_query *q, int flags) /* Read result from each column */ for (col_idx= 0; col_idx < num_fields; col_idx++) { /* FIXME is string terminated? */ const char *val= (const char *)bind[col_idx].buffer; ulonglong len= *bind[col_idx].length; const char *val; ulonglong len; if (col_idx < max_replace_column && replace_column[col_idx]) { val= replace_column[col_idx]; len= strlen(val); } if (*bind[col_idx].is_null) else if (*bind[col_idx].is_null) { val= "NULL"; len= 4; } else { /* FIXME is string terminated? */ val= (const char *) bind[col_idx].buffer; len= *bind[col_idx].length; } if (!display_result_vertically) { if (col_idx) /* No tab before first col */ Loading myisam/mi_check.c +1 −1 Original line number Diff line number Diff line Loading @@ -1848,7 +1848,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, if (sort_one_index(param,info,keyinfo,next_page,new_file)) { DBUG_PRINT("error", ("From page: %ld, keyoffset: 0x%lx used_length: %d", ("From page: %ld, keyoffset: %lu used_length: %d", (ulong) pagepos, (ulong) (keypos - buff), (int) used_length)); DBUG_DUMP("buff",(byte*) buff,used_length); Loading mysql-test/r/bdb.result +26 −30 Original line number Diff line number Diff line Loading @@ -1584,8 +1584,6 @@ g 10 h 10 i 10 alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v); Warnings: Warning 1071 Specified key was too long; max key length is 255 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( Loading @@ -1594,7 +1592,7 @@ t1 CREATE TABLE `t1` ( `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), KEY `v` (`v`(255)) KEY `v` (`v`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 select count(*) from t1 where v='a'; count(*) Loading @@ -1616,19 +1614,19 @@ count(*) 9 explain select count(*) from t1 where v='a '; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref v v 258 const # Using where 1 SIMPLE t1 ref v v 303 const # Using where explain select count(*) from t1 where v like 'a%'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range v v 258 NULL # Using where 1 SIMPLE t1 range v v 303 NULL # Using where explain select count(*) from t1 where v between 'a' and 'a '; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref v v 258 const # Using where 1 SIMPLE t1 ref v v 303 const # Using where explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref v v 258 const # Using where 1 SIMPLE t1 ref v v 303 const # Using where explain select * from t1 where v='a'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref v v 258 const # Using where 1 SIMPLE t1 ref v v 303 const # Using where select v,count(*) from t1 group by v limit 10; v count(*) a 1 Loading Loading @@ -1746,8 +1744,6 @@ g 10 h 10 i 10 alter table t1 modify v varchar(600), drop key v, add key v (v); Warnings: Warning 1071 Specified key was too long; max key length is 255 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( Loading @@ -1756,7 +1752,7 @@ t1 CREATE TABLE `t1` ( `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), KEY `v` (`v`(255)) KEY `v` (`v`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 select v,count(*) from t1 group by v limit 10; v count(*) Loading Loading @@ -1874,7 +1870,7 @@ a b drop table t1; create table t1 (v varchar(65530), key(v)); Warnings: Warning 1071 Specified key was too long; max key length is 255 bytes Warning 1071 Specified key was too long; max key length is 1024 bytes drop table if exists t1; create table t1 (v varchar(65536)); Warnings: Loading mysql-test/r/update.result +8 −0 Original line number Diff line number Diff line Loading @@ -337,3 +337,11 @@ a b 22 3 23 3 drop table t1; create table t1 (f1 date not null); insert into t1 values('2000-01-01'),('0000-00-00'); update t1 set f1='2002-02-02' where f1 is null; select * from t1; f1 2000-01-01 2002-02-02 drop table t1; Loading
client/mysql.cc +5 −4 Original line number Diff line number Diff line Loading @@ -1133,10 +1133,11 @@ static COMMANDS *find_command(char *name,char cmd_char) parsing the row and calling find_command() */ if (strstr(name, "\\g") || (strstr(name, delimiter) && strlen(name) >= 9 && my_strnncoll(charset_info,(uchar*) name, 9, (const uchar*) "delimiter", 9))) !(strlen(name) >= 9 && !my_strnncoll(charset_info, (uchar*) name, 9, (const uchar*) "delimiter", 9)))) DBUG_RETURN((COMMANDS *) 0); if ((end=strcont(name," \t"))) { Loading
client/mysqltest.c +9 −4 Original line number Diff line number Diff line Loading @@ -3616,19 +3616,24 @@ static int run_query_stmt(MYSQL *mysql, struct st_query *q, int flags) /* Read result from each column */ for (col_idx= 0; col_idx < num_fields; col_idx++) { /* FIXME is string terminated? */ const char *val= (const char *)bind[col_idx].buffer; ulonglong len= *bind[col_idx].length; const char *val; ulonglong len; if (col_idx < max_replace_column && replace_column[col_idx]) { val= replace_column[col_idx]; len= strlen(val); } if (*bind[col_idx].is_null) else if (*bind[col_idx].is_null) { val= "NULL"; len= 4; } else { /* FIXME is string terminated? */ val= (const char *) bind[col_idx].buffer; len= *bind[col_idx].length; } if (!display_result_vertically) { if (col_idx) /* No tab before first col */ Loading
myisam/mi_check.c +1 −1 Original line number Diff line number Diff line Loading @@ -1848,7 +1848,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, if (sort_one_index(param,info,keyinfo,next_page,new_file)) { DBUG_PRINT("error", ("From page: %ld, keyoffset: 0x%lx used_length: %d", ("From page: %ld, keyoffset: %lu used_length: %d", (ulong) pagepos, (ulong) (keypos - buff), (int) used_length)); DBUG_DUMP("buff",(byte*) buff,used_length); Loading
mysql-test/r/bdb.result +26 −30 Original line number Diff line number Diff line Loading @@ -1584,8 +1584,6 @@ g 10 h 10 i 10 alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v); Warnings: Warning 1071 Specified key was too long; max key length is 255 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( Loading @@ -1594,7 +1592,7 @@ t1 CREATE TABLE `t1` ( `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), KEY `v` (`v`(255)) KEY `v` (`v`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 select count(*) from t1 where v='a'; count(*) Loading @@ -1616,19 +1614,19 @@ count(*) 9 explain select count(*) from t1 where v='a '; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref v v 258 const # Using where 1 SIMPLE t1 ref v v 303 const # Using where explain select count(*) from t1 where v like 'a%'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range v v 258 NULL # Using where 1 SIMPLE t1 range v v 303 NULL # Using where explain select count(*) from t1 where v between 'a' and 'a '; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref v v 258 const # Using where 1 SIMPLE t1 ref v v 303 const # Using where explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref v v 258 const # Using where 1 SIMPLE t1 ref v v 303 const # Using where explain select * from t1 where v='a'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref v v 258 const # Using where 1 SIMPLE t1 ref v v 303 const # Using where select v,count(*) from t1 group by v limit 10; v count(*) a 1 Loading Loading @@ -1746,8 +1744,6 @@ g 10 h 10 i 10 alter table t1 modify v varchar(600), drop key v, add key v (v); Warnings: Warning 1071 Specified key was too long; max key length is 255 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( Loading @@ -1756,7 +1752,7 @@ t1 CREATE TABLE `t1` ( `t` text, KEY `c` (`c`), KEY `t` (`t`(10)), KEY `v` (`v`(255)) KEY `v` (`v`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 select v,count(*) from t1 group by v limit 10; v count(*) Loading Loading @@ -1874,7 +1870,7 @@ a b drop table t1; create table t1 (v varchar(65530), key(v)); Warnings: Warning 1071 Specified key was too long; max key length is 255 bytes Warning 1071 Specified key was too long; max key length is 1024 bytes drop table if exists t1; create table t1 (v varchar(65536)); Warnings: Loading
mysql-test/r/update.result +8 −0 Original line number Diff line number Diff line Loading @@ -337,3 +337,11 @@ a b 22 3 23 3 drop table t1; create table t1 (f1 date not null); insert into t1 values('2000-01-01'),('0000-00-00'); update t1 set f1='2002-02-02' where f1 is null; select * from t1; f1 2000-01-01 2002-02-02 drop table t1;