mariadb/mysql-test/lib
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 Auto-merge from mysql-trunk. 2009-11-12 15:10:26 +03:00
t WL#751 Error message construction, backport 2009-10-15 17:23:43 +05:00
v1 Backport of revno: 2617.68.18 2009-12-09 16:13:00 +01:00
mtr_cases.pm Clean-up after applying innodb-zip-ss6129 snapshot: 2009-11-03 18:41:04 +04:00
mtr_gcov.pl Bug#40446 - mysql-test-run --gcov is broken 2009-02-27 12:20:53 +01:00
mtr_gprof.pl my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mtr_io.pl Bug#39861: 2008-11-14 23:35:32 +03:00
mtr_match.pm Check warnings in servers error log as part of test case 2008-04-08 16:51:26 +02:00
mtr_misc.pl Use My::Platform 2008-02-20 14:55:30 +01:00
mtr_process.pl Fix regression on pushbuild 1. The cygwin perl is ancient there, and Net::Ping does not have port_number method (port_number was introduced around 2007). The fix is to check if port_number is present. Otherwise, fallback to the slow connect(). 2009-05-08 01:10:53 +02:00
mtr_report.pm Bug #48130 Expected failures should not count towards max-test-fail 2009-10-17 18:34:56 +02:00
mtr_stress.pl WL#4189 2007-12-12 18:19:24 +01:00
mtr_unique.pm Bug #42804 --parallel option does not work for MTR under ActiveState 2009-04-23 13:35:02 +02:00