diff options
author | unknown <tnurnberg@sin.intern.azundris.com> | 2007-03-23 20:43:40 +0100 |
---|---|---|
committer | unknown <tnurnberg@sin.intern.azundris.com> | 2007-03-23 20:43:40 +0100 |
commit | 19ccee1c7251a3676cc4b9bc8f7ae3e6efc03c83 (patch) | |
tree | aa9aeee2fc660e74165dafbd83fb39985afb204f /sql/sql_base.cc | |
parent | 2ee36387cf638d7dbc7f623c03d688df2e3fde25 (diff) | |
parent | 9a58f9ab0bb8edb8b0d3e856927b3b507e35e9d3 (diff) | |
download | mariadb-git-19ccee1c7251a3676cc4b9bc8f7ae3e6efc03c83.tar.gz |
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into sin.intern.azundris.com:/home/tnurnberg/26817/51-26817
client/mysqldump.c:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index e0b60b875d5..5fd48f9d356 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4490,14 +4490,35 @@ find_field_in_tables(THD *thd, Item_ident *item, { Field *cur_field= find_field_in_table_ref(thd, cur_table, name, length, item->name, db, table_name, ref, - check_privileges, allow_rowid, + check_privileges, + allow_rowid, &(item->cached_field_index), register_tree_change, &actual_table); if (cur_field) { if (cur_field == WRONG_GRANT) - return (Field*) 0; + { + if (thd->lex->sql_command != SQLCOM_SHOW_FIELDS) + return (Field*) 0; + + thd->clear_error(); + cur_field= find_field_in_table_ref(thd, cur_table, name, length, + item->name, db, table_name, ref, + false, + allow_rowid, + &(item->cached_field_index), + register_tree_change, + &actual_table); + if (cur_field) + { + Field *nf=new Field_null(NULL,0,Field::NONE, + cur_field->field_name, + cur_field->table, + &my_charset_bin); + cur_field= nf; + } + } /* Store the original table of the field, which may be different from @@ -4520,7 +4541,7 @@ find_field_in_tables(THD *thd, Item_ident *item, report_error == IGNORE_EXCEPT_NON_UNIQUE) my_error(ER_NON_UNIQ_ERROR, MYF(0), table_name ? item->full_name() : name, thd->where); - return (Field*) 0; + return (Field*) 0; } found= cur_field; } |