2718 Konstantin Osipov 2008-10-02
A fix for Bug#37550 SHOW PROCESSLIST displays "copy to tmp table"
even this does not happen.
Only set thd->proc_info if we're about to copy data in ALTER.
modified:
sql/sql_table.cc
2717 Dmitry Lenev 2008-10-01
Fix for bug#37961 "'Trying to destroy unitialized mutex' when
--datadir does not exist".
Attempt to start server with non-existing data directory led to
destroying of uninitialized Backup_restore_ctx::run_lock mutex
and assertion failure. The problem was that unireg_abort()
function, which is called in case of error during server
start-up and which assumes that it can be called even for
partially initialized server, has called backup_shutdown()
function which assumed that backup_init() was successfully
performed prior to its call.
This patch solves problem by ensuring that backup_shutdown()
can be safely called without prior call to backup_init() and
thus satisfying assumption made by unireg_abort().
Note that similar problem with LOCK_mdl has been already
solved by Monty's patch from 2008-08-13 in similar fashion.
No test case is provided since such situation can't be easily
covered by our test suite.
modified:
sql/backup/backup_kernel.h
sql/backup/kernel.cc
=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc 2008-09-04 20:00:04 +0000
+++ b/sql/sql_table.cc 2008-10-02 14:16:01 +0000
@@ -6983,7 +6983,6 @@ view_err:
/* Copy the data if necessary. */
thd->count_cuted_fields= CHECK_FIELD_WARN; // calc cuted fields
thd->cuted_fields=0L;
- thd_proc_info(thd, "copy to tmp table");
copied=deleted=0;
/*
We do not copy data for MERGE tables. Only the children have data.
@@ -6994,6 +6993,7 @@ view_err:
/* We don't want update TIMESTAMP fields during ALTER TABLE. */
new_table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
new_table->next_number_field=new_table->found_next_number_field;
+ thd_proc_info(thd, "copy to tmp table");
error= copy_data_between_tables(table, new_table,
alter_info->create_list, ignore,
order_num, order, &copied, &deleted,
| Thread |
|---|
| • bzr push into mysql-6.0 branch (kostja:2717 to 2718) Bug#37550 | Konstantin Osipov | 2 Oct |