diff options
author | Kristofer Pettersson <kpettersson@mysql.com> | 2008-09-11 13:23:12 +0200 |
---|---|---|
committer | Kristofer Pettersson <kpettersson@mysql.com> | 2008-09-11 13:23:12 +0200 |
commit | 1c7f03125ffc34cb2f5859a5bae67c92536e78a0 (patch) | |
tree | b6c1ff88a8ca9dff2e6316b81f87a69662f5936d /sql/sql_insert.cc | |
parent | 9daa56fd5ce3ccd33c32b5a505ac1d2b2c437460 (diff) | |
parent | a8b25524a261508b9919710e9e620e55875965e5 (diff) | |
download | mariadb-git-1c7f03125ffc34cb2f5859a5bae67c92536e78a0.tar.gz |
Auto merge.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 04a8db5edf0..ec8f85b43ab 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2532,8 +2532,13 @@ bool Delayed_insert::handle_inserts(void) thd_proc_info(&thd, "upgrading lock"); if (thr_upgrade_write_delay_lock(*thd.lock->locks)) { - /* This can only happen if thread is killed by shutdown */ - sql_print_error(ER(ER_DELAYED_CANT_CHANGE_LOCK),table->s->table_name.str); + /* + This can happen if thread is killed either by a shutdown + or if another thread is removing the current table definition + from the table cache. + */ + my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR), + table->s->table_name.str); goto err; } @@ -2688,9 +2693,10 @@ bool Delayed_insert::handle_inserts(void) query_cache_invalidate3(&thd, table, 1); if (thr_reschedule_write_lock(*thd.lock->locks)) { - /* This should never happen */ - sql_print_error(ER(ER_DELAYED_CANT_CHANGE_LOCK), - table->s->table_name.str); + /* This is not known to happen. */ + my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR), + table->s->table_name.str); + goto err; } if (!using_bin_log) table->file->extra(HA_EXTRA_WRITE_CACHE); |