mariadb/storage/innobase/row
Martin Hansson d6ee2ecf90 Bug#56423: Different count with SELECT and CREATE SELECT queries
This is the 5.5 version of the fix. The 5.1 version was too complicated to
merge and was null merged.

This is a regression from the fix for bug no 38999. A storage engine capable
of reading only a subset of a table's columns updates corresponding bits in
the read buffer to signal that it has read NULL values for the corresponding
columns. It cannot, and should not, update any other bits. Bug no 38999
occurred because the implementation of UPDATE statements compare the NULL bits
using memcmp, inadvertently comparing bits that were never requested from the
storage engine. The regression was caused by the storage engine trying to
alleviate the situation by writing to all NULL bits, even those that it had no
knowledge of. This has devastating effects for the index merge algorithm,
which relies on all NULL bits, except those explicitly requested, being left
unchanged.

The fix reverts the fix for bug no 38999 in both InnoDB and InnoDB plugin and
changes the server's method of comparing records. For engines that always read
entire rows, we proceed as usual. For engines capable of reading only select
columns, the record buffers are now compared on a column by column basis. An
assertion was also added so that non comparable buffers are never read. Some
relevant copy-pasted code was also consolidated in a new function.
2010-10-07 12:01:51 +02:00
..
row0ext.c Renamed storage/innodb_plugin to storage/innobase, so that 1) it's the same 2009-08-07 12:16:00 +02:00
row0ins.c Bug#52199 utf32: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4 2010-06-29 14:32:48 +03:00
row0merge.c Merge mysql-trunk-bugfixing -> mysql-trunk-innodb 2010-07-21 17:22:29 +03:00
row0mysql.c Merge mysql-5.5-innodb -> mysql-5.5-bugteam 2010-10-01 16:36:35 +03:00
row0purge.c (row0purge.c:789) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:09:30 +03:00
row0row.c Merge Bug#54408 fix from mysql-5.1-innodb: 2010-06-29 16:21:05 +03:00
row0sel.c Bug#56423: Different count with SELECT and CREATE SELECT queries 2010-10-07 12:01:51 +02:00
row0uins.c Bug#54728: Replace the dulint struct with a 64-bit integer. 2010-06-23 14:06:59 +03:00
row0umod.c (row0umod.c:117) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:10:33 +03:00
row0undo.c Merge Bug#54408 fix from mysql-5.1-innodb: 2010-06-29 16:21:05 +03:00
row0upd.c Merge from -c3476 mysql-5.1-security. 2010-08-16 12:05:49 +10:00
row0vers.c (row0vers.c:74) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:17:20 +03:00