Loading mysql-test/r/ctype_utf8.result +12 −0 Original line number Diff line number Diff line Loading @@ -849,3 +849,15 @@ utf8_bin 6109 utf8_bin 61 utf8_bin 6120 drop table t1; CREATE TABLE t1 ( user varchar(255) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES ('one'),('two'); SELECT CHARSET('a'); CHARSET('a') utf8 SELECT user, CONCAT('<', user, '>') AS c FROM t1; user c one <one> two <two> DROP TABLE t1; mysql-test/t/ctype_utf8.test +12 −0 Original line number Diff line number Diff line Loading @@ -681,3 +681,15 @@ SET collation_connection='utf8_general_ci'; -- source include/ctype_filesort.inc SET collation_connection='utf8_bin'; -- source include/ctype_filesort.inc # # Bug #7874 CONCAT() gives wrong results mixing # latin1 field and utf8 string literals # CREATE TABLE t1 ( user varchar(255) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES ('one'),('two'); SELECT CHARSET('a'); SELECT user, CONCAT('<', user, '>') AS c FROM t1; DROP TABLE t1; sql/item_strfunc.cc +2 −1 Original line number Diff line number Diff line Loading @@ -275,7 +275,8 @@ String *Item_func_concat::val_str(String *str) current_thd->variables.max_allowed_packet); goto null; } if (res->alloced_length() >= res->length()+res2->length()) if (!args[0]->const_item() && res->alloced_length() >= res->length()+res2->length()) { // Use old buffer res->append(*res2); } Loading Loading
mysql-test/r/ctype_utf8.result +12 −0 Original line number Diff line number Diff line Loading @@ -849,3 +849,15 @@ utf8_bin 6109 utf8_bin 61 utf8_bin 6120 drop table t1; CREATE TABLE t1 ( user varchar(255) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES ('one'),('two'); SELECT CHARSET('a'); CHARSET('a') utf8 SELECT user, CONCAT('<', user, '>') AS c FROM t1; user c one <one> two <two> DROP TABLE t1;
mysql-test/t/ctype_utf8.test +12 −0 Original line number Diff line number Diff line Loading @@ -681,3 +681,15 @@ SET collation_connection='utf8_general_ci'; -- source include/ctype_filesort.inc SET collation_connection='utf8_bin'; -- source include/ctype_filesort.inc # # Bug #7874 CONCAT() gives wrong results mixing # latin1 field and utf8 string literals # CREATE TABLE t1 ( user varchar(255) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES ('one'),('two'); SELECT CHARSET('a'); SELECT user, CONCAT('<', user, '>') AS c FROM t1; DROP TABLE t1;
sql/item_strfunc.cc +2 −1 Original line number Diff line number Diff line Loading @@ -275,7 +275,8 @@ String *Item_func_concat::val_str(String *str) current_thd->variables.max_allowed_packet); goto null; } if (res->alloced_length() >= res->length()+res2->length()) if (!args[0]->const_item() && res->alloced_length() >= res->length()+res2->length()) { // Use old buffer res->append(*res2); } Loading