Commit 0254f1a6 authored by Sergei Golubchik's avatar Sergei Golubchik

bugfix: TABLE::mark_columns_used_by_index

Do *not* modify write_set.
keyread only affects what columns are *read*, UPDATE statement can
*write* into columns that aren't part of the keyread.
parent 5d7607f3
......@@ -6088,7 +6088,7 @@ void TABLE::mark_columns_used_by_index(uint index)
file->ha_start_keyread();
bitmap_clear_all(bitmap);
mark_columns_used_by_index_no_reset(index, bitmap);
column_bitmaps_set(bitmap, bitmap);
column_bitmaps_set(bitmap);
DBUG_VOID_RETURN;
}
......
......@@ -1321,6 +1321,12 @@ struct TABLE
void mark_columns_used_by_check_constraints(void);
void mark_check_constraint_columns_for_read(void);
int verify_constraints(bool ignore_failure);
inline void column_bitmaps_set(MY_BITMAP *read_set_arg)
{
read_set= read_set_arg;
if (file)
file->column_bitmaps_signal();
}
inline void column_bitmaps_set(MY_BITMAP *read_set_arg,
MY_BITMAP *write_set_arg)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment