From: Date: May 10 2005 5:13pm Subject: bk commit into 5.0 tree (gluh:1.1930) BUG#10018 List-Archive: http://lists.mysql.com/internals/24770 X-Bug: 10018 Message-Id: <200505101513.j4AFDGg9023329@localhost.localdomain> Below is the list of changes that have just been committed into a local 5.0 repository of gluh. When gluh 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 1.1930 05/05/10 15:13:11 gluh@stripped +1 -0 Bug#10018: use INFORMATION_SCHEMA works, but show tables in it returns error additional fix after review sql/sql_show.cc 1.240 05/05/10 15:13:05 gluh@stripped +15 -3 Bug#10018: use INFORMATION_SCHEMA works, but show tables in it returns error additional fix after review # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: gluh # Host: mobby.(none) # Root: /home/gluh/MySQL/Devel/mysql-5.0 --- 1.239/sql/sql_show.cc 2005-05-06 19:06:05 +00:00 +++ 1.240/sql/sql_show.cc 2005-05-10 15:13:05 +00:00 @@ -1805,6 +1805,11 @@ get_index_field_values(lex, idx_field_vals); if (is_wild_value) { + /* + This part of code is only for SHOW DATABASES command. + idx_field_vals->db_value can be 0 when we don't use + LIKE clause (see also get_index_field_values() function) + */ if (!idx_field_vals->db_value || !wild_case_compare(system_charset_info, information_schema_name.str, @@ -1818,11 +1823,14 @@ idx_field_vals->db_value, 1); } + /* + This part of code is for SHOW TABLES, SHOW TABLE STATUS commands. + idx_field_vals->db_value can't be 0 + (see get_index_field_values() function) + */ if (lex->orig_sql_command != SQLCOM_END) { - if (!idx_field_vals->db_value || - !my_strcasecmp(system_charset_info, - information_schema_name.str, + if (!my_strcasecmp(system_charset_info, information_schema_name.str, idx_field_vals->db_value)) { *with_i_schema= 1; @@ -1831,6 +1839,10 @@ return files->push_back(thd->strdup(idx_field_vals->db_value)); } + /* + Create list of existing databases. It is used in case + of select from information schema table + */ if (files->push_back(thd->strdup(information_schema_name.str))) return 1; *with_i_schema= 1;