mariadb/storage/ibmdb2i
Davi Arnaut 5f911fa874 Bug#49938: Failing assertion: inode or deadlock in fsp/fsp0fsp.c
Bug#54678: InnoDB, TRUNCATE, ALTER, I_S SELECT, crash or deadlock

- Incompatible change: truncate no longer resorts to a row by
row delete if the storage engine does not support the truncate
method. Consequently, the count of affected rows does not, in
any case, reflect the actual number of rows.

- Incompatible change: it is no longer possible to truncate a
table that participates as a parent in a foreign key constraint,
unless it is a self-referencing constraint (both parent and child
are in the same table). To work around this incompatible change
and still be able to truncate such tables, disable foreign checks
with SET foreign_key_checks=0 before truncate. Alternatively, if
foreign key checks are necessary, please use a DELETE statement
without a WHERE condition.

Problem description:

The problem was that for storage engines that do not support
truncate table via a external drop and recreate, such as InnoDB
which implements truncate via a internal drop and recreate, the
delete_all_rows method could be invoked with a shared metadata
lock, causing problems if the engine needed exclusive access
to some internal metadata. This problem originated with the
fact that there is no truncate specific handler method, which
ended up leading to a abuse of the delete_all_rows method that
is primarily used for delete operations without a condition.

Solution:

The solution is to introduce a truncate handler method that is
invoked when the engine does not support truncation via a table
drop and recreate. This method is invoked under a exclusive
metadata lock, so that there is only a single instance of the
table when the method is invoked.

Also, the method is not invoked and a error is thrown if
the table is a parent in a non-self-referencing foreign key
relationship. This was necessary to avoid inconsistency as
some integrity checks are bypassed. This is inline with the
fact that truncate is primarily a DDL operation that was
designed to quickly remove all data from a table.
2010-10-06 11:34:28 -03:00
..
CMakeLists.txt Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect). 2010-08-12 19:19:57 +04:00
db2i_blobCollection.cc Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_blobCollection.h Import the ibmdb2i-ga4-src snapshot from IBM 2009-03-09 15:20:14 -06:00
db2i_charsetSupport.cc The "hash_*" functions have got a prefix "my_" in 2008. 2009-11-17 13:55:42 +01:00
db2i_charsetSupport.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_collationSupport.cc Bug#45196 Some collations do not sort correctly with IBMDB2I 2009-06-29 07:32:17 +05:30
db2i_collationSupport.h Import the ibmdb2i-ga4-src snapshot from IBM 2009-03-09 15:20:14 -06:00
db2i_constraints.cc Bug#49938: Failing assertion: inode or deadlock in fsp/fsp0fsp.c 2010-10-06 11:34:28 -03:00
db2i_conversion.cc Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_errors.cc Bug#44232 Error msg should be improved when collation not supported. 2009-05-05 15:03:52 +05:30
db2i_errors.h Bug#44232 Error msg should be improved when collation not supported. 2009-05-05 15:03:52 +05:30
db2i_file.cc Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_file.h Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_global.h Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_iconv.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_ileBridge.cc Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_ileBridge.h Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
db2i_ioBuffers.cc Import the ibmdb2i-ga4-src snapshot from IBM 2009-03-09 15:20:14 -06:00
db2i_ioBuffers.h Import the ibmdb2i-ga4-src snapshot from IBM 2009-03-09 15:20:14 -06:00
db2i_misc.h Bug#44811 Tests with utf8 charset fail with ibmdb2i on 64bit MySQL 2009-05-29 15:01:00 +05:30
db2i_myconv.cc Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_myconv.h Bug#45803 Inaccurate estimates for partial key values with IBMDB2I 2009-07-06 14:19:32 +05:30
db2i_rir.cc Bug#45803 Inaccurate estimates for partial key values with IBMDB2I 2009-07-06 14:19:32 +05:30
db2i_safeString.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_sqlStatementStream.cc Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_sqlStatementStream.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
db2i_validatedPointer.h Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00
ha_ibmdb2i.cc Bug#49938: Failing assertion: inode or deadlock in fsp/fsp0fsp.c 2010-10-06 11:34:28 -03:00
ha_ibmdb2i.h Bug#45983 ibmdb2i_create_index_option=1 not working for primary key 2009-07-08 14:40:01 +05:30
Makefile.am Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-09 09:28:51 -03:00
plug.in Add the IBM DB2 for i storage engine. 2009-02-15 03:18:30 +01:00