From 944915cabe8712780e558bc9c41bdb12e5f1a5a7 Mon Sep 17 00:00:00 2001 From: Leonard Zhou Date: Thu, 26 Mar 2009 15:38:17 +0800 Subject: BUG#35515 Aliases of variables in binary log are ignored with NAME_CONST. When add an aliase name after NAME_CONST, the aliase name will be overwrite. NAME_CONST will re-set the field's name only if there isn't an aliase in the function fix-fields(). If there is an aliase, NAME_CONST doesn't re-set the field's name and keeps the old name. mysql-test/r/func_misc.result: Test result. mysql-test/r/rpl_name_const.result: Test case. mysql-test/t/func_misc.test: Add NAME_CONST test. mysql-test/t/rpl_name_const.test: Test result. sql/item.cc: Re-set field's name if the name is autogenerated, that mean without aliase. --- mysql-test/t/func_misc.test | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mysql-test/t/func_misc.test') diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index c8075c42fc7..01c508c9b58 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -445,5 +445,10 @@ SELECT * FROM t1 WHERE a = NAME_CONST('reportDate', _binary'2009-01-09' COLLATE 'binary'); DROP TABLE t1; +# +# Bug#35515: Aliases of variables in binary log are ignored with NAME_CONST +# +select NAME_CONST('_id',1234) as id; + --echo End of 5.0 tests -- cgit v1.2.1