Commit 19ba226d authored by Michael Widenius's avatar Michael Widenius

Fixed bug in Archive with insert delayed


storage/archive/ha_archive.cc:
  Fixed bug that caused archive.test to fail with: Warning: Found locks from different threads for lock 't2' in 'write' at 'start of release lock'...
  The reason was that the TL_WRITE_DELAYED lock was changed to TL_WRITE_ALLOW_WRITE which conflicted with how the lock was used in sql_insert.cc (in particular with thr_upgrade_write_delay_lock())
parent 2f0d7240
......@@ -1433,12 +1433,13 @@ THR_LOCK_DATA **ha_archive::store_lock(THD *thd,
/*
Here is where we get into the guts of a row level lock.
If TL_UNLOCK is set
If we are not doing a LOCK TABLE or DISCARD/IMPORT
If we are not doing a LOCK TABLE, DELAYED LOCK or DISCARD/IMPORT
TABLESPACE, then allow multiple writers
*/
if ((lock_type >= TL_WRITE_CONCURRENT_INSERT &&
lock_type <= TL_WRITE) && !thd_in_lock_tables(thd)
lock_type <= TL_WRITE) && delayed_insert == FALSE &&
!thd_in_lock_tables(thd)
&& !thd_tablespace_op(thd))
lock_type = TL_WRITE_ALLOW_WRITE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment