diff options
author | Igor Babaev <igor@askmonty.org> | 2011-05-20 12:47:39 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-05-20 12:47:39 -0700 |
commit | 89cf840cd9709c875bb6494398970624c85e4ab0 (patch) | |
tree | b6926318d94f0bcd733468587a4bed4101c81612 /sql/sql_table.cc | |
parent | be6d6e1b3eb0d243dfa9f1d0de108069df5774e4 (diff) | |
parent | d015b8fa0ad2bfb853da174c1c959374a24a5063 (diff) | |
download | mariadb-git-89cf840cd9709c875bb6494398970624c85e4ab0.tar.gz |
Merge
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index c857fb3de8c..4e96e9b843c 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4731,8 +4731,13 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, thd->no_warnings_for_error= no_warnings_for_error; if (view_operator_func == NULL) table->required_type=FRMTYPE_TABLE; - + if (lex->sql_command == SQLCOM_CHECK || + lex->sql_command == SQLCOM_REPAIR || + lex->sql_command == SQLCOM_ANALYZE || + lex->sql_command == SQLCOM_OPTIMIZE) + thd->prepare_derived_at_open= TRUE; open_and_lock_tables(thd, table); + thd->prepare_derived_at_open= FALSE; thd->no_warnings_for_error= 0; table->next_global= save_next_global; table->next_local= save_next_local; @@ -4830,7 +4835,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, else /* Default failure code is corrupt table */ result_code= HA_ADMIN_CORRUPT; - goto send_result; + goto send_result; } if (table->view) |