CREATE TABLE t (id CHAR AS (JSON_COMPACT (JSON_EXTRACT(doc,"$._id"))) UNIQUE KEY,doc JSON,CONSTRAINT notnu CHECK (id IS NOT NULL));
|
INSERT INTO t (doc) VALUES ('{ "_id" : { "$oid" : "0ca0b0f0" },"a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" :0} ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] }');
|
Leads to:
10.4.30 9f909e546e14ed9b529cddc2c1a5c2aa61d57e56 (Debug)
|
Core was generated by `/test/GAL_MD230523-mariadb-10.4.30-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
|
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 0x153f00088700 (LWP 3414440))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
|
#1 0x000055da0a4b603d in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:386
|
#2 0x000055da09cc5472 in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:372
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#5 0x0000153f1a5c5859 in __GI_abort () at abort.c:79
|
#6 0x0000153f1a5c5729 in __assert_fail_base (fmt=0x153f1a75b588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55da0a62bb58 "field_max_length <= m_return_field_def.length || m_return_field_def.type_handler()->cmp_type() == INT_RESULT || (_current_thd()->stmt_arena->is_stmt_execute() && m_return_field_def.length == 8 && (m_r"..., file=0x55da0a62afa6 "/test/10.4_dbg/sql/sp_head.cc", line=913, function=<optimized out>) at assert.c:92
|
#7 0x0000153f1a5d6fd6 in __GI___assert_fail (assertion=assertion@entry=0x55da0a62bb58 "field_max_length <= m_return_field_def.length || m_return_field_def.type_handler()->cmp_type() == INT_RESULT || (_current_thd()->stmt_arena->is_stmt_execute() && m_return_field_def.length == 8 && (m_r"..., file=file@entry=0x55da0a62afa6 "/test/10.4_dbg/sql/sp_head.cc", line=line@entry=913, function=function@entry=0x55da0a62bb08 "Field* sp_head::create_result_field(uint, const LEX_CSTRING*, TABLE*) const") at assert.c:101
|
#8 0x000055da09997a36 in sp_head::create_result_field (this=0x153eb0067810, field_max_length=field_max_length@entry=4294967295, field_name=field_name@entry=0x153eb00341f8, table=0x153eb0054610) at /test/10.4_dbg/sql/sql_class.h:1107
|
#9 0x000055da09cf193e in Item_sp::init_result_field (this=this@entry=0x153eb0034268, thd=thd@entry=0x153eb0000d28, max_length=4294967295, maybe_null=1, null_value=null_value@entry=0x153eb003421e, name=name@entry=0x153eb00341f8) at /test/10.4_dbg/sql/item.cc:2908
|
#10 0x000055da09d732d8 in Item_func_sp::fix_fields (this=0x153eb00341a8, thd=0x153eb0000d28, ref=0x153eb00343c0) at /test/10.4_dbg/sql/item_func.cc:6632
|
#11 0x000055da09d5a5d9 in Item::fix_fields_if_needed (ref=0x153eb00343c0, thd=0x153eb0000d28, this=0x153eb00341a8) at /test/10.4_dbg/sql/item.h:966
|
#12 Item_func::fix_fields (this=this@entry=0x153eb0034330, thd=thd@entry=0x153eb0000d28, ref=ref@entry=0x0) at /test/10.4_dbg/sql/item_func.cc:355
|
#13 0x000055da09d73dd8 in Item_func_set_user_var::fix_fields (this=0x153eb0034330, thd=0x153eb0000d28, ref=0x0) at /test/10.4_dbg/sql/item_func.cc:4631
|
#14 0x000055da09979d1d in set_var_user::check (this=0x153eb0034498, thd=<optimized out>) at /test/10.4_dbg/sql/set_var.cc:873
|
#15 0x000055da0997bdd1 in sql_set_variables (thd=thd@entry=0x153eb0000d28, var_list=var_list@entry=0x153eb0053678, free=free@entry=true) at /test/10.4_dbg/sql/set_var.cc:733
|
#16 0x000055da09a4b403 in mysql_execute_command (thd=0x153eb0000d28) at /test/10.4_dbg/sql/sql_parse.cc:5045
|
#17 0x000055da09992bd7 in sp_instr_stmt::exec_core (this=0x153eb00344b8, thd=<optimized out>, nextp=0x153f00085164) at /test/10.4_dbg/sql/sp_head.cc:3694
|
#18 0x000055da0999f474 in sp_lex_keeper::reset_lex_and_exec_core (this=this@entry=0x153eb0034500, thd=thd@entry=0x153eb0000d28, nextp=nextp@entry=0x153f00085164, open_tables=open_tables@entry=false, instr=instr@entry=0x153eb00344b8) at /test/10.4_dbg/sql/sp_head.cc:3424
|
#19 0x000055da0999fbb5 in sp_instr_stmt::execute (this=0x153eb00344b8, thd=0x153eb0000d28, nextp=0x153f00085164) at /test/10.4_dbg/sql/sp_head.cc:3600
|
#20 0x000055da09998266 in sp_head::execute (this=this@entry=0x153eb00332a0, thd=thd@entry=0x153eb0000d28, merge_da_on_success=merge_da_on_success@entry=false) at /test/10.4_dbg/sql/sp_head.cc:1365
|
#21 0x000055da099997cc in sp_head::execute_trigger (this=0x153eb00332a0, thd=thd@entry=0x153eb0000d28, db_name=0x153eb0059638, table_name=0x153eb0059648, grant_info=grant_info@entry=0x153eb0066fd0) at /test/10.4_dbg/sql/sp_head.cc:1838
|
#22 0x000055da09b1378e in Table_triggers_list::process_triggers (this=this@entry=0x153eb005a0c0, thd=thd@entry=0x153eb0000d28, event=event@entry=TRG_EVENT_INSERT, time_type=time_type@entry=TRG_ACTION_BEFORE, old_row_is_record1=old_row_is_record1@entry=true) at /test/10.4_dbg/sql/sql_trigger.cc:2247
|
#23 0x000055da099e1462 in fill_record_n_invoke_before_triggers (thd=thd@entry=0x153eb0000d28, table=table@entry=0x153eb005a498, ptr=0x153eb0064b68, values=@0x153eb0013140: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153eb00131f0, last = 0x153eb00131f0, elements = 1}, <No data fields>}, ignore_errors=ignore_errors@entry=false, event=event@entry=TRG_EVENT_INSERT) at /test/10.4_dbg/sql/sql_base.cc:8990
|
#24 0x000055da09a16d8c in mysql_insert (thd=thd@entry=0x153eb0000d28, table_list=<optimized out>, fields=@0x153eb0005a00: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55da0aec0ab0 <end_of_list>, last = 0x153eb0005a00, elements = 0}, <No data fields>}, values_list=@0x153eb0005a48: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153eb0013200, last = 0x153eb0013200, elements = 1}, <No data fields>}, update_fields=@0x153eb0005a30: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55da0aec0ab0 <end_of_list>, last = 0x153eb0005a30, elements = 0}, <No data fields>}, update_values=@0x153eb0005a18: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55da0aec0ab0 <end_of_list>, last = 0x153eb0005a18, elements = 0}, <No data fields>}, duplic=<optimized out>, ignore=<optimized out>) at /test/10.4_dbg/sql/sql_insert.cc:1027
|
#25 0x000055da09a4a04c in mysql_execute_command (thd=thd@entry=0x153eb0000d28) at /test/10.4_dbg/sql/sql_parse.cc:4613
|
#26 0x000055da09a513f9 in mysql_parse (thd=thd@entry=0x153eb0000d28, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x153f000873b0, 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:8008
|
#27 0x000055da09a53f76 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153eb0000d28, packet=packet@entry=0x153eb0019509 "insert INTO t values(1)", packet_length=packet_length@entry=23, 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:1231
|
#28 0x000055da09a5680a in do_command (thd=0x153eb0000d28) at /test/10.4_dbg/sql/sql_parse.cc:1378
|
#29 0x000055da09b752b6 in do_handle_one_connection (connect=<optimized out>) at /test/10.4_dbg/sql/sql_connect.cc:1420
|
#30 0x000055da09b75372 in handle_one_connection (arg=<optimized out>) at /test/10.4_dbg/sql/sql_connect.cc:1324
|
#31 0x0000153f1aad6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#32 0x0000153f1a6c2133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.4.30 (dbg), 10.4.30 (opt), 11.0.2 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.5.21 (dbg), 10.5.21 (opt), 10.6.14 (dbg), 10.6.14 (opt), 10.8.8 (dbg), 10.8.8 (opt), 10.9.7 (dbg), 10.9.7 (opt), 10.10.5 (dbg), 10.10.5 (opt), 10.11.4 (dbg), 10.11.4 (opt), 11.0.2 (opt), 11.1.0 (dbg), 11.1.0 (opt)
{"report":{"fcp":1056.5,"ttfb":218.19999980926514,"pageVisibility":"visible","entityId":122485,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d9564a5f-7bb6-41cc-99a7-82ee7f521c92","navigationType":0,"readyForUser":1143,"redirectCount":0,"resourceLoadedEnd":903.1000003814697,"resourceLoadedStart":223,"resourceTiming":[{"duration":330.4000005722046,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":223,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":223,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":553.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":326.8999996185303,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":226.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":226.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":553.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":336,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":227.19999980926514,"connectEnd":227.19999980926514,"connectStart":227.19999980926514,"domainLookupEnd":227.19999980926514,"domainLookupStart":227.19999980926514,"fetchStart":227.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":227.19999980926514,"responseEnd":563.1999998092651,"responseStart":563.1999998092651,"secureConnectionStart":227.19999980926514},{"duration":411.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":227.9000005722046,"connectEnd":227.9000005722046,"connectStart":227.9000005722046,"domainLookupEnd":227.9000005722046,"domainLookupStart":227.9000005722046,"fetchStart":227.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":227.9000005722046,"responseEnd":639.1000003814697,"responseStart":639.1000003814697,"secureConnectionStart":227.9000005722046},{"duration":416.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":228.19999980926514,"connectEnd":228.19999980926514,"connectStart":228.19999980926514,"domainLookupEnd":228.19999980926514,"domainLookupStart":228.19999980926514,"fetchStart":228.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":228.19999980926514,"responseEnd":644.3000001907349,"responseStart":644.3000001907349,"secureConnectionStart":228.19999980926514},{"duration":418,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":228.5,"connectEnd":228.5,"connectStart":228.5,"domainLookupEnd":228.5,"domainLookupStart":228.5,"fetchStart":228.5,"redirectEnd":0,"redirectStart":0,"requestStart":228.5,"responseEnd":646.5,"responseStart":646.5,"secureConnectionStart":228.5},{"duration":418.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":228.60000038146973,"connectEnd":228.60000038146973,"connectStart":228.60000038146973,"domainLookupEnd":228.60000038146973,"domainLookupStart":228.60000038146973,"fetchStart":228.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":228.60000038146973,"responseEnd":646.9000005722046,"responseStart":646.9000005722046,"secureConnectionStart":228.60000038146973},{"duration":482.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":228.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":228.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":711.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":418.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":229.10000038146973,"connectEnd":229.10000038146973,"connectStart":229.10000038146973,"domainLookupEnd":229.10000038146973,"domainLookupStart":229.10000038146973,"fetchStart":229.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":229.10000038146973,"responseEnd":647.4000005722046,"responseStart":647.4000005722046,"secureConnectionStart":229.10000038146973},{"duration":482.4000005722046,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":229.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":229.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":711.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":418.5999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":229.4000005722046,"connectEnd":229.4000005722046,"connectStart":229.4000005722046,"domainLookupEnd":229.4000005722046,"domainLookupStart":229.4000005722046,"fetchStart":229.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":229.4000005722046,"responseEnd":648,"responseStart":648,"secureConnectionStart":229.4000005722046},{"duration":538.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":236,"connectEnd":236,"connectStart":236,"domainLookupEnd":236,"domainLookupStart":236,"fetchStart":236,"redirectEnd":0,"redirectStart":0,"requestStart":236,"responseEnd":774.6999998092651,"responseStart":774.6999998092651,"secureConnectionStart":236},{"duration":665.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":237.60000038146973,"connectEnd":237.60000038146973,"connectStart":237.60000038146973,"domainLookupEnd":237.60000038146973,"domainLookupStart":237.60000038146973,"fetchStart":237.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":237.60000038146973,"responseEnd":903.1000003814697,"responseStart":903.1000003814697,"secureConnectionStart":237.60000038146973},{"duration":87.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":728.6000003814697,"connectEnd":728.6000003814697,"connectStart":728.6000003814697,"domainLookupEnd":728.6000003814697,"domainLookupStart":728.6000003814697,"fetchStart":728.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":728.6000003814697,"responseEnd":816.1000003814697,"responseStart":816,"secureConnectionStart":728.6000003814697}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":58,"responseStart":218,"responseEnd":237,"domLoading":221,"domInteractive":1240,"domContentLoadedEventStart":1240,"domContentLoadedEventEnd":1290,"domComplete":1597,"loadEventStart":1597,"loadEventEnd":1598,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1221.5},{"name":"bigPipe.sidebar-id.end","time":1222.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1222.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1223.5},{"name":"activityTabFullyLoaded","time":1309.8000001907349}],"measures":[],"correlationId":"eb00e31025fbc0","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":89,"dbReadsTimeInMs":9,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Patch: https://github.com/MariaDB/server/commit/4673ccc45e8fa9f92e9957a1dba019f86ae88fb7
Cannot be repeated anymore on latest 10.5, so just adding the test case.