List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:February 18 2011 7:43am
Subject:bzr push into mysql-trunk branch (alexander.barkov:3672 to 3673)
View as plain text  
 3673 Alexander Barkov	2011-02-18 [merge]
      Merging from 5.5.

    modified:
      mysql-test/r/ctype_cp1251.result
      mysql-test/t/ctype_cp1251.test
      sql/item_cmpfunc.cc
 3672 Marc Alff	2011-02-17
      Cleanup for the performance schema test scripts:
      - formatting of *.opt files
      - improved the robustness of the table aggregation tests,
        to prevent spurious failures.

    modified:
      mysql-test/suite/perfschema/include/table_aggregate_load.inc
      mysql-test/suite/perfschema/include/table_aggregate_setup.inc
      mysql-test/suite/sys_vars/t/pfs_events_waits_history_long_size_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_events_waits_history_size_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_cond_classes_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_cond_instances_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_file_classes_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_file_handles_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_file_instances_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_mutex_classes_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_mutex_instances_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_rwlock_classes_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_rwlock_instances_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_table_handles_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_table_instances_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_thread_classes_basic-master.opt
      mysql-test/suite/sys_vars/t/pfs_max_thread_instances_basic-master.opt
=== modified file 'mysql-test/r/ctype_cp1251.result'
--- a/mysql-test/r/ctype_cp1251.result	2011-02-17 11:58:08 +0000
+++ b/mysql-test/r/ctype_cp1251.result	2011-02-18 07:43:02 +0000
@@ -3242,5 +3242,20 @@ maketime(`a`,`a`,`a`)
 DROP TABLE t1;
 SET sql_mode=default;
 #
+# Bug#60101 COALESCE with cp1251 tables causes [Err] 1267 - Illegal mix of collations
+#
+CREATE TABLE t1 (test1 INT, test2 VARCHAR(255));
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `test1` int(11) DEFAULT NULL,
+  `test2` varchar(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT COALESCE(IF(test1=1, 1, NULL), test2) FROM t1;
+COALESCE(IF(test1=1, 1, NULL), test2)
+SELECT COALESCE(IF(test1=1, NULL, 1), test2) FROM t1;
+COALESCE(IF(test1=1, NULL, 1), test2)
+DROP TABLE t1;
+#
 # End of 5.5 tests
 #

=== modified file 'mysql-test/t/ctype_cp1251.test'
--- a/mysql-test/t/ctype_cp1251.test	2011-02-17 11:58:08 +0000
+++ b/mysql-test/t/ctype_cp1251.test	2011-02-18 07:43:02 +0000
@@ -86,5 +86,15 @@ set global LC_TIME_NAMES=convert((-83886
 --source include/ctype_numconv.inc
 
 --echo #
+--echo # Bug#60101 COALESCE with cp1251 tables causes [Err] 1267 - Illegal mix of collations
+--echo #
+CREATE TABLE t1 (test1 INT, test2 VARCHAR(255));
+SHOW CREATE TABLE t1;
+SELECT COALESCE(IF(test1=1, 1, NULL), test2) FROM t1;
+SELECT COALESCE(IF(test1=1, NULL, 1), test2) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
 --echo # End of 5.5 tests
 --echo #

=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc	2011-02-08 15:54:12 +0000
+++ b/sql/item_cmpfunc.cc	2011-02-18 07:43:02 +0000
@@ -2726,7 +2726,7 @@ Item_func_if::fix_length_and_dec()
   if (null1)
   {
     cached_result_type= arg2_type;
-    collation.set(args[2]->collation.collation);
+    collation.set(args[2]->collation);
     cached_field_type= args[2]->field_type();
     max_length= args[2]->max_length;
     return;
@@ -2735,7 +2735,7 @@ Item_func_if::fix_length_and_dec()
   if (null2)
   {
     cached_result_type= arg1_type;
-    collation.set(args[1]->collation.collation);
+    collation.set(args[1]->collation);
     cached_field_type= args[1]->field_type();
     max_length= args[1]->max_length;
     return;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (alexander.barkov:3672 to 3673) Alexander Barkov18 Feb