MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:November 19 2009 4:44pm
Subject:bzr commit into mysql-6.0-backup branch (charles.bell:2891) Bug#47804
View as plain text  
#At file:///D:/source/bzr/mysql-6.0-review/ based on revid:rafal.somla@stripped

 2891 Chuck Bell	2009-11-19
      BUG#47804 : 
      
      This patch corrects an error found in pushbuild where the
      collation changed the order of the events in SHOW EVENTS.
      
      Patch changed to use LOWER() along with original collation
      option in the SQL commands.
     @ sql/si_objects.cc
        Use LOWER() instead of utf8_general_ci which changed order
        of subsequent SHOW commands.

    modified:
      sql/si_objects.cc
=== modified file 'sql/si_objects.cc'
--- a/sql/si_objects.cc	2009-11-18 15:27:51 +0000
+++ b/sql/si_objects.cc	2009-11-19 16:44:30 +0000
@@ -2750,10 +2750,11 @@ Obj_iterator *get_db_stored_procedures(T
     We need to use case insensitive compare when LCTN = 2 and on Windows. 
   */
   if ((lower_case_table_names == 2) && IF_WIN(1,0))
-    s_stream << "WHERE routine_schema COLLATE utf8_general_ci = '" << db_name;
+    s_stream << "WHERE LOWER(routine_schema) "
+      "COLLATE utf8_bin = LOWER('" << db_name << "') ";
   else
-    s_stream << "WHERE routine_schema COLLATE utf8_bin = '" << db_name;
-  s_stream << "' AND routine_type = 'PROCEDURE'";
+    s_stream << "WHERE routine_schema COLLATE utf8_bin = '" << db_name << "' ";
+  s_stream << "AND routine_type = 'PROCEDURE'";
 
   return create_row_set_iterator<Db_stored_proc_iterator>(thd, s_stream.lex_string());
 }
@@ -2770,10 +2771,11 @@ Obj_iterator *get_db_stored_functions(TH
     We need to use case insensitive compare when LCTN = 2 and on Windows. 
   */
   if ((lower_case_table_names == 2) && IF_WIN(1,0))
-    s_stream << "WHERE routine_schema COLLATE utf8_general_ci = '" << db_name;
+    s_stream << "WHERE LOWER(routine_schema) "
+      "COLLATE utf8_bin = LOWER('" << db_name << "') ";
   else
-    s_stream << "WHERE routine_schema COLLATE utf8_bin = '" << db_name;
-  s_stream << "' AND routine_type = 'FUNCTION'";
+    s_stream << "WHERE routine_schema COLLATE utf8_bin = '" << db_name << "' ";
+  s_stream << "AND routine_type = 'FUNCTION'";
 
   return create_row_set_iterator<Db_stored_func_iterator>(thd, s_stream.lex_string());
 }
@@ -2791,9 +2793,10 @@ Obj_iterator *get_db_events(THD *thd, co
     We need to use case insensitive compare when LCTN = 2 and on Windows. 
   */
   if ((lower_case_table_names == 2) && IF_WIN(1,0))
-    s_stream << "WHERE event_schema COLLATE utf8_general_ci = '" << db_name << "'";
+    s_stream << "WHERE LOWER(event_schema) "
+      "COLLATE utf8_bin = LOWER('" << db_name << "')";
   else
-    s_stream << "WHERE event_schema COLLATE utf8_bin = '" << db_name <<"'";
+    s_stream << "WHERE event_schema COLLATE utf8_bin = '" << db_name << "'";
 
   return create_row_set_iterator<Db_event_iterator>(thd, s_stream.lex_string());
 #else


Attachment: [text/bzr-bundle] bzr/charles.bell@sun.com-20091119164430-hvqwj1kdrgidi7fg.bundle
Thread
bzr commit into mysql-6.0-backup branch (charles.bell:2891) Bug#47804Chuck Bell19 Nov