mariadb/storage/spider
Nikita Malyavin e25623e78a MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed
The assertion failed in handler::ha_reset upon SELECT under
READ UNCOMMITTED from table with index on virtual column.

This was the debug-only failure, though the problem is mush wider:
* MY_BITMAP is a structure containing my_bitmap_map, the latter is a raw
 bitmap.
* read_set, write_set and vcol_set of TABLE are the pointers to MY_BITMAP
* The rest of MY_BITMAPs are stored in TABLE and TABLE_SHARE
* The pointers to the stored MY_BITMAPs, like orig_read_set etc, and
 sometimes all_set and tmp_set, are assigned to the pointers.
* Sometimes tmp_use_all_columns is used to substitute the raw bitmap
 directly with all_set.bitmap
* Sometimes even bitmaps are directly modified, like in
TABLE::update_virtual_field(): bitmap_clear_all(&tmp_set) is called.

The last three bullets in the list, when used together (which is mostly
always) make the program flow cumbersome and impossible to follow,
notwithstanding the errors they cause, like this MDEV-17556, where tmp_set
pointer was assigned to read_set, write_set and vcol_set, then its bitmap
was substituted with all_set.bitmap by dbug_tmp_use_all_columns() call,
and then bitmap_clear_all(&tmp_set) was applied to all this.

To untangle this knot, the rule should be applied:
* Never substitute bitmaps! This patch is about this.
 orig_*, all_set bitmaps are never substituted already.

This patch changes the following function prototypes:
* tmp_use_all_columns, dbug_tmp_use_all_columns
 to accept MY_BITMAP** and to return MY_BITMAP * instead of my_bitmap_map*
* tmp_restore_column_map, dbug_tmp_restore_column_maps to accept
 MY_BITMAP* instead of my_bitmap_map*

These functions now will substitute read_set/write_set/vcol_set directly,
and won't touch underlying bitmaps.
2021-01-08 16:04:29 +10:00
..
hs_client Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
mysql-test/spider MDEV-17508 Fix bug for spider when using "not like" 2019-11-25 15:40:01 +01:00
scripts Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
CMakeLists.txt fix compilation wih -DPLUGIN_PARTITION=NO 2018-02-22 08:40:54 +01:00
configure.in MDEV-4438 - Spider storage engine 2013-06-27 15:18:48 +04:00
ha_spider.cc MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed 2021-01-08 16:04:29 +10:00
ha_spider.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
Makefile.am MDEV-4438 - Spider storage engine 2013-06-27 15:18:48 +04:00
spd_conn.cc MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671 2020-09-07 10:18:43 +09:00
spd_conn.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_copy_tables.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_copy_tables.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_db_conn.cc MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed 2021-01-08 16:04:29 +10:00
spd_db_conn.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_db_handlersocket.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_db_handlersocket.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_db_include.h MDEV-17508 Fix bug for spider when using "not like" 2019-11-25 15:40:01 +01:00
spd_db_mysql.cc MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed 2021-01-08 16:04:29 +10:00
spd_db_mysql.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_db_oracle.cc MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671 2020-09-07 10:18:43 +09:00
spd_db_oracle.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_direct_sql.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_direct_sql.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_err.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_i_s.cc Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_include.h MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671 2020-09-07 10:18:43 +09:00
spd_malloc.cc Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_malloc.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_param.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_param.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_ping_table.cc Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_ping_table.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_sys_table.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_sys_table.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_table.cc MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671 2020-09-07 10:18:43 +09:00
spd_table.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_trx.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
spd_trx.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_udf.cc Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
spd_udf.def MDEV-4438 - Spider storage engine 2013-06-27 15:18:48 +04:00
spd_udf.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00