List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:July 4 2008 8:58am
Subject:commit into mysql-6.0 branch (bar:2673) Bug#37554
View as plain text  
#At file:///home/bar/mysql-bzr/mysql-6.0.b37554v2/

 2673 Alexander Barkov	2008-07-04
      Bug#37554 Use of character set and collate as 'filename' shows unusual behaviour.
      Problem: internal collation "filename" was shown in
      I_S.COLLATION_CHARACTER_SET_APPLICABILITY table.
      Fix: don't display internal collations.
            
      mysql-test/r/information_schema.result
      mysql-test/t/information_schema.test
        Adding tests
            
      sql/sql_show.cc
         Don't display special purpose collations (e.g. "filename")
         in COLLATION_CHARACTER_SET_APPLICABILITY
modified:
  mysql-test/r/information_schema.result
  mysql-test/t/information_schema.test
  sql/sql_show.cc

=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result	2008-06-10 22:27:52 +0000
+++ b/mysql-test/r/information_schema.result	2008-07-04 08:58:02 +0000
@@ -268,6 +268,19 @@
 latin1_general_ci	latin1
 latin1_general_cs	latin1
 latin1_spanish_ci	latin1
+select collation_name from information_schema.collations
+where collation_name='filename';
+collation_name
+select collation_name from information_schema.collation_character_set_applicability
+where collation_name='filename';
+collation_name
+select character_set_name from information_schema.character_sets
+where character_set_name='filename';
+character_set_name
+show collation like 'filename';
+Collation	Charset	Id	Default	Compiled	Sortlen
+show character set like 'filename';
+Charset	Description	Default collation	Maxlen
 drop procedure if exists sel2;
 drop function if exists sub1;
 drop function if exists sub2;

=== modified file 'mysql-test/t/information_schema.test'
--- a/mysql-test/t/information_schema.test	2008-06-10 22:27:52 +0000
+++ b/mysql-test/t/information_schema.test	2008-07-04 08:58:02 +0000
@@ -117,6 +117,20 @@
 # Test for information_schema.ROUTINES &
 #
 
+#
+# Bug#37554
+# Make sure that special purpose character set  and collation "filename"
+# is not displayed in meta-data queries.
+#
+select collation_name from information_schema.collations
+where collation_name='filename';
+select collation_name from information_schema.collation_character_set_applicability
+where collation_name='filename';
+select character_set_name from information_schema.character_sets
+where character_set_name='filename';
+show collation like 'filename';
+show character set like 'filename';
+
 --disable_warnings
 drop procedure if exists sel2;
 drop function if exists sub1;

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2008-06-10 22:27:52 +0000
+++ b/sql/sql_show.cc	2008-07-04 08:58:02 +0000
@@ -4066,6 +4066,7 @@
     {
       CHARSET_INFO *tmp_cl= cl[0];
       if (!tmp_cl || !(tmp_cl->state & MY_CS_AVAILABLE) || 
+          (tmp_cl->state & MY_CS_HIDDEN) ||
           !my_charset_same(tmp_cs,tmp_cl))
 	continue;
       restore_record(table, s->default_values);

Thread
commit into mysql-6.0 branch (bar:2673) Bug#37554Alexander Barkov4 Jul