From: Date: May 24 2005 8:11pm Subject: bk commit into 4.1 tree (jimw:1.2291) BUG#8135 List-Archive: http://lists.mysql.com/internals/25229 X-Bug: 8135 Message-Id: <20050524181144.88FCEA86FF@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://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2291 05/05/24 11:11:40 jimw@stripped +1 -0 Fix error reporting for 'OPTIMIZE TABLE' on InnoDB tables. (Bug #8135) sql/sql_table.cc 1.282 05/05/24 11:11:37 jimw@stripped +22 -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.281/sql/sql_table.cc 2005-05-14 06:24:32 -07:00 +++ 1.282/sql/sql_table.cc 2005-05-24 11:11:37 -07:00 @@ -2052,6 +2052,28 @@ ((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;