Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.5, 10.6, 10.7(EOL), 10.8(EOL)
-
None
Description
Set to Minor because it's a debug-only assertion upon a test case with a degenerate optimizer_max_sel_arg_weight value. If it turns out to be scalable to realistic values and/or can affect non-debug builds, please adjust the priority accordingly.
CREATE TABLE t (pk INT, a int, b char(1), key (a), key(b), primary key (pk)); |
INSERT INTO t VALUES (1,100,'s'),(2,200,'x'),(3,300,'c'),(4,400,'v'); |
|
SET optimizer_max_sel_arg_weight= 1, optimizer_trace= 'enabled=on'; |
|
SELECT * FROM t WHERE a BETWEEN 7 AND 100 AND b BETWEEN 'a' AND 'z' OR a = 1 OR pk > 8 AND pk < 10; |
|
# Cleanup
|
DROP TABLE t; |
mariadbd: /data/src/10.5/sql/my_json_writer.cc:42: void Json_writer::on_start_object(): Assertion `got_name == named_item_expected()' failed.
|
220217 21:53:25 [ERROR] mysqld got signal 6 ;
|
|
#6 0x00007f59973ae40f in __assert_fail_base (fmt=0x7f5997517128 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55ac9a4f82f8 "got_name == named_item_expected()", file=0x55ac9a4f8320 "/data/src/10.5/sql/my_json_writer.cc", line=42, function=<optimized out>) at assert.c:92
|
#7 0x00007f59973bd662 in __GI___assert_fail (assertion=0x55ac9a4f82f8 "got_name == named_item_expected()", file=0x55ac9a4f8320 "/data/src/10.5/sql/my_json_writer.cc", line=42, function=0x55ac9a4f8348 "void Json_writer::on_start_object()") at assert.c:101
|
#8 0x000055ac9992de3c in Json_writer::on_start_object (this=0x7f5980214d30) at /data/src/10.5/sql/my_json_writer.cc:42
|
#9 0x000055ac9992c3e0 in Json_writer::start_object (this=0x7f5980214d30) at /data/src/10.5/sql/my_json_writer.cc:51
|
#10 0x000055ac99617940 in Json_writer_object::Json_writer_object (this=0x7f5991d78460, writer=0x7f5980214d30, str=0x0) at /data/src/10.5/sql/my_json_writer.h:443
|
#11 0x000055ac996179a0 in Json_writer_object::Json_writer_object (this=0x7f5991d78460, thd=0x7f5980000db8, str=0x0) at /data/src/10.5/sql/my_json_writer.h:448
|
#12 0x000055ac99c19846 in enforce_sel_arg_weight_limit (param=0x7f5991d78a30, keyno=1, sel_arg=0x0) at /data/src/10.5/sql/opt_range.cc:10981
|
#13 0x000055ac99c1801d in key_or_with_limit (param=0x7f5991d78a30, keyno=1, key1=0x7f598005fe18, key2=0x7f59800601a0) at /data/src/10.5/sql/opt_range.cc:10124
|
#14 0x000055ac99c0b4af in merge_same_index_scans (param=0x7f5991d78a30, imerge=0x7f5980060830, imerge_trp=0x7f5980060f68, read_time=4.8097656249999998) at /data/src/10.5/sql/opt_range.cc:5488
|
#15 0x000055ac99c0a9bb in get_best_disjunct_quick (param=0x7f5991d78a30, imerge=0x7f5980060830, read_time=1.9557096888490462, named_trace=false) at /data/src/10.5/sql/opt_range.cc:5307
|
#16 0x000055ac99c050a5 in SQL_SELECT::test_quick_select (this=0x7f598001a930, thd=0x7f5980000db8, keys_to_use=..., prev_tables=0, limit=18446744073709551615, force_quick_range=false, ordered_output=false, remove_false_parts_of_where=true, only_single_index_range_scan=false) at /data/src/10.5/sql/opt_range.cc:3002
|
#17 0x000055ac9975e3c1 in get_quick_record_count (thd=0x7f5980000db8, select=0x7f598001a930, table=0x7f5980202678, keys=0x7f5980019610, limit=18446744073709551615) at /data/src/10.5/sql/sql_select.cc:4839
|
#18 0x000055ac99760d20 in make_join_statistics (join=0x7f5980018260, tables_list=..., keyuse_array=0x7f5980018550) at /data/src/10.5/sql/sql_select.cc:5566
|
#19 0x000055ac997551f8 in JOIN::optimize_inner (this=0x7f5980018260) at /data/src/10.5/sql/sql_select.cc:2311
|
#20 0x000055ac99752c69 in JOIN::optimize (this=0x7f5980018260) at /data/src/10.5/sql/sql_select.cc:1669
|
#21 0x000055ac9975e0ac in mysql_select (thd=0x7f5980000db8, tables=0x7f5980015a38, fields=..., conds=0x7f5980016e78, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f5980018238, unit=0x7f5980004f60, select_lex=0x7f5980015428) at /data/src/10.5/sql/sql_select.cc:4781
|
#22 0x000055ac9974dafd in handle_select (thd=0x7f5980000db8, lex=0x7f5980004e98, result=0x7f5980018238, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:444
|
#23 0x000055ac99710a7a in execute_sqlcom_select (thd=0x7f5980000db8, all_tables=0x7f5980015a38) at /data/src/10.5/sql/sql_parse.cc:6314
|
#24 0x000055ac99707d99 in mysql_execute_command (thd=0x7f5980000db8) at /data/src/10.5/sql/sql_parse.cc:4005
|
#25 0x000055ac9971585b in mysql_parse (thd=0x7f5980000db8, rawbuf=0x7f5980015300 "SELECT * FROM t WHERE a BETWEEN 7 AND 100 AND b BETWEEN 'a' AND 'z' OR a = 1 OR pk > 8 AND pk < 10", length=98, parser_state=0x7f5991d7a510, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8100
|
#26 0x000055ac9970196c in dispatch_command (command=COM_QUERY, thd=0x7f5980000db8, packet=0x7f598000b5b9 "SELECT * FROM t WHERE a BETWEEN 7 AND 100 AND b BETWEEN 'a' AND 'z' OR a = 1 OR pk > 8 AND pk < 10", packet_length=98, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1891
|
#27 0x000055ac99700185 in do_command (thd=0x7f5980000db8) at /data/src/10.5/sql/sql_parse.cc:1370
|
#28 0x000055ac998ac953 in do_handle_one_connection (connect=0x55ac9c5d7088, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1418
|
#29 0x000055ac998ac615 in handle_one_connection (arg=0x55ac9c5713b8) at /data/src/10.5/sql/sql_connect.cc:1312
|
#30 0x000055ac99dbb4a8 in pfs_spawn_thread (arg=0x55ac9c5d6cc8) at /data/src/10.5/storage/perfschema/pfs.cc:2201
|
#31 0x00007f5997889ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#32 0x00007f5997486def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Reproducible on 10.5+.
The test case is not applicable to 10.4 due to the use of optimizer_max_sel_arg_weight.
Attachments
Issue Links
- relates to
-
MDEV-27204 [ERROR] Json_writer: a member name was expected, Assertion `got_name == named_item_expected()' failed
- Closed
-
MDEV-27238 Assertion `got_name == named_item_expected()' failed in Json_writer::on_start_object on JSON-less testcase using optimizer_trace
- Closed
-
MDEV-28598 Assertion `got_name == named_item_expected()' failed in Json_writer::on_start_object
- In Review