mariadb/mysql-test/lib/v1
Jon Olav Hauglid 1b5f2b9030 Backport of revno: 2617.68.18
Bug #42147 Concurrent DML and LOCK TABLE ... READ for InnoDB 
           table cause warnings in errlog

Concurrent execution of LOCK TABLES ... READ statement and DML statements 
affecting the same InnoDB table on debug builds of MySQL server might lead 
to "Found lock of type 6 that is write and read locked" warnings appearing 
in error log.

The problem is that the table-level locking code allows a thread to acquire
TL_READ_NO_INSERT lock on a table even if there is another thread which holds 
TL_WRITE_ALLOW_WRITE lock on the same table. At the same time, the locking
code assumes that that such locks are incompatible (for example, see check_locks()).

This doesn't lead to any problems other than warnings in error log for
debug builds of server since for InnoDB tables TL_READ_NO_INSERT type of
lock is only used for LOCK TABLES and for this statement InnoDB also
performs its own table-level locking.

Unfortunately, the table lock compatibility matrix cannot be updated to disallow
TL_READ_NO_INSERT when another thread holds TL_WRITE_ALLOW_WRITE without 
causing starvation of LOCK TABLE READ in InnoDB under high write load. 
This patch therefore contains no code changes.

The issue will be fixed later when LOCK TABLE READ has been updated
to not use table locks. This bug will therefore be marked as 
"To be fixed later".

Code comment in thr_lock.c expanded to clarify the issue and a 
test case based on the bug description added to innodb_mysql_lock.test.
Note that a global suppression rule has been added to both MTR v1 and v2
for the "Found lock of type 6 that is write and read locked" warning.
These suppression rules must be removed once this bug is properly fixed.
2009-12-09 16:13:00 +01:00
..
My WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
incompatible.tests Bug #45698 MTR_VERSION=1 ./mtr --force does not work 2009-07-16 14:05:46 +02:00
mtr_cases.pl Bug #45698 MTR_VERSION=1 ./mtr --force does not work 2009-07-31 11:22:57 +02:00
mtr_gcov.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mtr_gprof.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mtr_im.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mtr_io.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mtr_match.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mtr_misc.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mtr_process.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mtr_report.pl Backport of revno: 2617.68.18 2009-12-09 16:13:00 +01:00
mtr_stress.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mtr_timer.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mtr_unique.pl WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
mysql-test-run.pl BUG#48048: Deprecated constructs need removal in Betony 2009-11-16 12:17:19 +00:00
ndb_config_1_node.ini WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00
ndb_config_2_node.ini WL#4189 Add full backward compatibility to mysql-test-run.pl 2008-11-14 09:45:32 +01:00