summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-06-01 12:59:11 -0700
committerunknown <jimw@mysql.com>2005-06-01 12:59:11 -0700
commitdd1168a34fe2be0b9062f3d735b92e0e40d4db3c (patch)
tree9c9884405b00ad7c29aba4ab9a2284d9db220902 /sql/sql_table.cc
parent853a55ad215db4f44bee4281de57054bf2f7da17 (diff)
parent75e8f8372e4ab63994abaa41d93ed85c4cfeb9d4 (diff)
downloadmariadb-git-dd1168a34fe2be0b9062f3d735b92e0e40d4db3c.tar.gz
Merge mysql.com:/home/jimw/my/mysql-4.1-8135
into mysql.com:/home/jimw/my/mysql-4.1-clean sql/sql_table.cc: Auto merged
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 489b730eb83..92bff05bf1f 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2052,6 +2052,28 @@ send_result_message:
((result_code= table->table->file->analyze(thd, check_opt)) > 0))
result_code= 0; // analyze went ok
}
+ if (result_code) // either mysql_recreate_table or analyze failed
+ {
+ const char *err_msg;
+ if ((err_msg= thd->net.last_error))
+ {
+ if (!thd->vio_ok())
+ {
+ sql_print_error(err_msg);
+ }
+ else
+ {
+ /* Hijack the row already in-progress. */
+ protocol->store("error", 5, system_charset_info);
+ protocol->store(err_msg, system_charset_info);
+ (void)protocol->write();
+ /* Start off another row for HA_ADMIN_FAILED */
+ protocol->prepare_for_resend();
+ protocol->store(table_name, system_charset_info);
+ protocol->store(operator_name, system_charset_info);
+ }
+ }
+ }
result_code= result_code ? HA_ADMIN_FAILED : HA_ADMIN_OK;
table->next= save_next;
goto send_result_message;