From: Date: February 18 2005 9:21pm Subject: bk commit into 4.1 tree (jimw:1.2184) List-Archive: http://lists.mysql.com/internals/22168 Message-Id: <20050218202119.91EF3A854F@rama.trainedmonkey.com> Below is the list of changes that have just been committed into a local 4.1 repository of jimw. When jimw does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://www.mysql.com/doc/I/n/Installing_source_tree.html ChangeSet 1.2184 05/02/18 12:21:16 jimw@stripped +1 -0 Fix error reporting for 'OPTIMIZE TABLE' on InnoDB tables. (Bug #8135) sql/sql_table.cc 1.275 05/02/18 12:18:53 jimw@stripped +25 -0 Pass through errors from InnoDB in 'OPTIMIZE TABLE' # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jimw # Host: rama.(none) # Root: /home/jimw/my/mysql-4.1-8135 --- 1.274/sql/sql_table.cc 2005-02-02 10:27:58 -08:00 +++ 1.275/sql/sql_table.cc 2005-02-18 12:18:53 -08:00 @@ -2046,6 +2046,31 @@ ((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)) + goto no_special_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); + if (protocol->write()) + sql_print_error("Failed on my_net_write, " + "writing to stderr instead: %s\n", + err_msg); + /* 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); + } + } +no_special_error: result_code= result_code ? HA_ADMIN_FAILED : HA_ADMIN_OK; table->next= save_next; goto send_result_message;