mariadb/mysql-test/suite
Dmitry Lenev d076be2a32 Fix for bug #11762012 - "54553: INNODB ASSERTS IN
HA_INNOBASE::UPDATE_ROW, TEMPORARY TABLE, TABLE LOCK".

Attempt to update an InnoDB temporary table under LOCK TABLES
led to assertion failure in both debug and production builds
if this temporary table was explicitly locked for READ. The 
same scenario works fine for MyISAM temporary tables.

The assertion failure was caused by discrepancy between lock 
that was requested on the rows of temporary table at LOCK TABLES
time and by update operation. Since SQL-layer requested a 
read-lock at LOCK TABLES time InnoDB engine assumed that upcoming
statements which are going to be executed under LOCK TABLES will 
only read table and therefore should acquire only S-lock.
An update operation broken this assumption by requesting X-lock.

Possible approaches to fixing this problem are:

1) Skip locking of temporary tables as locking doesn't make any
   sense for connection-local objects.
2) Prohibit changing of temporary table locked by LOCK TABLES ... 
   READ.

Unfortunately both of these approaches have drawbacks which make 
them unviable for stable versions of server.

So this patch takes another approach and changes code in such way
that LOCK TABLES for a temporary table will always request write
lock. In 5.1 version of this patch switch from read lock to write
lock is done inside of InnoDBs handler methods as doing it on 
SQL-layer causes compatibility troubles with FLUSH TABLES WITH
READ LOCK.
2011-05-26 17:14:47 +04:00
..
binlog BUG#12574820: binlog.binlog_tmp_table timing out in daily and weekly trunk run 2011-05-26 12:50:43 +02:00
engines Bug#11766165 - 59211: SELECT RETURNS DIFFERENT VALUE FOR MIN(YEAR) FUNCTION 2011-03-01 21:26:24 +05:30
federated Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
funcs_1 Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
funcs_2 Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
im Move instance manager tests to it's own suite 2007-08-29 19:02:33 +02:00
innodb Fix for bug #11762012 - "54553: INNODB ASSERTS IN 2011-05-26 17:14:47 +04:00
innodb_plugin Fix for bug #11762012 - "54553: INNODB ASSERTS IN 2011-05-26 17:14:47 +04:00
jp Bug #45159 : some tests in suite "jp" fail in embedded server (use LOAD DATA) 2009-09-11 15:52:08 +03:00
large_tests Bug#27029 alter table ... enable keys crashes mysqld on large table 2007-06-21 12:45:56 -04:00
manual BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
ndb Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
ndb_team Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
parts Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
rpl Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
rpl_ndb Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
stress Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00
sys_vars Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30