Interestingly, this issue seems to exist only in 10.4 and 10.11.
INSTALL PLUGIN Spider SONAME 'ha_spider.so';
|
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET'',DATABASE'',USER'',PASSWORD '');
|
CREATE TABLE t (c INT KEY,b INT UNIQUE) ENGINE=Spider;
|
CREATE TABLE t2 (c INT,d INT,CONSTRAINT fk FOREIGN KEY(d,c) REFERENCES t (c,d)) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"';
|
LOCK TABLES t WRITE,t2 WRITE;
|
TRUNCATE t2;
|
LOCK TABLES t2 AS a WRITE;
|
Leads to:
10.11.1 50c5743adc87e1cdec1431a02558f6540fe5a6d5 (Debug)
|
Core was generated by `/test/MD221022-mariadb-10.11.1-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 spider_string::length (this=0x2) at /test/10.11_dbg/sql/sql_string.h:278
|
278 inline uint32 length() const { return str_length;}
|
[Current thread is 1 (Thread 0x14f9d0050700 (LWP 449653))]
|
(gdb) bt
|
#0 spider_string::length (this=0x2) at /test/10.11_dbg/sql/sql_string.h:278
|
#1 0x000014f9a774492a in spider_link_get_key (link_for_hash=0x14f9700c5338, length=0x14f9d004e8f8, not_used=<optimized out>) at /test/10.11_dbg/storage/spider/spd_table.cc:385
|
#2 0x000055843f6a937c in my_hash_key (first=1 '\001', length=0x14f9d004e8f8, record=<optimized out>, hash=0x14f9700c6008) at /test/10.11_dbg/mysys/hash.c:196
|
#3 hashcmp (hash=hash@entry=0x14f9700c6008, pos=pos@entry=0x14f9700c60c8, key=key@entry=0x14f970089498 "`test`.`t`", length=length@entry=10) at /test/10.11_dbg/mysys/hash.c:379
|
#4 0x000055843f6a95aa in my_hash_first_from_hash_value (hash=hash@entry=0x14f9700c6008, hash_value=<optimized out>, key=0x14f970089498 "`test`.`t`", length=length@entry=10, current_record=current_record@entry=0x14f9d004e99c) at /test/10.11_dbg/mysys/hash.c:290
|
#5 0x000055843f6a95fb in my_hash_search_using_hash_value (hash=hash@entry=0x14f9700c6008, hash_value=<optimized out>, key=<optimized out>, length=length@entry=10) at /test/10.11_dbg/mysys/hash.c:244
|
#6 0x000014f9a77a2324 in spider_mbase_handler::append_lock_tables_list (this=0x14f970083090, conn=0x14f9700c5398, link_idx=0, appended=0x14f9d004ea1c) at /test/10.11_dbg/storage/spider/spd_db_mysql.cc:13130
|
#7 0x000014f9a778fa6e in ha_spider::append_lock_tables_list (this=this@entry=0x14f9700b6a80) at /test/10.11_dbg/storage/spider/ha_spider.cc:12081
|
#8 0x000014f9a778feac in ha_spider::store_lock (this=0x14f9700b6a80, thd=0x14f970000d48, to=0x14f9700b9528, lock_type=TL_WRITE) at /test/10.11_dbg/storage/spider/ha_spider.cc:775
|
#9 0x000055843f115d40 in get_lock_data (thd=thd@entry=0x14f970000d48, table_ptr=table_ptr@entry=0x14f970013be0, count=count@entry=1, flags=flags@entry=1) at /test/10.11_dbg/sql/sql_string.h:655
|
#10 0x000055843f116160 in mysql_lock_tables (thd=thd@entry=0x14f970000d48, tables=tables@entry=0x14f970013be0, count=count@entry=1, flags=flags@entry=0) at /test/10.11_dbg/sql/lock.cc:301
|
#11 0x000055843ec46af1 in lock_tables (thd=thd@entry=0x14f970000d48, tables=0x14f970013308, count=<optimized out>, flags=flags@entry=0) at /test/10.11_dbg/sql/sql_base.cc:5821
|
#12 0x000055843ecc2240 in lock_tables_open_and_lock_tables (thd=thd@entry=0x14f970000d48, tables=<optimized out>) at /test/10.11_dbg/sql/sql_parse.cc:2958
|
#13 0x000055843eccdd2e in mysql_execute_command (thd=thd@entry=0x14f970000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.11_dbg/sql/sql_parse.cc:5124
|
#14 0x000055843ecb8f90 in mysql_parse (thd=thd@entry=0x14f970000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14f9d004f300) at /test/10.11_dbg/sql/sql_parse.cc:8023
|
#15 0x000055843ecc64ac in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14f970000d48, packet=packet@entry=0x14f97000af09 "LOCK TABLES t2 AS a WRITE", packet_length=packet_length@entry=25, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_class.h:1346
|
#16 0x000055843ecc88f4 in do_command (thd=0x14f970000d48, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1407
|
#17 0x000055843ee25067 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5584412ffdd8, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1416
|
#18 0x000055843ee25536 in handle_one_connection (arg=0x5584412ffdd8) at /test/10.11_dbg/sql/sql_connect.cc:1318
|
#19 0x000014f9e910a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#20 0x000014f9e8cf6133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.4.27 (dbg), 10.11.1 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.3.37 (dbg), 10.3.37 (opt), 10.4.27 (opt), 10.5.18 (dbg), 10.5.18 (opt), 10.6.10 (dbg), 10.6.10 (opt), 10.7.6 (dbg), 10.7.6 (opt), 10.8.5 (dbg), 10.8.5 (opt), 10.9.3 (dbg), 10.9.3 (opt), 10.10.2 (dbg), 10.10.2 (opt), 10.11.1 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.38 (dbg), 5.7.38 (opt), 8.0.29 (dbg), 8.0.29 (opt)
{"report":{"fcp":1300.2999999988824,"ttfb":304.59999999962747,"pageVisibility":"visible","entityId":115888,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6376a82c-9781-402c-bafc-b62b9a655321","navigationType":0,"readyForUser":1388.8999999985099,"redirectCount":0,"resourceLoadedEnd":2124.5,"resourceLoadedStart":313,"resourceTiming":[{"duration":474.3999999985099,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":313,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":313,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":787.3999999985099,"responseStart":0,"secureConnectionStart":0},{"duration":474.40000000037253,"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":313.2999999988824,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":313.2999999988824,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":787.6999999992549,"responseStart":0,"secureConnectionStart":0},{"duration":533.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":313.5,"connectEnd":313.5,"connectStart":313.5,"domainLookupEnd":313.5,"domainLookupStart":313.5,"fetchStart":313.5,"redirectEnd":0,"redirectStart":0,"requestStart":313.5,"responseEnd":847,"responseStart":847,"secureConnectionStart":313.5},{"duration":606.4000000003725,"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":314.09999999962747,"connectEnd":314.09999999962747,"connectStart":314.09999999962747,"domainLookupEnd":314.09999999962747,"domainLookupStart":314.09999999962747,"fetchStart":314.09999999962747,"redirectEnd":0,"redirectStart":0,"requestStart":314.09999999962747,"responseEnd":920.5,"responseStart":920.5,"secureConnectionStart":314.09999999962747},{"duration":609.5999999996275,"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":314.2999999988824,"connectEnd":314.2999999988824,"connectStart":314.2999999988824,"domainLookupEnd":314.2999999988824,"domainLookupStart":314.2999999988824,"fetchStart":314.2999999988824,"redirectEnd":0,"redirectStart":0,"requestStart":314.2999999988824,"responseEnd":923.8999999985099,"responseStart":923.8999999985099,"secureConnectionStart":314.2999999988824},{"duration":610.9000000003725,"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":314.3999999985099,"connectEnd":314.3999999985099,"connectStart":314.3999999985099,"domainLookupEnd":314.3999999985099,"domainLookupStart":314.3999999985099,"fetchStart":314.3999999985099,"redirectEnd":0,"redirectStart":0,"requestStart":314.3999999985099,"responseEnd":925.2999999988824,"responseStart":925.2999999988824,"secureConnectionStart":314.3999999985099},{"duration":611.7999999988824,"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":314.59999999962747,"connectEnd":314.59999999962747,"connectStart":314.59999999962747,"domainLookupEnd":314.59999999962747,"domainLookupStart":314.59999999962747,"fetchStart":314.59999999962747,"redirectEnd":0,"redirectStart":0,"requestStart":314.59999999962747,"responseEnd":926.3999999985099,"responseStart":926.3999999985099,"secureConnectionStart":314.59999999962747},{"duration":671.8000000007451,"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":314.7999999988824,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":314.7999999988824,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":986.5999999996275,"responseStart":0,"secureConnectionStart":0},{"duration":612.5999999996275,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":315,"connectEnd":315,"connectStart":315,"domainLookupEnd":315,"domainLookupStart":315,"fetchStart":315,"redirectEnd":0,"redirectStart":0,"requestStart":315,"responseEnd":927.5999999996275,"responseStart":927.5999999996275,"secureConnectionStart":315},{"duration":671.5999999996275,"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":315.19999999925494,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":315.19999999925494,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":986.7999999988824,"responseStart":0,"secureConnectionStart":0},{"duration":613.8000000007451,"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":315.2999999988824,"connectEnd":315.2999999988824,"connectStart":315.2999999988824,"domainLookupEnd":315.2999999988824,"domainLookupStart":315.2999999988824,"fetchStart":315.2999999988824,"redirectEnd":0,"redirectStart":0,"requestStart":315.2999999988824,"responseEnd":929.0999999996275,"responseStart":929.0999999996275,"secureConnectionStart":315.2999999988824},{"duration":903.5999999996275,"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":326.5,"connectEnd":326.5,"connectStart":326.5,"domainLookupEnd":326.5,"domainLookupStart":326.5,"fetchStart":326.5,"redirectEnd":0,"redirectStart":0,"requestStart":326.5,"responseEnd":1230.0999999996275,"responseStart":1230.0999999996275,"secureConnectionStart":326.5},{"duration":1784.2000000011176,"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":327.3999999985099,"connectEnd":327.3999999985099,"connectStart":327.3999999985099,"domainLookupEnd":327.3999999985099,"domainLookupStart":327.3999999985099,"fetchStart":327.3999999985099,"redirectEnd":0,"redirectStart":0,"requestStart":327.3999999985099,"responseEnd":2111.5999999996275,"responseStart":2111.5999999996275,"secureConnectionStart":327.3999999985099},{"duration":232.40000000037253,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":998.0999999996275,"connectEnd":998.0999999996275,"connectStart":998.0999999996275,"domainLookupEnd":998.0999999996275,"domainLookupStart":998.0999999996275,"fetchStart":998.0999999996275,"redirectEnd":0,"redirectStart":0,"requestStart":998.0999999996275,"responseEnd":1230.5,"responseStart":1230.5,"secureConnectionStart":998.0999999996275},{"duration":869,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1255.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1255.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2124.5,"responseStart":0,"secureConnectionStart":0},{"duration":886.9000000003725,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1256.3999999985099,"connectEnd":1256.3999999985099,"connectStart":1256.3999999985099,"domainLookupEnd":1256.3999999985099,"domainLookupStart":1256.3999999985099,"fetchStart":1256.3999999985099,"redirectEnd":0,"redirectStart":0,"requestStart":1256.3999999985099,"responseEnd":2143.2999999988824,"responseStart":2143.2999999988824,"secureConnectionStart":1256.3999999985099},{"duration":893,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":1256.699999999255,"connectEnd":1256.699999999255,"connectStart":1256.699999999255,"domainLookupEnd":1256.699999999255,"domainLookupStart":1256.699999999255,"fetchStart":1256.699999999255,"redirectEnd":0,"redirectStart":0,"requestStart":1256.699999999255,"responseEnd":2149.699999999255,"responseStart":2149.699999999255,"secureConnectionStart":1256.699999999255}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":126,"responseStart":304,"responseEnd":327,"domLoading":308,"domInteractive":2133,"domContentLoadedEventStart":2133,"domContentLoadedEventEnd":2172,"domComplete":3642,"loadEventStart":3642,"loadEventEnd":3644,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2113.5},{"name":"bigPipe.sidebar-id.end","time":2114.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":2114.5999999996275},{"name":"bigPipe.activity-panel-pipe-id.end","time":2117},{"name":"activityTabFullyLoaded","time":2183.39999999851}],"measures":[],"correlationId":"f4fe8562bae686","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":104,"dbReadsTimeInMs":15,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}