Below is the list of changes that have just been committed into a local
5.0 repository of svoj. When svoj does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-02-19 18:16:17+04:00, svoj@stripped +3 -0
BUG#34289 - Incorrect NAME_CONST substitution in stored procedures
breaks replication
NAME_CONST() didn't replicate constant character set and collation
correctly.
With this fix NAME_CONST() inherits collation from the value argument.
mysql-test/r/func_misc.result@stripped, 2008-02-19 18:16:15+04:00, svoj@stripped +3 -0
A test case for BUG#34289.
mysql-test/t/func_misc.test@stripped, 2008-02-19 18:16:15+04:00, svoj@stripped +6 -0
A test case for BUG#34289.
sql/item.cc@stripped, 2008-02-19 18:16:15+04:00, svoj@stripped +1 -0
Inherit collation from value argument.
diff -Nrup a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
--- a/mysql-test/r/func_misc.result 2008-01-23 19:01:27 +04:00
+++ b/mysql-test/r/func_misc.result 2008-02-19 18:16:15 +04:00
@@ -225,4 +225,7 @@ select min(a) from t1 group by inet_ntoa
min(a)
-2
drop table t1;
+SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs;
+NAME_CONST('var', 'value') COLLATE latin1_general_cs
+value
End of 5.0 tests
diff -Nrup a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
--- a/mysql-test/t/func_misc.test 2008-01-23 19:01:27 +04:00
+++ b/mysql-test/t/func_misc.test 2008-02-19 18:16:15 +04:00
@@ -237,5 +237,11 @@ insert into t1 values (-1), (-2);
select min(a) from t1 group by inet_ntoa(a);
drop table t1;
+#
+# BUG#34289 - Incorrect NAME_CONST substitution in stored procedures breaks
+# replication
+#
+SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs;
+
--echo End of 5.0 tests
diff -Nrup a/sql/item.cc b/sql/item.cc
--- a/sql/item.cc 2008-02-08 14:55:54 +04:00
+++ b/sql/item.cc 2008-02-19 18:16:15 +04:00
@@ -1240,6 +1240,7 @@ bool Item_name_const::fix_fields(THD *th
return TRUE;
}
set_name(item_name->ptr(), (uint) item_name->length(), system_charset_info);
+ collation.set(value_item->collation.collation, DERIVATION_IMPLICIT);
max_length= value_item->max_length;
decimals= value_item->decimals;
fixed= 1;
Thread |
---|
• bk commit into 5.0 tree (svoj:1.2575) BUG#34289 | Sergey Vojtovich | 19 Feb |