Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.11
-
Can result in unexpected behaviour
-
BsonGet_String and JsonGet_String with a NULL argument resulted in an empty string warning. This now has an "Argument is NULL" warning.
Description
Debug asserts where added in 82fd202fa4c417a0be4f09028dfdc88f8d902130 and the connect UDFs hit his
DBUG_ASSERT(msg[strlen(msg)-1] != '\n');
|
connect.json_udf |
/source/sql/sql_error.cc:753:3: runtime error: addition of unsigned offset to 0x7e187dd3a118 overflowed to 0x7e187dd3a117
|
#0 0x55d9311e8e27 in push_warning(THD*, Sql_state_errno_level::enum_warning_level, unsigned int, char const*) /source/sql/sql_error.cc:753:3
|
#1 0x7bc8763e912c in jsonget_string /source/storage/connect/jsonudf.cpp:3605:4
|
#2 0x55d932bf1fa3 in udf_handler::val_str(String*, String*) /source/sql/item_func.cc:3805:13
|
#3 0x55d932bf46e4 in Item_func_udf_str::val_str(String*) /source/sql/item_func.cc:3953:19
|
#4 0x55d9321a700a in Type_handler::Item_send_str(Item*, Protocol*, st_value*) const /source/sql/sql_type.cc:7668:19
|
#5 0x55d931d42682 in Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const /source/sql/sql_type.h:5548:12
|
#6 0x55d930bd77a0 in Item::send(Protocol*, st_value*) /source/sql/item.h:1272:28
|
#7 0x55d930d534eb in Protocol::send_result_set_row(List<Item>*) /source/sql/protocol.cc:1333:15
|
#8 0x55d931103ba2 in select_send::send_data(List<Item>&) /source/sql/sql_class.cc:3209:17
|
#9 0x55d9318268f1 in select_result_sink::send_data_with_check(List<Item>&, st_select_lex_unit*, unsigned long long) /source/sql/sql_class.h:5990:12
|
#10 0x55d9316c1590 in JOIN::exec_inner() /source/sql/sql_select.cc:4852:22
|
#11 0x55d9316bf377 in JOIN::exec() /source/sql/sql_select.cc:4769:3
|
#12 0x55d9315f890e in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /source/sql/sql_select.cc:5243:9
|
#13 0x55d9315f6393 in handle_select(THD*, LEX*, select_result*, unsigned long long) /source/sql/sql_select.cc:600:10
|
#14 0x55d931427a32 in execute_sqlcom_select(THD*, TABLE_LIST*) /source/sql/sql_parse.cc:6427:12
|
#15 0x55d9313eede3 in mysql_execute_command(THD*, bool) /source/sql/sql_parse.cc:4008:12
|
#16 0x55d9313bedd5 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /source/sql/sql_parse.cc:8180:18
|
#17 0x55d9313acd9a in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /source/sql/sql_parse.cc:1906:7
|
#18 0x55d9313c4c9c in do_command(THD*, bool) /source/sql/sql_parse.cc:1419:17
|
#19 0x55d931dc1f03 in do_handle_one_connection(CONNECT*, bool) /source/sql/sql_connect.cc:1475:11
|
#20 0x55d931dc1217 in handle_one_connection /source/sql/sql_connect.cc:1387:5
|
#21 0x55d9339dbeb1 in pfs_spawn_thread /source/storage/perfschema/pfs.cc:2201:3
|
#22 0x55d930b4b6b6 in asan_thread_start(void*) asan_interceptors.cpp.o
|
#23 0x7fc87e97e1f4 (/lib/x86_64-linux-gnu/libc.so.6+0x891f4) (BuildId: 79005c16293efa45b441fed45f4f29b138557e9e)
|
#24 0x7fc87e9fe89b (/lib/x86_64-linux-gnu/libc.so.6+0x10989b) (BuildId: 79005c16293efa45b441fed45f4f29b138557e9e)
|
connect.bson_udf |
CURRENT_TEST: connect.bson_udf
|
/source/sql/sql_error.cc:753:3: runtime error: addition of unsigned offset to 0x7e31fb4f8918 overflowed to 0x7e31fb4f8917
|
#0 0x557bec391e27 in push_warning(THD*, Sql_state_errno_level::enum_warning_level, unsigned int, char const*) /source/sql/sql_error.cc:753:3
|
#1 0x7be1f40d3bc7 in bsonget_string /source/storage/connect/bsonudf.cpp:3826:4
|
#2 0x557bedd9afa3 in udf_handler::val_str(String*, String*) /source/sql/item_func.cc:3805:13
|
#3 0x557bedd9d6e4 in Item_func_udf_str::val_str(String*) /source/sql/item_func.cc:3953:19
|
#4 0x557bed35000a in Type_handler::Item_send_str(Item*, Protocol*, st_value*) const /source/sql/sql_type.cc:7668:19
|
#5 0x557beceeb682 in Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const /source/sql/sql_type.h:5548:12
|
#6 0x557bebd807a0 in Item::send(Protocol*, st_value*) /source/sql/item.h:1272:28
|
#7 0x557bebefc4eb in Protocol::send_result_set_row(List<Item>*) /source/sql/protocol.cc:1333:15
|
#8 0x557bec2acba2 in select_send::send_data(List<Item>&) /source/sql/sql_class.cc:3209:17
|
#9 0x557bec9cf8f1 in select_result_sink::send_data_with_check(List<Item>&, st_select_lex_unit*, unsigned long long) /source/sql/sql_class.h:5990:12
|
#10 0x557bec86a590 in JOIN::exec_inner() /source/sql/sql_select.cc:4852:22
|
#11 0x557bec868377 in JOIN::exec() /source/sql/sql_select.cc:4769:3
|
#12 0x557bec7a190e in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /source/sql/sql_select.cc:5243:9
|
#13 0x557bec79f393 in handle_select(THD*, LEX*, select_result*, unsigned long long) /source/sql/sql_select.cc:600:10
|
#14 0x557bec5d0a32 in execute_sqlcom_select(THD*, TABLE_LIST*) /source/sql/sql_parse.cc:6427:12
|
#15 0x557bec597de3 in mysql_execute_command(THD*, bool) /source/sql/sql_parse.cc:4008:12
|
#16 0x557bec567dd5 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /source/sql/sql_parse.cc:8180:18
|
#17 0x557bec555d9a in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /source/sql/sql_parse.cc:1906:7
|
#18 0x557bec56dc9c in do_command(THD*, bool) /source/sql/sql_parse.cc:1419:17
|
#19 0x557becf6af03 in do_handle_one_connection(CONNECT*, bool) /source/sql/sql_connect.cc:1475:11
|
#20 0x557becf6a217 in handle_one_connection /source/sql/sql_connect.cc:1387:5
|
#21 0x557beeb84eb1 in pfs_spawn_thread /source/storage/perfschema/pfs.cc:2201:3
|
#22 0x557bebcf46b6 in asan_thread_start(void*) asan_interceptors.cpp.o
|
#23 0x7fe1fc2e11f4 (/lib/x86_64-linux-gnu/libc.so.6+0x891f4) (BuildId: 79005c16293efa45b441fed45f4f29b138557e9e)
|
#24 0x7fe1fc36189b (/lib/x86_64-linux-gnu/libc.so.6+0x10989b) (BuildId: 79005c16293efa45b441fed45f4f29b138557e9e)
|
rr |
Thread 2 hit Breakpoint 1, push_warning (thd=0x7e5256e5e218, level=Sql_state_errno_level::WARN_LEVEL_WARN, code=1105, msg=0x7df25716b918 "")
|
at /source/sql/sql_error.cc:753
|
753 DBUG_ASSERT(msg[strlen(msg)-1] != '\n');
|
(rr) p msg
|
$1 = 0x7df25716b918 ""
|
(rr) up
|
#1 0x00007ba24f7db12d in jsonget_string (initid=0x7e7256e44c58, args=0x7e7256e44c18, result=0x7ba24601e8f8 "mysql.event", res_length=0x7ba245cf2430,
|
is_null=0x7ba245cf2420 "") at /source/storage/connect/jsonudf.cpp:3605
|
3605 PUSH_WARNING(g->Message);
|
(rr) bt
|
#0 push_warning (thd=0x7e5256e5e218, level=Sql_state_errno_level::WARN_LEVEL_WARN, code=1105, msg=0x7df25716b918 "") at /source/sql/sql_error.cc:753
|
#1 0x00007ba24f7db12d in jsonget_string (initid=0x7e7256e44c58, args=0x7e7256e44c18, result=0x7ba24601e8f8 "mysql.event", res_length=0x7ba245cf2430,
|
is_null=0x7ba245cf2420 "") at /source/storage/connect/jsonudf.cpp:3605
|
#2 0x000056328924bfa4 in udf_handler::val_str (this=0x7e7256e44c08, str=0x7ba24601e890, save_str=0x7e7256e44b88) at /source/sql/item_func.cc:3805
|
#3 0x000056328924e6e5 in Item_func_udf_str::val_str (this=0x7e7256e44b60, str=0x7ba24601e890) at /source/sql/item_func.cc:3953
|
#4 0x000056328880100b in Type_handler::Item_send_str (this=0x5632902c9a20 <type_handler_varchar>, item=0x7e7256e44b60, protocol=0x7e5256e5e830,
|
buf=0x7ba24601e860) at /source/sql/sql_type.cc:7668
|
#5 0x000056328839c683 in Type_handler_string_result::Item_send (this=0x5632902c9a20 <type_handler_varchar>, item=0x7e7256e44b60, protocol=0x7e5256e5e830,
|
buf=0x7ba24601e860) at /source/sql/sql_type.h:5548
|
#6 0x00005632872317a1 in Item::send (this=0x7e7256e44b60, protocol=0x7e5256e5e830, buffer=0x7ba24601e860) at /source/sql/item.h:1272
|
#7 0x00005632873ad4ec in Protocol::send_result_set_row (this=0x7e5256e5e830, row_items=0x7e7256e447a8) at /source/sql/protocol.cc:1333
|
#8 0x000056328775dba3 in select_send::send_data (this=0x7e7256e45618, items=...) at /source/sql/sql_class.cc:3209
|
#9 0x0000563287e808f2 in select_result_sink::send_data_with_check (this=0x7e7256e45618, items=..., u=0x7e5256e626e0, sent=0) at /source/sql/sql_class.h:5990
|
#10 0x0000563287d1b591 in JOIN::exec_inner (this=0x7e7256e45648) at /source/sql/sql_select.cc:4852
|
#11 0x0000563287d19378 in JOIN::exec (this=0x7e7256e45648) at /source/sql/sql_select.cc:4769
|
#12 0x0000563287c5290f in mysql_select (thd=0x7e5256e5e218, tables=0x0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0,
|
select_options=2164525824, result=0x7e7256e45618, unit=0x7e5256e626e0, select_lex=0x7e7256e444f0) at /source/sql/sql_select.cc:5243
|
#13 0x0000563287c50394 in handle_select (thd=0x7e5256e5e218, lex=0x7e5256e62608, result=0x7e7256e45618, setup_tables_done_option=0)
|
at /source/sql/sql_select.cc:600
|
#14 0x0000563287a81a33 in execute_sqlcom_select (thd=0x7e5256e5e218, all_tables=0x0) at /source/sql/sql_parse.cc:6427
|
#15 0x0000563287a48de4 in mysql_execute_command (thd=0x7e5256e5e218, is_called_from_prepared_stmt=false) at /source/sql/sql_parse.cc:4008
|
#16 0x0000563287a18dd6 in mysql_parse (thd=0x7e5256e5e218, rawbuf=0x7e7256e44438 "SELECT JsonGet_String(NULL json_, NULL)", length=39,
|
parser_state=0x7ba2462587b0) at /source/sql/sql_parse.cc:8180
|
#17 0x0000563287a06d9b in dispatch_command (command=COM_QUERY, thd=0x7e5256e5e218, packet=0x7e325702e219 "", packet_length=39, blocking=true)
|
at /source/sql/sql_parse.cc:1906
|
#18 0x0000563287a1ec9d in do_command (thd=0x7e5256e5e218, blocking=true) at /source/sql/sql_parse.cc:1419
|
#19 0x000056328841bf04 in do_handle_one_connection (connect=0x7c2256de3e38, put_in_cache=true) at /source/sql/sql_connect.cc:1475
|
#20 0x000056328841b218 in handle_one_connection (arg=0x7c2256de3db8) at /source/sql/sql_connect.cc:1387
|
#21 0x000056328a035eb2 in pfs_spawn_thread (arg=0x7d1256de5b98) at /source/storage/perfschema/pfs.cc:2201
|
#22 0x00005632871a56b7 in asan_thread_start(void*) ()
|
#23 0x00007fa257f781f5 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
|
JSNX::ParseJpath and and JSNX::SetJpath, mostly likely BJNX::SetJpath and BJNX::ParseJpath too, fail to set an error message in PGLOBAL g before returning true
Attachments
Issue Links
- blocks
-
MDBF-1115 create UBASAN Debug builder
-
- Verified
-
- relates to
-
MDEV-36386 view-protocol: connect tests connect.ini connect.bson_udf connect.json_udf connect.csv connect.json_udf_bin connect.grant
-
- Open
-