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())
This commit is contained in:
parent
1027b4cfc9
commit
2045c54f59
@ -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.
|
Here is where we get into the guts of a row level lock.
|
||||||
If TL_UNLOCK is set
|
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
|
TABLESPACE, then allow multiple writers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((lock_type >= TL_WRITE_CONCURRENT_INSERT &&
|
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))
|
&& !thd_tablespace_op(thd))
|
||||||
lock_type = TL_WRITE_ALLOW_WRITE;
|
lock_type = TL_WRITE_ALLOW_WRITE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user