From 28e6f6c43c0fa9d6697e1bf98d3b25d346cfdc0c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Mar 2006 08:33:20 +0100 Subject: [PATCH] Bug#17874 (Test failure: rpl_row_basic_3innodb): Some storage engines does not set the filler bits, so we set them before calling the record-reading functions. sql/log_event.cc: Set the null byte containing filler bits before calling any record- reading functions. --- sql/log_event.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sql/log_event.cc b/sql/log_event.cc index e589f46e0e0..46f9535bba7 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -6424,6 +6424,13 @@ static int find_and_fetch_row(TABLE *table, byte *key) if (table->s->keys > 0) { int error; + /* + We need to set the null bytes to ensure that the filler bit + are all set when returning. There are storage engines that + just set the necessary bits on the bytes and don't set the + filler bits correctly. + */ + table->record[1][table->s->null_bytes - 1]= 0xFF; if ((error= table->file->index_read_idx(table->record[1], 0, key, table->key_info->key_length, HA_READ_KEY_EXACT))) @@ -6452,6 +6459,13 @@ static int find_and_fetch_row(TABLE *table, byte *key) while (record_compare(table)) { int error; + /* + We need to set the null bytes to ensure that the filler bit + are all set when returning. There are storage engines that + just set the necessary bits on the bytes and don't set the + filler bits correctly. + */ + table->record[1][table->s->null_bytes - 1]= 0xFF; if ((error= table->file->index_next(table->record[1]))) { table->file->print_error(error, MYF(0)); @@ -6466,6 +6480,13 @@ static int find_and_fetch_row(TABLE *table, byte *key) int error= 0; do { + /* + We need to set the null bytes to ensure that the filler bit + are all set when returning. There are storage engines that + just set the necessary bits on the bytes and don't set the + filler bits correctly. + */ + table->record[1][table->s->null_bytes - 1]= 0xFF; error= table->file->rnd_next(table->record[1]); switch (error) {