summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-06-04 19:56:06 -0700
committerIgor Babaev <igor@askmonty.org>2011-06-04 19:56:06 -0700
commitf03a3ee54fb8b5aeeba590677f48b54a57ab45cf (patch)
treeafb1235c5417019a563b1c1d64443f3b890d05df /sql/sql_table.cc
parentf0f2ec3086000a22e83ce9ca33d59a3347784e0c (diff)
parent35c35858f859f23c23a414cdb21fdfe39d5de11c (diff)
downloadmariadb-git-f03a3ee54fb8b5aeeba590677f48b54a57ab45cf.tar.gz
Merged the code of mwl 106 into the latest 5.3 with mwl 90 pushed.
Resolved all conflicts and failures.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index d9d36c260fd..685b468a868 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -4729,8 +4729,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;
@@ -4828,7 +4833,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)