From: Jorgen Loland Date: November 4 2010 8:38am Subject: bzr push into mysql-trunk-bugfixing branch (jorgen.loland:3323 to 3324) Bug#57882 List-Archive: http://lists.mysql.com/commits/122799 X-Bug: 57882 Message-Id: <20101104083831.F0A3518DF@atum21.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3324 Jorgen Loland 2010-11-04 [merge] Merge BUG#57882 from 5.5-bf -> trunk modified: mysql-test/r/errors.result mysql-test/t/errors.test sql/item.cc 3323 He Zhenxing 2010-11-04 [merge] Auto merge from 5.5-bugteam modified: sql/mysqld.cc sql/rpl_handler.cc === modified file 'mysql-test/r/errors.result' --- a/mysql-test/r/errors.result 2010-05-27 16:01:43 +0000 +++ b/mysql-test/r/errors.result 2010-11-04 08:36:04 +0000 @@ -134,3 +134,15 @@ INSERT INTO t1 VALUES ('abc\0\0'); INSERT INTO t1 VALUES ('abc\0\0'); ERROR 23000: Duplicate entry 'abc\x00\x00' for key 'PRIMARY' DROP TABLE t1; +# +# Bug#57882: Item_func_conv_charset::val_str(String*): +# Assertion `fixed == 1' failed +# +SELECT (CONVERT('0' USING latin1) IN (CHAR(COT('v') USING utf8),'')); +ERROR 22003: DOUBLE value is out of range in 'cot('v')' +SET NAMES utf8 COLLATE utf8_latvian_ci ; +SELECT UPDATEXML(-73 * -2465717823867977728,@@global.slave_net_timeout,null); +ERROR 22003: BIGINT value is out of range in '(-(73) * -(2465717823867977728))' +# +# End Bug#57882 +# === modified file 'mysql-test/t/errors.test' --- a/mysql-test/t/errors.test 2010-05-27 16:01:43 +0000 +++ b/mysql-test/t/errors.test 2010-11-04 08:36:04 +0000 @@ -155,3 +155,19 @@ INSERT INTO t1 VALUES ('abc\0\0'); --error ER_DUP_ENTRY INSERT INTO t1 VALUES ('abc\0\0'); DROP TABLE t1; + +--echo # +--echo # Bug#57882: Item_func_conv_charset::val_str(String*): +--echo # Assertion `fixed == 1' failed +--echo # + +--error ER_DATA_OUT_OF_RANGE +SELECT (CONVERT('0' USING latin1) IN (CHAR(COT('v') USING utf8),'')); + +SET NAMES utf8 COLLATE utf8_latvian_ci ; +--error ER_DATA_OUT_OF_RANGE +SELECT UPDATEXML(-73 * -2465717823867977728,@@global.slave_net_timeout,null); + +--echo # +--echo # End Bug#57882 +--echo # === modified file 'sql/item.cc' --- a/sql/item.cc 2010-10-08 14:15:18 +0000 +++ b/sql/item.cc 2010-11-04 08:37:17 +0000 @@ -1853,11 +1853,12 @@ bool agg_item_set_converter(DTCollation *arg= conv; else thd->change_item_tree(arg, conv); - /* - We do not check conv->fixed, because Item_func_conv_charset which can - be return by safe_charset_converter can't be fixed at creation - */ - conv->fix_fields(thd, arg); + + if (conv->fix_fields(thd, arg)) + { + res= TRUE; + break; // we cannot return here, we need to restore "arena". + } } if (arena) thd->restore_active_arena(arena, &backup); No bundle (reason: useless for push emails).