summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2005-01-27 13:16:51 +0300
committerunknown <gluh@gluh.mysql.r18.ru>2005-01-27 13:16:51 +0300
commit79414bb3d0f17047c38e4dac4344364a5f9c938a (patch)
tree053682222a65b2b2c48133ebc318cd91f763c3e3 /sql/sql_show.cc
parent70e47994c5666be59001b4fe4179778f4e4c7d55 (diff)
downloadmariadb-git-79414bb3d0f17047c38e4dac4344364a5f9c938a.tar.gz
A fix: information_schema test fails on Mac OSX
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index b909e9cec1b..defa99f3a36 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1802,7 +1802,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
res= open_and_lock_tables(thd, show_table_list);
if (schema_table->process_table(thd, show_table_list,
table, res, show_table_list->db,
- show_table_list->table_name))
+ show_table_list->alias))
{
DBUG_RETURN(1);
}
@@ -1911,7 +1911,8 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
show_table_list->lock_type= lock_type;
res= open_and_lock_tables(thd, show_table_list);
if (schema_table->process_table(thd, show_table_list, table,
- res, base_name, file_name))
+ res, base_name,
+ show_table_list->alias))
{
DBUG_RETURN(1);
}
@@ -3183,8 +3184,16 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
}
table->s->tmp_table= TMP_TABLE;
table->grant.privilege= SELECT_ACL;
- table->alias_name_used= 0;
- table_list->schema_table_name= table_list->table_name;
+ /*
+ This test is necessary to make
+ case insensitive file systems +
+ upper case table names(information schema tables) +
+ views
+ working correctly
+ */
+ table->alias_name_used= my_strcasecmp(table_alias_charset,
+ table_list->schema_table_name,
+ table_list->alias);
table_list->table_name= (char*) table->s->table_name;
table_list->table= table;
table->next= thd->derived_tables;