Browse Source
Fixes bug when we run bcmp() on row when the storage engine hasn't filled in all fields in the row.
Fixes bug when we run bcmp() on row when the storage engine hasn't filled in all fields in the row.
This was triggered by innodb.innodb_multi_update, where we had a static length row without nulls and xtradb didn't fill in the delete-marker byte include/my_bitmap.h: Added prototype for bitmap_union_is_set_all() mysys/my_bitmap.c: Added function to check if union of two bit maps covers all bits. sql/mysql_priv.h: Updated protype for compare_record() sql/sql_insert.cc: Send to compare_record() flag if all fields are used. sql/sql_select.cc: Set share->null_bytes_for_compare. sql/sql_update.cc: In compare_record() don't use the fast cmp_record() (which is basically memcmp) if we don't know that all fields exists. Don't compare the null_bytes if there is no data there. sql/table.cc: Store in share->null_bytes_for_compare the number of bytes that has null or bit fields (but not delete marker) Store in can_cmp_whole_record if we can use memcmp() (assuming all rows are read) to compare rows in compare_record() sql/table.h: Added two elements in table->share to speed up checking how updated rows can be compared.pull/843/head
8 changed files with 64 additions and 16 deletions
-
2include/my_bitmap.h
-
18mysys/my_bitmap.c
-
2sql/mysql_priv.h
-
5sql/sql_insert.cc
-
4sql/sql_select.cc
-
33sql/sql_update.cc
-
10sql/table.cc
-
6sql/table.h
Write
Preview
Loading…
Cancel
Save
Reference in new issue