Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
None
Description
CREATE TABLE t1 (a INT, KEY(a)) ENGINE=MyISAM; |
CREATE TABLE t2 (a INT, KEY(a)) ENGINE=MyISAM; |
CREATE TABLE tm (a INT, KEY(a)) ENGINE=MRG_MyISAM UNION=(t1,t2); |
|
SELECT DISTINCT a FROM tm WHERE a > 50; |
|
# Cleanup
|
DROP TABLE tm, t1, t2; |
bb-11.0 23808cd2cc |
mariadbd: /data/src/bb-11.0/sql/handler.cc:3303: virtual IO_AND_CPU_COST handler::keyread_time(uint, ulong, ha_rows, ulonglong): Assertion `ranges > 0' failed.
|
230131 16:15:06 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007ffb667a7662 in __GI___assert_fail (assertion=assertion@entry=0x55fbc2ff64a0 "ranges > 0", file=file@entry=0x55fbc2ff64e0 "/data/src/bb-11.0/sql/handler.cc", line=line@entry=3303, function=function@entry=0x55fbc2ff6540 "virtual IO_AND_CPU_COST handler::keyread_time(uint, ulong, ha_rows, ulonglong)") at assert.c:101
|
#8 0x000055fbc0c228ee in handler::keyread_time (this=this@entry=0x61b0000395b8, index=index@entry=0, ranges=ranges@entry=0, rows=rows@entry=0, blocks=blocks@entry=0) at /data/src/bb-11.0/sql/handler.cc:3303
|
#9 0x000055fbc28a59a9 in ha_myisammrg::keyread_time (this=0x61b0000395b8, index=<optimized out>, ranges=0, rows=<optimized out>, blocks=0) at /data/src/bb-11.0/storage/myisammrg/ha_myisammrg.cc:357
|
#10 0x000055fbc0c3aa26 in handler::ha_keyread_time (this=this@entry=0x61b0000395b8, index=<optimized out>, ranges=ranges@entry=0, rows=rows@entry=0, blocks=<optimized out>) at /data/src/bb-11.0/sql/handler.cc:3348
|
#11 0x000055fbbfc14fa5 in handler::ha_keyread_and_compare_time (blocks=<optimized out>, rows=0, ranges=0, index=<optimized out>, this=0x61b0000395b8) at /data/src/bb-11.0/sql/handler.h:3780
|
#12 cost_group_min_max (table=table@entry=0x61900008b698, index_info=index_info@entry=0x61900008bd58, used_key_parts=used_key_parts@entry=1, group_key_parts=group_key_parts@entry=1, range_tree=range_tree@entry=0x621000111d90, index_tree=<optimized out>, quick_prefix_records=<optimized out>, have_min=<optimized out>, have_max=<optimized out>, read_cost=<optimized out>, out_records=<optimized out>) at /data/src/bb-11.0/sql/opt_range.cc:15287
|
#13 0x000055fbbfc39d1e in get_best_group_min_max (param=param@entry=0x7ffb5d6360e0, tree=tree@entry=0x621000111d90, read_time=<optimized out>) at /data/src/bb-11.0/sql/opt_range.cc:14539
|
#14 0x000055fbbfc43600 in SQL_SELECT::test_quick_select (this=this@entry=0x6290000e9da8, thd=thd@entry=0x62b00007e218, keys_to_use=..., prev_tables=prev_tables@entry=0, limit=limit@entry=18446744073709551615, force_quick_range=force_quick_range@entry=false, ordered_output=<optimized out>, remove_false_parts_of_where=<optimized out>, only_single_index_range_scan=false) at /data/src/bb-11.0/sql/opt_range.cc:3072
|
#15 0x000055fbc01925f9 in get_quick_record_count (thd=<optimized out>, select=select@entry=0x6290000e9da8, table=0x61900008b698, keys=keys@entry=0x62900026c3b0, limit=<optimized out>) at /data/src/bb-11.0/sql/sql_select.cc:5172
|
#16 0x000055fbc02c2a1d in make_join_statistics (join=join@entry=0x6290000e8d10, tables_list=..., keyuse_array=keyuse_array@entry=0x6290000e9068) at /data/src/bb-11.0/sql/sql_select.cc:5929
|
#17 0x000055fbc02dc243 in JOIN::optimize_inner (this=this@entry=0x6290000e8d10) at /data/src/bb-11.0/sql/sql_select.cc:2571
|
#18 0x000055fbc02dcaa5 in JOIN::optimize (this=this@entry=0x6290000e8d10) at /data/src/bb-11.0/sql/sql_select.cc:1899
|
#19 0x000055fbc02de684 in mysql_select (thd=thd@entry=0x62b00007e218, tables=<optimized out>, fields=..., conds=<optimized out>, og_num=<optimized out>, order=<optimized out>, group=<optimized out>, having=<optimized out>, proc_param=<optimized out>, select_options=<optimized out>, result=<optimized out>, unit=<optimized out>, select_lex=<optimized out>) at /data/src/bb-11.0/sql/sql_select.cc:5114
|
#20 0x000055fbc02df433 in handle_select (thd=thd@entry=0x62b00007e218, lex=lex@entry=0x62b000082588, result=result@entry=0x6290000e8ce0, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/bb-11.0/sql/sql_select.cc:609
|
#21 0x000055fbc0061d33 in execute_sqlcom_select (thd=thd@entry=0x62b00007e218, all_tables=<optimized out>) at /data/src/bb-11.0/sql/sql_parse.cc:6263
|
#22 0x000055fbc0094427 in mysql_execute_command (thd=thd@entry=0x62b00007e218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/src/bb-11.0/sql/sql_parse.cc:3947
|
#23 0x000055fbc00a937b in mysql_parse (thd=thd@entry=0x62b00007e218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7ffb5d638a60) at /data/src/bb-11.0/sql/sql_parse.cc:7998
|
#24 0x000055fbc00b1409 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62b00007e218, packet=packet@entry=0x629000253219 "SELECT DISTINCT a FROM tm WHERE a > 50", packet_length=packet_length@entry=38, blocking=blocking@entry=true) at /data/src/bb-11.0/sql/sql_parse.cc:1894
|
#25 0x000055fbc00b9724 in do_command (thd=0x62b00007e218, blocking=blocking@entry=true) at /data/src/bb-11.0/sql/sql_parse.cc:1407
|
#26 0x000055fbc067eb87 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x6080000021b8, put_in_cache=put_in_cache@entry=true) at /data/src/bb-11.0/sql/sql_connect.cc:1415
|
#27 0x000055fbc067f49c in handle_one_connection (arg=arg@entry=0x6080000021b8) at /data/src/bb-11.0/sql/sql_connect.cc:1317
|
#28 0x000055fbc186a2ae in pfs_spawn_thread (arg=0x617000004698) at /data/src/bb-11.0/storage/perfschema/pfs.cc:2201
|
#29 0x00007ffb66c85ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#30 0x00007ffb66872aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Attachments
Issue Links
- is caused by
-
MDEV-26974 Improve selectivity and related costs in optimizer
- Closed