summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-01-16 13:16:41 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2019-01-16 13:52:07 +0100
commita59d600cbafd34e230da321b4a16339f5cf6976d (patch)
tree33548c057f0645ce30f200ec1c4d271b159e2cee /sql/sql_table.cc
parentdc42b3c4d9546153e2f0049393e3771e21551679 (diff)
downloadmariadb-git-bb-5.5-MDEV-17085.tar.gz
MDEV-17085: CHECKSUM TABLE EXTENDED does not work correctlybb-5.5-MDEV-17085
The problem was in calculating of the mask to clear unused null bits in case of using full byte.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 1b83b513c2d..d3448c167c4 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -7844,7 +7844,10 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
{
/* calculating table's checksum */
ha_checksum crc= 0;
- uchar null_mask=256 - (1 << t->s->last_null_bit_pos);
+ DBUG_ASSERT(t->s->last_null_bit_pos < 8);
+ uchar null_mask= (t->s->last_null_bit_pos ?
+ (256 - (1 << t->s->last_null_bit_pos)):
+ 0);
t->use_all_columns();