Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25375

Assertion `0' failed in json_find_path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
    • Fix Version/s: 10.2, 10.3, 10.4, 10.5
    • Component/s: JSON
    • Labels:
      None

      Description

      SET collation_connection='ucs2_bin';
      SELECT json_value ('[{"foo": 1},"bar"]','$[*][0]');
      

      Leads to:

      10.6.0 8dd35a2507f8d63ca8df9335d2c6072d5c0e3b86 (Debug)

      mysqld: /test/10.6_dbg/strings/json_lib.c:1380: json_find_path: Assertion `0' failed.
      

      10.6.0 8dd35a2507f8d63ca8df9335d2c6072d5c0e3b86 (Debug)

      Core was generated by `/test/MD160321-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x1536c41f4700 (LWP 347904))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000561cb1e3dd0b in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x0000561cb15d5313 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:331
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00001536d9657859 in __GI_abort () at abort.c:79
      #6  0x00001536d9657729 in __assert_fail_base (fmt=0x1536d97ed588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561cb215a4ac "0", file=0x561cb251bb40 "/test/10.6_dbg/strings/json_lib.c", line=1380, function=<optimized out>) at assert.c:92
      #7  0x00001536d9668f36 in __GI___assert_fail (assertion=assertion@entry=0x561cb215a4ac "0", file=file@entry=0x561cb251bb40 "/test/10.6_dbg/strings/json_lib.c", line=line@entry=1380, function=function@entry=0x561cb251abe8 <__PRETTY_FUNCTION__.15323> "json_find_path") at assert.c:101
      #8  0x0000561cb1e9581b in json_find_path (je=je@entry=0x1536c41f21b0, p=p@entry=0x153688014448, p_cur_step=p_cur_step@entry=0x153688014890, array_counters=array_counters@entry=0x1536c41f2130) at /test/10.6_dbg/strings/json_lib.c:1380
      #9  0x0000561cb1810838 in Json_path_extractor::extract (this=this@entry=0x153688014440, str=str@entry=0x1536c41f23e0, item_js=<optimized out>, item_jp=0x153688014298, cs=0x561cb28ae020 <my_charset_ucs2_bin>) at /test/10.6_dbg/sql/item_jsonfunc.cc:488
      #10 0x0000561cb181a3fc in Item_func_json_value::val_str (this=0x153688014378, to=0x1536c41f23e0) at /test/10.6_dbg/sql/item_jsonfunc.h:147
      #11 0x0000561cb1507e54 in Type_handler::Item_send_str (this=<optimized out>, item=0x153688014378, protocol=0x1536880013a0, buf=<optimized out>) at /test/10.6_dbg/sql/sql_type.cc:7359
      #12 0x0000561cb14567bb in Type_handler_string_result::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /test/10.6_dbg/sql/sql_type.h:5360
      #13 0x0000561cb1214cc0 in Item::send (this=0x153688014378, protocol=0x1536880013a0, buffer=0x1536c41f23b0) at /test/10.6_dbg/sql/item.h:1066
      #14 0x0000561cb12123ca in Protocol::send_result_set_row (this=this@entry=0x1536880013a0, row_items=row_items@entry=0x153688013db8) at /test/10.6_dbg/sql/protocol.cc:1331
      #15 0x0000561cb12a886b in select_send::send_data (this=0x1536880151d0, items=@0x153688013db8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1536880148d8, last = 0x1536880148d8, elements = 1}, <No data fields>}) at /test/10.6_dbg/sql/sql_class.cc:3020
      #16 0x0000561cb13974e3 in select_result_sink::send_data_with_check (sent=0, u=<optimized out>, items=<optimized out>, this=<optimized out>) at /test/10.6_dbg/sql/sql_class.h:5554
      #17 JOIN::exec_inner (this=this@entry=0x1536880151f8) at /test/10.6_dbg/sql/sql_select.cc:4345
      #18 0x0000561cb1398540 in JOIN::exec (this=this@entry=0x1536880151f8) at /test/10.6_dbg/sql/sql_select.cc:4257
      #19 0x0000561cb1396619 in mysql_select (thd=thd@entry=0x153688000db8, tables=0x0, fields=@0x153688013db8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1536880148d8, last = 0x1536880148d8, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x1536880151d0, unit=0x153688004f90, select_lex=0x153688013c68) at /test/10.6_dbg/sql/sql_select.cc:4733
      #20 0x0000561cb13968df in handle_select (thd=thd@entry=0x153688000db8, lex=lex@entry=0x153688004ec8, result=result@entry=0x1536880151d0, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_select.cc:417
      #21 0x0000561cb130b434 in execute_sqlcom_select (thd=thd@entry=0x153688000db8, all_tables=0x0) at /test/10.6_dbg/sql/sql_parse.cc:6230
      #22 0x0000561cb1318046 in mysql_execute_command (thd=thd@entry=0x153688000db8) at /test/10.6_dbg/sql/sql_parse.cc:3926
      #23 0x0000561cb1304876 in mysql_parse (thd=thd@entry=0x153688000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1536c41f3410) at /test/10.6_dbg/sql/sql_parse.cc:7998
      #24 0x0000561cb13131e7 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153688000db8, packet=packet@entry=0x15368800b359 "", packet_length=packet_length@entry=50, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1318
      #25 0x0000561cb13165c1 in do_command (thd=0x153688000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1397
      #26 0x0000561cb146e178 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x561cb4c592d8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #27 0x0000561cb146e77d in handle_one_connection (arg=arg@entry=0x561cb4c592d8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #28 0x0000561cb1919a5b in pfs_spawn_thread (arg=0x561cb4b7da58) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #29 0x00001536d9b65609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #30 0x00001536d9754293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.10 031b3dfc22c3d37769d49da902401b26a24f12b4 (Debug)

      mysqld: /test/10.5_dbg/strings/json_lib.c:1380: json_find_path: Assertion `0' failed.
      

      10.5.10 031b3dfc22c3d37769d49da902401b26a24f12b4 (Debug)

      Core was generated by `/test/MD160321-mariadb-10.5.10-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x148a080ca700 (LWP 354180))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055a9a328cf45 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x000055a9a29cfadf in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:331
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000148a0971e859 in __GI_abort () at abort.c:79
      #6  0x0000148a0971e729 in __assert_fail_base (fmt=0x148a098b4588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55a9a35a91d6 "0", file=0x55a9a396f8c0 "/test/10.5_dbg/strings/json_lib.c", line=1380, function=<optimized out>) at assert.c:92
      #7  0x0000148a0972ff36 in __GI___assert_fail (assertion=assertion@entry=0x55a9a35a91d6 "0", file=file@entry=0x55a9a396f8c0 "/test/10.5_dbg/strings/json_lib.c", line=line@entry=1380, function=function@entry=0x55a9a396e968 <__PRETTY_FUNCTION__.15323> "json_find_path") at assert.c:101
      #8  0x000055a9a32e5a9e in json_find_path (je=je@entry=0x148a080c8130, p=p@entry=0x1489b8014588, p_cur_step=p_cur_step@entry=0x1489b80149d0, array_counters=array_counters@entry=0x148a080c80b0) at /test/10.5_dbg/strings/json_lib.c:1380
      #9  0x000055a9a2c0f45c in Json_path_extractor::extract (this=this@entry=0x1489b8014580, str=str@entry=0x148a080c8360, item_js=<optimized out>, item_jp=0x1489b80143d8, cs=0x55a9a3d02f00 <my_charset_ucs2_bin>) at /test/10.5_dbg/sql/item_jsonfunc.cc:488
      #10 0x000055a9a2c19020 in Item_func_json_value::val_str (this=0x1489b80144b8, to=0x148a080c8360) at /test/10.5_dbg/sql/item_jsonfunc.h:147
      #11 0x000055a9a2902086 in Type_handler::Item_send_str (this=<optimized out>, item=0x1489b80144b8, protocol=0x1489b8001390, buf=<optimized out>) at /test/10.5_dbg/sql/sql_type.cc:7359
      #12 0x000055a9a284ca35 in Type_handler_string_result::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /test/10.5_dbg/sql/sql_type.h:5360
      #13 0x000055a9a260426a in Item::send (this=0x1489b80144b8, protocol=0x1489b8001390, buffer=0x148a080c8330) at /test/10.5_dbg/sql/item.h:1066
      #14 0x000055a9a2601786 in Protocol::send_result_set_row (this=this@entry=0x1489b8001390, row_items=row_items@entry=0x1489b8013ef8) at /test/10.5_dbg/sql/protocol.cc:1085
      #15 0x000055a9a269b60b in select_send::send_data (this=0x1489b8015310, items=@0x1489b8013ef8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1489b8014a18, last = 0x1489b8014a18, elements = 1}, <No data fields>}) at /test/10.5_dbg/sql/sql_class.cc:3018
      #16 0x000055a9a278d17b in select_result_sink::send_data_with_check (sent=0, u=<optimized out>, items=<optimized out>, this=<optimized out>) at /test/10.5_dbg/sql/sql_class.h:5328
      #17 JOIN::exec_inner (this=this@entry=0x1489b8015338) at /test/10.5_dbg/sql/sql_select.cc:4335
      #18 0x000055a9a278e1d8 in JOIN::exec (this=this@entry=0x1489b8015338) at /test/10.5_dbg/sql/sql_select.cc:4247
      #19 0x000055a9a278c2b1 in mysql_select (thd=thd@entry=0x1489b8000db8, tables=0x0, fields=@0x1489b8013ef8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1489b8014a18, last = 0x1489b8014a18, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x1489b8015310, unit=0x1489b8004f68, select_lex=0x1489b8013da8) at /test/10.5_dbg/sql/sql_select.cc:4723
      #20 0x000055a9a278c577 in handle_select (thd=thd@entry=0x1489b8000db8, lex=lex@entry=0x1489b8004ea0, result=result@entry=0x1489b8015310, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:417
      #21 0x000055a9a26ff4cd in execute_sqlcom_select (thd=thd@entry=0x1489b8000db8, all_tables=0x0) at /test/10.5_dbg/sql/sql_parse.cc:6308
      #22 0x000055a9a270c657 in mysql_execute_command (thd=thd@entry=0x1489b8000db8) at /test/10.5_dbg/sql/sql_parse.cc:4004
      #23 0x000055a9a26f8611 in mysql_parse (thd=thd@entry=0x1489b8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x148a080c93d0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:8089
      #24 0x000055a9a27074d0 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1489b8000db8, packet=packet@entry=0x1489b800b499 "", packet_length=packet_length@entry=50, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1257
      #25 0x000055a9a270ac33 in do_command (thd=0x1489b8000db8) at /test/10.5_dbg/sql/sql_parse.cc:1370
      #26 0x000055a9a28651dd in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55a9a63e5e78, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410
      #27 0x000055a9a28658e1 in handle_one_connection (arg=arg@entry=0x55a9a63e5e78) at /test/10.5_dbg/sql/sql_connect.cc:1312
      #28 0x000055a9a2d1d1b9 in pfs_spawn_thread (arg=0x55a9a632e1e8) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #29 0x0000148a09c2c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #30 0x0000148a0981b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.19 1ea6ac3c953f847da033254d5df67f57987a1884 (Debug)

      mysqld: /test/10.4_dbg/strings/json_lib.c:1365: json_find_path: Assertion `0' failed.
      

      10.4.19 1ea6ac3c953f847da033254d5df67f57987a1884 (Debug)

      Core was generated by `/test/MD160321-mariadb-10.4.19-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14a5080e5700 (LWP 355791))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000560c312a8b25 in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:386
      #2  0x0000560c309a92e6 in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:344
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014a509ae4859 in __GI_abort () at abort.c:79
      #6  0x000014a509ae4729 in __assert_fail_base (fmt=0x14a509c7a588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x560c31517304 "0", file=0x560c318b7c40 "/test/10.4_dbg/strings/json_lib.c", line=1365, function=<optimized out>) at assert.c:92
      #7  0x000014a509af5f36 in __GI___assert_fail (assertion=assertion@entry=0x560c31517304 "0", file=file@entry=0x560c318b7c40 "/test/10.4_dbg/strings/json_lib.c", line=line@entry=1365, function=function@entry=0x560c318b6ce8 <__PRETTY_FUNCTION__.15133> "json_find_path") at assert.c:101
      #8  0x0000560c313080d6 in json_find_path (je=je@entry=0x14a5080e1eb0, p=p@entry=0x14a4a0013ab0, p_cur_step=p_cur_step@entry=0x14a4a0013ef8, array_counters=array_counters@entry=0x14a5080e1e30) at /test/10.4_dbg/strings/json_lib.c:1365
      #9  0x0000560c30bd2233 in Item_func_json_value::val_str (this=0x14a4a00139f0, str=0x14a5080e20a0) at /test/10.4_dbg/sql/item_jsonfunc.cc:480
      #10 0x0000560c308b5e9e in Type_handler::Item_send_str (this=<optimized out>, item=0x14a4a00139f0, protocol=0x14a4a0001368, buf=<optimized out>) at /test/10.4_dbg/sql/sql_type.cc:6980
      #11 0x0000560c308beddf in Type_handler_string_result::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /test/10.4_dbg/sql/sql_type.h:4859
      #12 0x0000560c305dcce0 in Item::send (this=0x14a4a00139f0, protocol=0x14a4a0001368, buffer=0x14a5080e2070) at /test/10.4_dbg/sql/item.h:1042
      #13 0x0000560c305daaa8 in Protocol::send_result_set_row (this=this@entry=0x14a4a0001368, row_items=row_items@entry=0x14a4a0013438) at /test/10.4_dbg/sql/protocol.cc:1037
      #14 0x0000560c30673e41 in select_send::send_data (this=0x14a4a0014828, items=@0x14a4a0013438: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14a4a0013f40, last = 0x14a4a0013f40, elements = 1}, <No data fields>}) at /test/10.4_dbg/sql/sql_class.cc:3007
      #15 0x0000560c3075a0ab in JOIN::exec_inner (this=this@entry=0x14a4a0014850) at /test/10.4_dbg/sql/sql_select.cc:4365
      #16 0x0000560c3075b0b6 in JOIN::exec (this=this@entry=0x14a4a0014850) at /test/10.4_dbg/sql/sql_select.cc:4269
      #17 0x0000560c307591d6 in mysql_select (thd=thd@entry=0x14a4a0000d90, tables=0x0, wild_num=0, fields=@0x14a4a0013438: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14a4a0013f40, last = 0x14a4a0013f40, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x14a4a0014828, unit=0x14a4a0004cc8, select_lex=0x14a4a00132f0) at /test/10.4_dbg/sql/sql_select.cc:4707
      #18 0x0000560c307594ff in handle_select (thd=thd@entry=0x14a4a0000d90, lex=lex@entry=0x14a4a0004c08, result=result@entry=0x14a4a0014828, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.4_dbg/sql/sql_select.cc:410
      #19 0x0000560c306cadf2 in execute_sqlcom_select (thd=thd@entry=0x14a4a0000d90, all_tables=0x0) at /test/10.4_dbg/sql/sql_parse.cc:6444
      #20 0x0000560c306d5fc1 in mysql_execute_command (thd=thd@entry=0x14a4a0000d90) at /test/10.4_dbg/sql/sql_parse.cc:3963
      #21 0x0000560c306e0ebb in mysql_parse (thd=thd@entry=0x14a4a0000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14a5080e4490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7985
      #22 0x0000560c306e3719 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14a4a0000d90, packet=packet@entry=0x14a4a001a351 "", packet_length=packet_length@entry=50, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1170
      #23 0x0000560c306e6f4e in do_command (thd=0x14a4a0000d90) at /test/10.4_dbg/sql/sql_parse.cc:1373
      #24 0x0000560c3081f726 in do_handle_one_connection (connect=connect@entry=0x560c33daa260) at /test/10.4_dbg/sql/sql_connect.cc:1412
      #25 0x0000560c3081f845 in handle_one_connection (arg=0x560c33daa260) at /test/10.4_dbg/sql/sql_connect.cc:1316
      #26 0x000014a50a0a1609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x000014a509be1293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.3.29 eb7c5530eccb7d6782077e5562f5a471d2ccbc01 (Debug)

      mysqld: /test/10.3_dbg/strings/json_lib.c:1365: json_find_path: Assertion `0' failed.
      

      10.3.29 eb7c5530eccb7d6782077e5562f5a471d2ccbc01 (Debug)

      Core was generated by `/test/MD160321-mariadb-10.3.29-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x151eb8136700 (LWP 355723))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005587631bdb86 in my_write_core (sig=sig@entry=6) at /test/10.3_dbg/mysys/stacktrace.c:386
      #2  0x0000558762968b91 in handle_fatal_signal (sig=6) at /test/10.3_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000151ecdbbd859 in __GI_abort () at abort.c:79
      #6  0x0000151ecdbbd729 in __assert_fail_base (fmt=0x151ecdd53588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5587633e210a "0", file=0x55876376e960 "/test/10.3_dbg/strings/json_lib.c", line=1365, function=<optimized out>) at assert.c:92
      #7  0x0000151ecdbcef36 in __GI___assert_fail (assertion=assertion@entry=0x5587633e210a "0", file=file@entry=0x55876376e960 "/test/10.3_dbg/strings/json_lib.c", line=line@entry=1365, function=function@entry=0x55876376da18 <__PRETTY_FUNCTION__.15057> "json_find_path") at assert.c:101
      #8  0x000055876320e66e in json_find_path (je=je@entry=0x151eb81330a0, p=p@entry=0x151e64011988, p_cur_step=p_cur_step@entry=0x151e64011dd0, array_counters=array_counters@entry=0x151eb8133020) at /test/10.3_dbg/strings/json_lib.c:1365
      #9  0x0000558762b62218 in Item_func_json_value::val_str (this=0x151e640118c8, str=0x151eb8133290) at /test/10.3_dbg/sql/item_jsonfunc.cc:486
      #10 0x000055876288ef40 in Type_handler::Item_send_str (this=<optimized out>, item=0x151e640118c8, protocol=0x151e64001348, buf=<optimized out>) at /test/10.3_dbg/sql/sql_type.cc:5408
      #11 0x0000558762892c03 in Type_handler_string_result::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /test/10.3_dbg/sql/sql_type.h:2270
      #12 0x00005587625f52b8 in Item::send (this=0x151e640118c8, protocol=0x151e64001348, buffer=0x151eb8133260) at /test/10.3_dbg/sql/item.h:884
      #13 0x00005587625f2bee in Protocol::send_result_set_row (this=this@entry=0x151e64001348, row_items=row_items@entry=0x151e64005508) at /test/10.3_dbg/sql/protocol.cc:999
      #14 0x0000558762685869 in select_send::send_data (this=0x151e64011ee8, items=@0x151e64005508: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x151e64011e18, last = 0x151e64011e18, elements = 1}, <No data fields>}) at /test/10.3_dbg/sql/sql_class.cc:2945
      #15 0x00005587627571e7 in JOIN::exec_inner (this=this@entry=0x151e64011f10) at /test/10.3_dbg/sql/sql_select.cc:4010
      #16 0x0000558762757fbe in JOIN::exec (this=this@entry=0x151e64011f10) at /test/10.3_dbg/sql/sql_select.cc:3919
      #17 0x00005587627589f9 in mysql_select (thd=thd@entry=0x151e64000d90, tables=0x0, wild_num=0, fields=@0x151e64005508: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x151e64011e18, last = 0x151e64011e18, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x151e64011ee8, unit=0x151e64004c58, select_lex=0x151e640053e0) at /test/10.3_dbg/sql/sql_select.cc:4327
      #18 0x0000558762758ca8 in handle_select (thd=thd@entry=0x151e64000d90, lex=lex@entry=0x151e64004b98, result=result@entry=0x151e64011ee8, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.3_dbg/sql/sql_select.cc:370
      #19 0x00005587626d1555 in execute_sqlcom_select (thd=thd@entry=0x151e64000d90, all_tables=0x0) at /test/10.3_dbg/sql/sql_parse.cc:6343
      #20 0x00005587626dc360 in mysql_execute_command (thd=thd@entry=0x151e64000d90) at /test/10.3_dbg/sql/sql_parse.cc:3874
      #21 0x00005587626e64c4 in mysql_parse (thd=thd@entry=0x151e64000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x151eb8135540, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.3_dbg/sql/sql_parse.cc:7867
      #22 0x00005587626e8c32 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151e64000d90, packet=packet@entry=0x151e640198f1 "", packet_length=packet_length@entry=50, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.3_dbg/sql/sql_class.h:1139
      #23 0x00005587626ebddf in do_command (thd=0x151e64000d90) at /test/10.3_dbg/sql/sql_parse.cc:1398
      #24 0x00005587628117db in do_handle_one_connection (connect=connect@entry=0x55876558acd0) at /test/10.3_dbg/sql/sql_connect.cc:1403
      #25 0x0000558762811a12 in handle_one_connection (arg=0x55876558acd0) at /test/10.3_dbg/sql/sql_connect.cc:1308
      #26 0x0000151ece0c3609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x0000151ecdcba293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.2.38 (Debug)

      mysqld: /test/10.2_dbg/strings/json_lib.c:1360: json_find_path: Assertion `0' failed.
      

      10.2.38 (Debug)

      Core was generated by `/test/MD160321-mariadb-10.2.38-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14dba27da700 (LWP 355537))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000559548b43f9a in my_write_core (sig=sig@entry=6) at /test/10.2_dbg/mysys/stacktrace.c:382
      #2  0x000055954842a043 in handle_fatal_signal (sig=6) at /test/10.2_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014dbc988f859 in __GI_abort () at abort.c:79
      #6  0x000014dbc988f729 in __assert_fail_base (fmt=0x14dbc9a25588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x559548cc58d6 "0", file=0x559549043d80 "/test/10.2_dbg/strings/json_lib.c", line=1360, function=<optimized out>) at assert.c:92
      #7  0x000014dbc98a0f36 in __GI___assert_fail (assertion=assertion@entry=0x559548cc58d6 "0", file=file@entry=0x559549043d80 "/test/10.2_dbg/strings/json_lib.c", line=line@entry=1360, function=function@entry=0x559549042e38 <__PRETTY_FUNCTION__.14964> "json_find_path") at assert.c:101
      #8  0x0000559548b93406 in json_find_path (je=je@entry=0x14dba27d7260, p=p@entry=0x14db600115a8, p_cur_step=p_cur_step@entry=0x14db600119f0, array_counters=array_counters@entry=0x14dba27d71e0) at /test/10.2_dbg/strings/json_lib.c:1360
      #9  0x00005595485f3468 in Item_func_json_value::val_str (this=0x14db600114e8, str=0x14dba27d73f0) at /test/10.2_dbg/sql/item_jsonfunc.cc:486
      #10 0x0000559548440351 in Item::send (this=0x14db600114e8, protocol=0x14db60001348, buffer=0x14dba27d73f0) at /test/10.2_dbg/sql/item.cc:6898
      #11 0x000055954816b07c in Protocol::send_result_set_row (this=this@entry=0x14db60001348, row_items=row_items@entry=0x14db600051f0) at /test/10.2_dbg/sql/protocol.cc:992
      #12 0x00005595481e8e19 in select_send::send_data (this=0x14db60011b08, items=@0x14db600051f0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14db60011a38, last = 0x14db60011a38, elements = 1}, <No data fields>}) at /test/10.2_dbg/sql/sql_class.cc:2734
      #13 0x0000559548291ffa in JOIN::exec_inner (this=this@entry=0x14db60011b28) at /test/10.2_dbg/sql/sql_select.cc:3534
      #14 0x0000559548292c58 in JOIN::exec (this=this@entry=0x14db60011b28) at /test/10.2_dbg/sql/sql_select.cc:3437
      #15 0x000055954829364e in mysql_select (thd=thd@entry=0x14db60000d90, tables=0x0, wild_num=0, fields=@0x14db600051f0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14db60011a38, last = 0x14db60011a38, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x14db60011b08, unit=0x14db60004988, select_lex=0x14db600050c8) at /test/10.2_dbg/sql/sql_select.cc:3840
      #16 0x00005595482938e3 in handle_select (thd=thd@entry=0x14db60000d90, lex=lex@entry=0x14db600048c8, result=result@entry=0x14db60011b08, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.2_dbg/sql/sql_select.cc:361
      #17 0x00005595482197fd in execute_sqlcom_select (thd=thd@entry=0x14db60000d90, all_tables=0x0) at /test/10.2_dbg/sql/sql_parse.cc:6275
      #18 0x000055954822394e in mysql_execute_command (thd=thd@entry=0x14db60000d90) at /test/10.2_dbg/sql/sql_parse.cc:3586
      #19 0x000055954822ce33 in mysql_parse (thd=thd@entry=0x14db60000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14dba27d9550, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_parse.cc:7790
      #20 0x000055954822f933 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14db60000d90, packet=packet@entry=0x14db600195d1 "", packet_length=packet_length@entry=50, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_class.h:1109
      #21 0x000055954823273c in do_command (thd=0x14db60000d90) at /test/10.2_dbg/sql/sql_parse.cc:1381
      #22 0x0000559548335bcc in do_handle_one_connection (connect=connect@entry=0x55954a9262e0) at /test/10.2_dbg/sql/sql_connect.cc:1336
      #23 0x0000559548335df7 in handle_one_connection (arg=0x55954a9262e0) at /test/10.2_dbg/sql/sql_connect.cc:1241
      #24 0x000014dbc9d95609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x000014dbc998c293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.38 (dbg), 10.3.29 (dbg), 10.4.19 (dbg), 10.5.10 (dbg), 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (opt), 10.3.29 (opt), 10.4.19 (opt), 10.5.10 (opt), 10.6.0 (opt)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: