Details
Description
Note: the test case contains a little bit of everything – versioning, partitioning, views, InnoDB, concurrency, I got rid of whatever I could, the rest seems to play some role, even if only creating the right conditions for race.
Note: the test case is not deterministic, don't add it to the regression suite, create a better one when the reason of the problem is clear.
--source include/have_innodb.inc
|
--source include/have_partition.inc
|
|
# Restoring default values |
SET @lru_depth.save= @@innodb_lru_scan_depth, @stats.save= @@innodb_stats_persistent; |
SET GLOBAL innodb_lru_scan_depth= 1024, innodb_stats_persistent= ON; |
|
CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a VARCHAR(4), PRIMARY KEY (pk)) ENGINE=InnoDB |
WITH SYSTEM VERSIONING PARTITION BY key (pk) PARTITIONS 2; |
|
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1; |
INSERT INTO t1 (a) VALUES |
('foo'),('bar'),('foo'),('bar'),('foo'), |
('foo'),('bar'),('foo'),('bar'),('foo'), |
('foo'),('bar'),('foo'),('bar'),('foo'), |
('foo'),('bar'),('foo'),('bar'),('foo'), |
('foo'),('bar'),('foo'),('bar'),('foo'), |
('foo'),('bar'),('foo'),('bar'),('foo'), |
('foo'),('bar'),('foo'),('bar'),('foo'), |
('foo'),('bar'),('foo'),('bar'),('foo'); |
|
--connect (con1,localhost,root,,test)
|
|
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; |
UPDATE t1 SET a = 'qux'; |
|
--let $run= 100
|
--disable_result_log
|
while ($run)
|
{
|
--send |
SELECT DISTINCT pk FROM v1; |
--connection default |
INSERT INTO v1 (pk) VALUES (NULL); |
--connection con1 |
--reap |
--dec $run |
--echo # $run trials left |
}
|
--enable_result_log
|
|
# Cleanup
|
DROP VIEW v1; |
DROP TABLE t1; |
SET GLOBAL innodb_lru_scan_depth= @lur_depth.save, innodb_stats_persistent= @stats.save; |
10.3 ad647cc84 |
mysqld: /data/src/10.3/sql/opt_range.cc:14009: virtual int QUICK_GROUP_MIN_MAX_SELECT::get_next(): Assertion `is_last_prefix <= 0' failed.
|
180327 3:34:17 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f5a793c8ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x000055a6f2c37025 in QUICK_GROUP_MIN_MAX_SELECT::get_next (this=0x7f5a24023e20) at /data/src/10.3/sql/opt_range.cc:14009
|
#9 0x000055a6f2c424e8 in rr_quick (info=0x7f5a2401f080) at /data/src/10.3/sql/records.cc:366
|
#10 0x000055a6f274499b in READ_RECORD::read_record (this=0x7f5a2401f080) at /data/src/10.3/sql/records.h:73
|
#11 0x000055a6f284bc43 in sub_select (join=0x7f5a24016af8, join_tab=0x7f5a2401efb8, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19251
|
#12 0x000055a6f284b0ff in do_select (join=0x7f5a24016af8, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18772
|
#13 0x000055a6f28241b0 in JOIN::exec_inner (this=0x7f5a24016af8) at /data/src/10.3/sql/sql_select.cc:3987
|
#14 0x000055a6f2823648 in JOIN::exec (this=0x7f5a24016af8) at /data/src/10.3/sql/sql_select.cc:3781
|
#15 0x000055a6f2824889 in mysql_select (thd=0x7f5a24000b00, tables=0x7f5a24013b98, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748609, result=0x7f5a24016ad8, unit=0x7f5a24004938, select_lex=0x7f5a240050b0) at /data/src/10.3/sql/sql_select.cc:4186
|
#16 0x000055a6f2816b67 in handle_select (thd=0x7f5a24000b00, lex=0x7f5a24004870, result=0x7f5a24016ad8, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382
|
#17 0x000055a6f27e1d31 in execute_sqlcom_select (thd=0x7f5a24000b00, all_tables=0x7f5a24013b98) at /data/src/10.3/sql/sql_parse.cc:6552
|
#18 0x000055a6f27d834b in mysql_execute_command (thd=0x7f5a24000b00) at /data/src/10.3/sql/sql_parse.cc:3763
|
#19 0x000055a6f27e572a in mysql_parse (thd=0x7f5a24000b00, rawbuf=0x7f5a24013988 "SELECT DISTINCT pk FROM v1", length=26, parser_state=0x7f5a6e6a05d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8009
|
#20 0x000055a6f27d2dde in dispatch_command (command=COM_QUERY, thd=0x7f5a24000b00, packet=0x7f5a2400b251 "", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1838
|
#21 0x000055a6f27d181d in do_command (thd=0x7f5a24000b00) at /data/src/10.3/sql/sql_parse.cc:1383
|
#22 0x000055a6f2935c85 in do_handle_one_connection (connect=0x55a6f52a3530) at /data/src/10.3/sql/sql_connect.cc:1402
|
#23 0x000055a6f2935a12 in handle_one_connection (arg=0x55a6f52a3530) at /data/src/10.3/sql/sql_connect.cc:1308
|
#24 0x000055a6f2dbd029 in pfs_spawn_thread (arg=0x55a6f52e5630) at /data/src/10.3/storage/perfschema/pfs.cc:1862
|
#25 0x00007f5a7b09f494 in start_thread (arg=0x7f5a6e6a1700) at pthread_create.c:333
|
#26 0x00007f5a7948593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
No visible effect on non-debug build.
Couldn't check earlier versions because of versioning.
Attachments
Issue Links
- duplicates
-
MDEV-29243 Assertion `is_last_prefix <= 0' failed at opt_range.cc:15436
-
- Closed
-
- relates to
-
MDEV-27601 Assertion `is_last_prefix <= 0' failed in QUICK_GROUP_MIN_MAX_SELECT::get_next()
-
- Confirmed
-
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | Optimizer [ 10200 ] | |
Component/s | Partitioning [ 10802 ] | |
Component/s | System versioning [ 14303 ] | |
Component/s | Views [ 10111 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Description |
{noformat:title=10.3 96ecf3ff230}
mysqld: /data/src/10.3/sql/opt_range.cc:14009: virtual int QUICK_GROUP_MIN_MAX_SELECT::get_next(): Assertion `is_last_prefix <= 0' failed. 180325 19:07:37 [ERROR] mysqld got signal 6 ; Query (0x7f7718013a18): /* GenTest::Transform::Distinct */ SELECT DISTINCT `pk` FROM `table100_innodb_int_autoinc` /* QNO 11086 CON_ID 21 */ /* TRANSFORM_OUTCOME_DISTINCT */ /* QNO 11093 CON_ID 21 */ Connection ID (thread ID): 21 Status: NOT_KILLED {noformat} {noformat} #7 0x00007f77a75b9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055f39141e025 in QUICK_GROUP_MIN_MAX_SELECT::get_next (this=0x7f7718150100) at /data/src/10.3/sql/opt_range.cc:14009 #9 0x000055f3914294e8 in rr_quick (info=0x7f77180168e0) at /data/src/10.3/sql/records.cc:366 #10 0x000055f390f2b99b in READ_RECORD::read_record (this=0x7f77180168e0) at /data/src/10.3/sql/records.h:73 #11 0x000055f391032c43 in sub_select (join=0x7f7718014528, join_tab=0x7f7718016818, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19251 #12 0x000055f3910320ff in do_select (join=0x7f7718014528, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18772 #13 0x000055f39100b1b0 in JOIN::exec_inner (this=0x7f7718014528) at /data/src/10.3/sql/sql_select.cc:3987 #14 0x000055f39100a648 in JOIN::exec (this=0x7f7718014528) at /data/src/10.3/sql/sql_select.cc:3781 #15 0x000055f39100b889 in mysql_select (thd=0x7f7718000b00, tables=0x7f7718013de0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=551903562497, result=0x7f7718014508, unit=0x7f7718004938, select_lex=0x7f77180050b0) at /data/src/10.3/sql/sql_select.cc:4186 #16 0x000055f390ffdb67 in handle_select (thd=0x7f7718000b00, lex=0x7f7718004870, result=0x7f7718014508, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382 #17 0x000055f390fc8d31 in execute_sqlcom_select (thd=0x7f7718000b00, all_tables=0x7f7718013de0) at /data/src/10.3/sql/sql_parse.cc:6552 #18 0x000055f390fbf34b in mysql_execute_command (thd=0x7f7718000b00) at /data/src/10.3/sql/sql_parse.cc:3763 #19 0x000055f390fcc72a in mysql_parse (thd=0x7f7718000b00, rawbuf=0x7f7718013a18 "/* GenTest::Transform::Distinct */ SELECT DISTINCT `pk` FROM `table100_innodb_int_autoinc` /* QNO 11086 CON_ID 21 */ /* TRANSFORM_OUTCOME_DISTINCT */ /* QNO 11093 CON_ID 21 */", length=177, parser_state=0x7f77919ea620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8009 #20 0x000055f390fb9dde in dispatch_command (command=COM_QUERY, thd=0x7f7718000b00, packet=0x7f771800b251 "", packet_length=178, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1838 #21 0x000055f390fb881d in do_command (thd=0x7f7718000b00) at /data/src/10.3/sql/sql_parse.cc:1383 #22 0x000055f39111cc85 in do_handle_one_connection (connect=0x55f394674390) at /data/src/10.3/sql/sql_connect.cc:1402 #23 0x000055f39111ca12 in handle_one_connection (arg=0x55f394674390) at /data/src/10.3/sql/sql_connect.cc:1308 #24 0x00007f77a9290494 in start_thread (arg=0x7f77919eb700) at pthread_create.c:333 #25 0x00007f77a767693f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=experimental a1ddcead83c} perl ./runall-new.pl --duration=350 --threads=6 --seed=1521966281 --reporters=Backtrace,ErrorLog,Deadlock --validators=TransformerNoComparator --transformers=ConvertSubqueriesToViews,ConvertTablesToDerived,Count,DisableOptimizations,Distinct,EnableOptimizations,ExecuteAsCTE,ExecuteAsDeleteReturning,ExecuteAsDerived,ExecuteAsExcept,ExecuteAsExecuteImmediate,ExecuteAsInsertSelect,ExecuteAsIntersect,ExecuteAsSelectItem,ExecuteAsUnion,ExecuteAsUpdateDelete,ExecuteAsView,ExecuteAsWhereSubquery,Having,InlineSubqueries,LimitRowsExamined,OrderBy,StraightJoin,ExecuteAsPreparedTwice,ExecuteAsTrigger,ExecuteAsSPTwice,ExecuteAsFunctionTwice --redefine=conf/mariadb/general-workarounds.yy --mysqld=--log_output=FILE --mysqld=--log_bin_trust_function_creators=1 --mysqld=--log-bin --mysqld=--max-statement-time=30 --mysqld=--loose-debug_assert_on_not_freed_memory=0 --views --redefine=conf/mariadb/versioning.yy --basedir=/data/bld/10.3 --grammar=conf/engines/many_indexes.yy --gendata=conf/engines/many_indexes.zz --engine=InnoDB --vardir=/dev/shm/vardir {noformat} |
_Note: the test case contains a little bit of everything -- versioning, partitioning, views, InnoDB, concurrency, I got rid of whatever I could, the rest seems to play some role, even if only creating the right conditions for race._
_Note: the test case is not deterministic, don't add it to the regression suite, create a better one when the reason of the problem is clear._ {code:sql} --source include/have_innodb.inc --source include/have_partition.inc # Restoring default values SET @lru_depth.save= @@innodb_lru_scan_depth, @stats.save= @@innodb_stats_persistent; SET GLOBAL innodb_lru_scan_depth= 1024, innodb_stats_persistent= ON; CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a VARCHAR(4), PRIMARY KEY (pk)) ENGINE=InnoDB WITH SYSTEM VERSIONING PARTITION BY key (pk) PARTITIONS 2; CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1; INSERT INTO t1 (a) VALUES ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'); --connect (con1,localhost,root,,test) SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; UPDATE t1 SET a = 'qux'; --let $run= 100 --disable_result_log while ($run) { --send SELECT DISTINCT pk FROM v1; --connection default INSERT INTO v1 (pk) VALUES (NULL); --connection con1 --reap --dec $run --echo # $run trials left } --enable_result_log # Cleanup DROP VIEW v1; DROP TABLE t1; SET GLOBAL innodb_lru_scan_depth= @lur_depth.save, innodb_stats_persistent= @stats.save; {code} {noformat:title=10.3 ad647cc84} mysqld: /data/src/10.3/sql/opt_range.cc:14009: virtual int QUICK_GROUP_MIN_MAX_SELECT::get_next(): Assertion `is_last_prefix <= 0' failed. 180327 3:34:17 [ERROR] mysqld got signal 6 ; #7 0x00007f5a793c8ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055a6f2c37025 in QUICK_GROUP_MIN_MAX_SELECT::get_next (this=0x7f5a24023e20) at /data/src/10.3/sql/opt_range.cc:14009 #9 0x000055a6f2c424e8 in rr_quick (info=0x7f5a2401f080) at /data/src/10.3/sql/records.cc:366 #10 0x000055a6f274499b in READ_RECORD::read_record (this=0x7f5a2401f080) at /data/src/10.3/sql/records.h:73 #11 0x000055a6f284bc43 in sub_select (join=0x7f5a24016af8, join_tab=0x7f5a2401efb8, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19251 #12 0x000055a6f284b0ff in do_select (join=0x7f5a24016af8, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18772 #13 0x000055a6f28241b0 in JOIN::exec_inner (this=0x7f5a24016af8) at /data/src/10.3/sql/sql_select.cc:3987 #14 0x000055a6f2823648 in JOIN::exec (this=0x7f5a24016af8) at /data/src/10.3/sql/sql_select.cc:3781 #15 0x000055a6f2824889 in mysql_select (thd=0x7f5a24000b00, tables=0x7f5a24013b98, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748609, result=0x7f5a24016ad8, unit=0x7f5a24004938, select_lex=0x7f5a240050b0) at /data/src/10.3/sql/sql_select.cc:4186 #16 0x000055a6f2816b67 in handle_select (thd=0x7f5a24000b00, lex=0x7f5a24004870, result=0x7f5a24016ad8, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382 #17 0x000055a6f27e1d31 in execute_sqlcom_select (thd=0x7f5a24000b00, all_tables=0x7f5a24013b98) at /data/src/10.3/sql/sql_parse.cc:6552 #18 0x000055a6f27d834b in mysql_execute_command (thd=0x7f5a24000b00) at /data/src/10.3/sql/sql_parse.cc:3763 #19 0x000055a6f27e572a in mysql_parse (thd=0x7f5a24000b00, rawbuf=0x7f5a24013988 "SELECT DISTINCT pk FROM v1", length=26, parser_state=0x7f5a6e6a05d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8009 #20 0x000055a6f27d2dde in dispatch_command (command=COM_QUERY, thd=0x7f5a24000b00, packet=0x7f5a2400b251 "", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1838 #21 0x000055a6f27d181d in do_command (thd=0x7f5a24000b00) at /data/src/10.3/sql/sql_parse.cc:1383 #22 0x000055a6f2935c85 in do_handle_one_connection (connect=0x55a6f52a3530) at /data/src/10.3/sql/sql_connect.cc:1402 #23 0x000055a6f2935a12 in handle_one_connection (arg=0x55a6f52a3530) at /data/src/10.3/sql/sql_connect.cc:1308 #24 0x000055a6f2dbd029 in pfs_spawn_thread (arg=0x55a6f52e5630) at /data/src/10.3/storage/perfschema/pfs.cc:1862 #25 0x00007f5a7b09f494 in start_thread (arg=0x7f5a6e6a1700) at pthread_create.c:333 #26 0x00007f5a7948593f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} |
Summary | [Draft] Assertion `is_last_prefix <= 0' failed in QUICK_GROUP_MIN_MAX_SELECT::get_next | Assertion `is_last_prefix <= 0' failed in QUICK_GROUP_MIN_MAX_SELECT::get_next |
Attachment | threads [ 45395 ] |
Description |
_Note: the test case contains a little bit of everything -- versioning, partitioning, views, InnoDB, concurrency, I got rid of whatever I could, the rest seems to play some role, even if only creating the right conditions for race._
_Note: the test case is not deterministic, don't add it to the regression suite, create a better one when the reason of the problem is clear._ {code:sql} --source include/have_innodb.inc --source include/have_partition.inc # Restoring default values SET @lru_depth.save= @@innodb_lru_scan_depth, @stats.save= @@innodb_stats_persistent; SET GLOBAL innodb_lru_scan_depth= 1024, innodb_stats_persistent= ON; CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a VARCHAR(4), PRIMARY KEY (pk)) ENGINE=InnoDB WITH SYSTEM VERSIONING PARTITION BY key (pk) PARTITIONS 2; CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1; INSERT INTO t1 (a) VALUES ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'); --connect (con1,localhost,root,,test) SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; UPDATE t1 SET a = 'qux'; --let $run= 100 --disable_result_log while ($run) { --send SELECT DISTINCT pk FROM v1; --connection default INSERT INTO v1 (pk) VALUES (NULL); --connection con1 --reap --dec $run --echo # $run trials left } --enable_result_log # Cleanup DROP VIEW v1; DROP TABLE t1; SET GLOBAL innodb_lru_scan_depth= @lur_depth.save, innodb_stats_persistent= @stats.save; {code} {noformat:title=10.3 ad647cc84} mysqld: /data/src/10.3/sql/opt_range.cc:14009: virtual int QUICK_GROUP_MIN_MAX_SELECT::get_next(): Assertion `is_last_prefix <= 0' failed. 180327 3:34:17 [ERROR] mysqld got signal 6 ; #7 0x00007f5a793c8ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055a6f2c37025 in QUICK_GROUP_MIN_MAX_SELECT::get_next (this=0x7f5a24023e20) at /data/src/10.3/sql/opt_range.cc:14009 #9 0x000055a6f2c424e8 in rr_quick (info=0x7f5a2401f080) at /data/src/10.3/sql/records.cc:366 #10 0x000055a6f274499b in READ_RECORD::read_record (this=0x7f5a2401f080) at /data/src/10.3/sql/records.h:73 #11 0x000055a6f284bc43 in sub_select (join=0x7f5a24016af8, join_tab=0x7f5a2401efb8, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19251 #12 0x000055a6f284b0ff in do_select (join=0x7f5a24016af8, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18772 #13 0x000055a6f28241b0 in JOIN::exec_inner (this=0x7f5a24016af8) at /data/src/10.3/sql/sql_select.cc:3987 #14 0x000055a6f2823648 in JOIN::exec (this=0x7f5a24016af8) at /data/src/10.3/sql/sql_select.cc:3781 #15 0x000055a6f2824889 in mysql_select (thd=0x7f5a24000b00, tables=0x7f5a24013b98, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748609, result=0x7f5a24016ad8, unit=0x7f5a24004938, select_lex=0x7f5a240050b0) at /data/src/10.3/sql/sql_select.cc:4186 #16 0x000055a6f2816b67 in handle_select (thd=0x7f5a24000b00, lex=0x7f5a24004870, result=0x7f5a24016ad8, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382 #17 0x000055a6f27e1d31 in execute_sqlcom_select (thd=0x7f5a24000b00, all_tables=0x7f5a24013b98) at /data/src/10.3/sql/sql_parse.cc:6552 #18 0x000055a6f27d834b in mysql_execute_command (thd=0x7f5a24000b00) at /data/src/10.3/sql/sql_parse.cc:3763 #19 0x000055a6f27e572a in mysql_parse (thd=0x7f5a24000b00, rawbuf=0x7f5a24013988 "SELECT DISTINCT pk FROM v1", length=26, parser_state=0x7f5a6e6a05d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8009 #20 0x000055a6f27d2dde in dispatch_command (command=COM_QUERY, thd=0x7f5a24000b00, packet=0x7f5a2400b251 "", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1838 #21 0x000055a6f27d181d in do_command (thd=0x7f5a24000b00) at /data/src/10.3/sql/sql_parse.cc:1383 #22 0x000055a6f2935c85 in do_handle_one_connection (connect=0x55a6f52a3530) at /data/src/10.3/sql/sql_connect.cc:1402 #23 0x000055a6f2935a12 in handle_one_connection (arg=0x55a6f52a3530) at /data/src/10.3/sql/sql_connect.cc:1308 #24 0x000055a6f2dbd029 in pfs_spawn_thread (arg=0x55a6f52e5630) at /data/src/10.3/storage/perfschema/pfs.cc:1862 #25 0x00007f5a7b09f494 in start_thread (arg=0x7f5a6e6a1700) at pthread_create.c:333 #26 0x00007f5a7948593f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} |
_Note: the test case contains a little bit of everything -- versioning, partitioning, views, InnoDB, concurrency, I got rid of whatever I could, the rest seems to play some role, even if only creating the right conditions for race._
_Note: the test case is not deterministic, don't add it to the regression suite, create a better one when the reason of the problem is clear._ {code:sql} --source include/have_innodb.inc --source include/have_partition.inc # Restoring default values SET @lru_depth.save= @@innodb_lru_scan_depth, @stats.save= @@innodb_stats_persistent; SET GLOBAL innodb_lru_scan_depth= 1024, innodb_stats_persistent= ON; CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a VARCHAR(4), PRIMARY KEY (pk)) ENGINE=InnoDB WITH SYSTEM VERSIONING PARTITION BY key (pk) PARTITIONS 2; CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1; INSERT INTO t1 (a) VALUES ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'), ('foo'),('bar'),('foo'),('bar'),('foo'); --connect (con1,localhost,root,,test) SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; UPDATE t1 SET a = 'qux'; --let $run= 100 --disable_result_log while ($run) { --send SELECT DISTINCT pk FROM v1; --connection default INSERT INTO v1 (pk) VALUES (NULL); --connection con1 --reap --dec $run --echo # $run trials left } --enable_result_log # Cleanup DROP VIEW v1; DROP TABLE t1; SET GLOBAL innodb_lru_scan_depth= @lur_depth.save, innodb_stats_persistent= @stats.save; {code} {noformat:title=10.3 ad647cc84} mysqld: /data/src/10.3/sql/opt_range.cc:14009: virtual int QUICK_GROUP_MIN_MAX_SELECT::get_next(): Assertion `is_last_prefix <= 0' failed. 180327 3:34:17 [ERROR] mysqld got signal 6 ; #7 0x00007f5a793c8ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055a6f2c37025 in QUICK_GROUP_MIN_MAX_SELECT::get_next (this=0x7f5a24023e20) at /data/src/10.3/sql/opt_range.cc:14009 #9 0x000055a6f2c424e8 in rr_quick (info=0x7f5a2401f080) at /data/src/10.3/sql/records.cc:366 #10 0x000055a6f274499b in READ_RECORD::read_record (this=0x7f5a2401f080) at /data/src/10.3/sql/records.h:73 #11 0x000055a6f284bc43 in sub_select (join=0x7f5a24016af8, join_tab=0x7f5a2401efb8, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19251 #12 0x000055a6f284b0ff in do_select (join=0x7f5a24016af8, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18772 #13 0x000055a6f28241b0 in JOIN::exec_inner (this=0x7f5a24016af8) at /data/src/10.3/sql/sql_select.cc:3987 #14 0x000055a6f2823648 in JOIN::exec (this=0x7f5a24016af8) at /data/src/10.3/sql/sql_select.cc:3781 #15 0x000055a6f2824889 in mysql_select (thd=0x7f5a24000b00, tables=0x7f5a24013b98, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748609, result=0x7f5a24016ad8, unit=0x7f5a24004938, select_lex=0x7f5a240050b0) at /data/src/10.3/sql/sql_select.cc:4186 #16 0x000055a6f2816b67 in handle_select (thd=0x7f5a24000b00, lex=0x7f5a24004870, result=0x7f5a24016ad8, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382 #17 0x000055a6f27e1d31 in execute_sqlcom_select (thd=0x7f5a24000b00, all_tables=0x7f5a24013b98) at /data/src/10.3/sql/sql_parse.cc:6552 #18 0x000055a6f27d834b in mysql_execute_command (thd=0x7f5a24000b00) at /data/src/10.3/sql/sql_parse.cc:3763 #19 0x000055a6f27e572a in mysql_parse (thd=0x7f5a24000b00, rawbuf=0x7f5a24013988 "SELECT DISTINCT pk FROM v1", length=26, parser_state=0x7f5a6e6a05d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8009 #20 0x000055a6f27d2dde in dispatch_command (command=COM_QUERY, thd=0x7f5a24000b00, packet=0x7f5a2400b251 "", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1838 #21 0x000055a6f27d181d in do_command (thd=0x7f5a24000b00) at /data/src/10.3/sql/sql_parse.cc:1383 #22 0x000055a6f2935c85 in do_handle_one_connection (connect=0x55a6f52a3530) at /data/src/10.3/sql/sql_connect.cc:1402 #23 0x000055a6f2935a12 in handle_one_connection (arg=0x55a6f52a3530) at /data/src/10.3/sql/sql_connect.cc:1308 #24 0x000055a6f2dbd029 in pfs_spawn_thread (arg=0x55a6f52e5630) at /data/src/10.3/storage/perfschema/pfs.cc:1862 #25 0x00007f5a7b09f494 in start_thread (arg=0x7f5a6e6a1700) at pthread_create.c:333 #26 0x00007f5a7948593f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} No visible effect on non-debug build. Couldn't check earlier versions because of versioning. |
Assignee | Elena Stepanova [ elenst ] | Sergei Golubchik [ serg ] |
Assignee | Sergei Golubchik [ serg ] | Eugene Kosov [ kevg ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Component/s | Partitioning [ 10802 ] | |
Component/s | System versioning [ 14303 ] | |
Component/s | Views [ 10111 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Assignee | Eugene Kosov [ kevg ] | Sergei Golubchik [ serg ] |
Assignee | Sergei Golubchik [ serg ] | Oleksandr Byelkin [ sanja ] |
Fix Version/s | 10.0 [ 16000 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Affects Version/s | 10.0 [ 16000 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.4 [ 22408 ] |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.0 [ 16000 ] | |
Affects Version/s | 10.5 [ 23123 ] | |
Affects Version/s | 10.0 [ 16000 ] |
Fix Version/s | 10.1 [ 16100 ] |
Workflow | MariaDB v3 [ 86195 ] | MariaDB v4 [ 143536 ] |
Link | This issue relates to MDEV-27601 [ MDEV-27601 ] |
Affects Version/s | 10.6 [ 24028 ] | |
Affects Version/s | 10.7 [ 24805 ] | |
Affects Version/s | 10.8 [ 26121 ] |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.7 [ 24805 ] |
Link |
This issue duplicates |
Fix Version/s | 10.2 [ 14601 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Fix Version/s | 10.7 [ 24805 ] |
Fix Version/s | 10.3 [ 22126 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Sergei Petrunia [ psergey ] |
Assignee | Sergei Petrunia [ psergey ] | Oleg Smirnov [ JIRAUSER50405 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Oleg Smirnov [ JIRAUSER50405 ] | Sergei Petrunia [ psergey ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | In Testing [ 10301 ] |
Assignee | Sergei Petrunia [ psergey ] | Lena Startseva [ JIRAUSER50478 ] |
Assignee | Lena Startseva [ JIRAUSER50478 ] | Oleg Smirnov [ JIRAUSER50405 ] |
Status | In Testing [ 10301 ] | Stalled [ 10000 ] |
Fix Version/s | 10.4.33 [ 29516 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Fix Version/s | 10.5.24 [ 29517 ] | |
Fix Version/s | 10.6.17 [ 29518 ] | |
Fix Version/s | 10.11.7 [ 29519 ] | |
Fix Version/s | 11.0.5 [ 29520 ] | |
Fix Version/s | 11.1.4 [ 29024 ] | |
Fix Version/s | 11.2.3 [ 29521 ] |