diff options
author | gluh@gluh.mysql.r18.ru <> | 2004-11-26 18:26:52 +0300 |
---|---|---|
committer | gluh@gluh.mysql.r18.ru <> | 2004-11-26 18:26:52 +0300 |
commit | a67b4a5b1c9f14841854803c541508c898af6460 (patch) | |
tree | 1ef8ec8aa9c042083532f7c372a5d5692beaad1f /sql/sql_show.cc | |
parent | b0cace4ed3ca2028cbdefa2beca80f7716e4f15e (diff) | |
download | mariadb-git-a67b4a5b1c9f14841854803c541508c898af6460.tar.gz |
portability fix(for powermac)
Fix for bug#6756: Crash if SHOW INDEX
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 55c38ff37c9..19b5562cb8b 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2628,7 +2628,7 @@ static int get_schema_stat_record(THD *thd, struct st_table_list *tables, { CHARSET_INFO *cs= system_charset_info; DBUG_ENTER("get_schema_stat_record"); - if (!res) + if (!res && !tables->view) { TABLE *show_table= tables->table; KEY *key_info=show_table->key_info; @@ -2737,7 +2737,7 @@ static int get_schema_constarints_record(THD *thd, struct st_table_list *tables, { CHARSET_INFO *cs= system_charset_info; DBUG_ENTER("get_schema_constarints_record"); - if (!res) + if (!res && !tables->view) { List<FOREIGN_KEY_INFO> f_key_list; TABLE *show_table= tables->table; @@ -2792,7 +2792,7 @@ static int get_schema_key_column_usage_record(THD *thd, { DBUG_ENTER("get_schema_key_column_usage_record"); CHARSET_INFO *cs= system_charset_info; - if (!res) + if (!res && !tables->view) { List<FOREIGN_KEY_INFO> f_key_list; TABLE *show_table= tables->table; @@ -2960,7 +2960,7 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) field_list, (ORDER*) 0, 0, 0, (select_lex->options | thd->options | TMP_TABLE_ALL_COLUMNS), - HA_POS_ERROR, table_list->real_name))) + HA_POS_ERROR, table_list->alias))) DBUG_RETURN(0); DBUG_RETURN(table); } @@ -3136,6 +3136,9 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list) } table->tmp_table= TMP_TABLE; table->grant.privilege= SELECT_ACL; + table->alias_name_used= my_strcasecmp(table_alias_charset, + table_list->real_name, + table_list->alias); table_list->schema_table_name= table_list->real_name; table_list->real_name= table->real_name; table_list->table= table; |