diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-01-16 13:16:41 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-01-16 13:57:22 +0100 |
commit | 1ecccb509c9dfa57976a2e2c3af07753a5356188 (patch) | |
tree | b204c5ba68761494ca40eaf213ed2024e8fa6138 /sql | |
parent | 235374aee3c4b08d34026c2bcd7d88db515966cb (diff) | |
download | mariadb-git-1ecccb509c9dfa57976a2e2c3af07753a5356188.tar.gz |
MDEV-17085: CHECKSUM TABLE EXTENDED does not work correctly
The problem was in calculating of the mask to clear unused null bits in case of using full byte.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_table.cc | 5 |
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(); |