1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

BUG#5390 - problems with merge tables

Additional fix for INSERT DELAYED with subselect.
Originally detected in 5.1, but 5.0 could also be affected.
The user thread creates a dummy table object,
which is not included in the lock. The 'real' table is
opened and locked by the 'delayed' system thread.
The dummy object is now marked as not locked and this is
tested in mysql_lock_have_duplicate().


sql/lock.cc:
  BUG#5390 - problems with merge tables
  Additional fix for INSERT DELAYED with subselect.
  The user thread creates a dummy table object,
  which is not included in the lock.
  Changed to safer asserts.
sql/sql_insert.cc:
  BUG#5390 - problems with merge tables
  Marked the dummy table object as not being
  included in the lock.
This commit is contained in:
unknown
2006-04-05 14:39:20 +02:00
parent 6fa5591544
commit 23549493aa
2 changed files with 13 additions and 5 deletions

View File

@ -1536,7 +1536,10 @@ TABLE *delayed_insert::get_local_table(THD* client_thd)
/* Adjust in_use for pointing to client thread */
copy->in_use= client_thd;
/* Adjust lock_count. This table object is not part of a lock. */
copy->lock_count= 0;
return copy;
/* Got fatal error */