From: Jorgen Loland Date: February 7 2012 1:06pm Subject: bzr push into mysql-trunk branch (jorgen.loland:3849 to 3850) Bug#13686970 List-Archive: http://lists.mysql.com/commits/142777 X-Bug: 13686970 Message-Id: <20120207130641.E13A038A@atum21.no.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3850 Jorgen Loland 2012-02-07 Bug#13686970 - _MI_PRINT_KEY ITERATES ONE TIME TOO MUCH WHEN THERE IS A NULL BIT The for() loop in _mi_print_key() iterates one time to many when there is a NULL bit because each iteration only increases the key pointer with keyseg->length (size of the key NOT including NULL bits) when it should have been increased with (keyseg->length + #NULL-bits) instead. modified: storage/myisam/mi_dbug.c 3849 Guilhem Bichot 2012-02-07 fix for pb2 failure: use lowercase table names and aliases, or EXPLAIN output differs per platform. modified: mysql-test/include/subquery.inc mysql-test/r/subquery_all.result mysql-test/r/subquery_all_bka.result mysql-test/r/subquery_all_bka_nixbnl.result mysql-test/r/subquery_nomat_nosj.result mysql-test/r/subquery_nomat_nosj_bka.result mysql-test/r/subquery_nomat_nosj_bka_nixbnl.result mysql-test/r/subquery_none.result mysql-test/r/subquery_none_bka.result mysql-test/r/subquery_none_bka_nixbnl.result === modified file 'storage/myisam/mi_dbug.c' --- a/storage/myisam/mi_dbug.c 2011-06-30 15:46:53 +0000 +++ b/storage/myisam/mi_dbug.c 2012-02-07 13:06:27 +0000 @@ -36,7 +36,6 @@ void _mi_print_key(FILE *stream, registe { if (flag++) (void) putc('-',stream); - end= key+ keyseg->length; if (keyseg->flag & HA_NULL_PART) { /* A NULL value is encoded by a 1-byte flag. Zero means NULL. */ @@ -46,6 +45,7 @@ void _mi_print_key(FILE *stream, registe continue; } } + end= key + keyseg->length; switch (keyseg->type) { case HA_KEYTYPE_BINARY: No bundle (reason: useless for push emails).