summaryrefslogtreecommitdiff
path: root/include/my_bitmap.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-08-04 16:01:13 +0300
committerMichael Widenius <monty@askmonty.org>2010-08-04 16:01:13 +0300
commitcd9706b27ee113e0d448cb9c509fa9a4d553c5ee (patch)
treece0bac626c7b8d6339e735c8e8f1784d3e324da3 /include/my_bitmap.h
parent34e0c8f4c598e88a46eedea879e6a5b42b8606b5 (diff)
downloadmariadb-git-cd9706b27ee113e0d448cb9c509fa9a4d553c5ee.tar.gz
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.
Diffstat (limited to 'include/my_bitmap.h')
-rw-r--r--include/my_bitmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index 78642df3362..2c50ca3ec75 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -53,6 +53,8 @@ extern my_bool bitmap_is_overlapping(const MY_BITMAP *map1,
extern my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit);
extern my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit);
extern my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit);
+extern my_bool bitmap_union_is_set_all(const MY_BITMAP *map1,
+ const MY_BITMAP *map2);
extern uint bitmap_set_next(MY_BITMAP *map);
extern uint bitmap_get_first(const MY_BITMAP *map);
extern uint bitmap_get_first_set(const MY_BITMAP *map);