SET SESSION innodb_compression_default=1;
|
CREATE TEMPORARY TABLE t (c INT,c2 INT,c3 INT,KEY(c)) ENGINE=InnoDB;
|
SET GLOBAL innodb_compression_level=0;
|
TRUNCATE t;
|
Leads to:
10.9.0 4a2a9c02cd6611ef36bbb735c2b483dbc83580d4 (Optimized)
|
Core was generated by `/test/MD260222-mariadb-10.9.0-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 0x000055c0c193d6a7 in ha_innobase::reset (this=0x14db9401d4a0)
|
at /test/10.9_opt/storage/innobase/handler/ha_innodb.cc:15735
|
[Current thread is 1 (Thread 0x14dc6813c700 (LWP 325037))]
|
(gdb) bt
|
#0 0x000055c0c193d6a7 in ha_innobase::reset (this=0x14db9401d4a0) at /test/10.9_opt/storage/innobase/handler/ha_innodb.cc:15735
|
#1 0x000055c0c15cde54 in THD::mark_tmp_table_as_free_for_reuse (this=this@entry=0x14db94000c58, table=0x14db940180d8) at /test/10.9_opt/sql/temporary_tables.cc:791
|
#2 0x000055c0c15cf101 in THD::mark_tmp_tables_as_free_for_reuse (this=this@entry=0x14db94000c58) at /test/10.9_opt/sql/temporary_tables.cc:753
|
#3 0x000055c0c138e978 in close_thread_tables (thd=thd@entry=0x14db94000c58) at /test/10.9_opt/sql/sql_base.cc:865
|
#4 0x000055c0c1404269 in mysql_execute_command (thd=0x14db94000c58, is_called_from_prepared_stmt=<optimized out>) at /test/10.9_opt/sql/sql_parse.cc:6054
|
#5 0x000055c0c13f4e26 in mysql_parse (thd=0x14db94000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.9_opt/sql/sql_parse.cc:8027
|
#6 0x000055c0c1400fd5 in dispatch_command (command=COM_QUERY, thd=0x14db94000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.9_opt/sql/sql_class.h:1362
|
#7 0x000055c0c14031c7 in do_command (thd=0x14db94000c58, blocking=blocking@entry=true) at /test/10.9_opt/sql/sql_parse.cc:1402
|
#8 0x000055c0c1522b47 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.9_opt/sql/sql_connect.cc:1418
|
#9 0x000055c0c1522e8d in handle_one_connection (arg=arg@entry=0x55c0c3c34848) at /test/10.9_opt/sql/sql_connect.cc:1312
|
#10 0x000055c0c189c631 in pfs_spawn_thread (arg=0x55c0c3bc99a8) at /test/10.9_opt/storage/perfschema/pfs.cc:2201
|
#11 0x000014dc74675609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#12 0x000014dc74263293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
10.9.0 4a2a9c02cd6611ef36bbb735c2b483dbc83580d4 (Debug)
|
Core was generated by `/test/MD260222-mariadb-10.9.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 0x000055a26671562b in ha_innobase::reset (this=0x14eab8022a10)
|
at /test/10.9_dbg/storage/innobase/handler/ha_innodb.cc:15735
|
[Current thread is 1 (Thread 0x14eb200ef700 (LWP 325591))]
|
(gdb) bt
|
#0 0x000055a26671562b in ha_innobase::reset (this=0x14eab8022a10) at /test/10.9_dbg/storage/innobase/handler/ha_innodb.cc:15735
|
#1 0x000055a266384c80 in handler::ha_reset (this=0x14eab8022a10) at /test/10.9_dbg/sql/handler.cc:7118
|
#2 0x000055a2662ccff2 in THD::mark_tmp_table_as_free_for_reuse (this=this@entry=0x14eab8000db8, table=0x14eab801fbe8) at /test/10.9_dbg/sql/temporary_tables.cc:791
|
#3 0x000055a2662cec57 in THD::mark_tmp_tables_as_free_for_reuse (this=this@entry=0x14eab8000db8) at /test/10.9_dbg/sql/temporary_tables.cc:753
|
#4 0x000055a265fcdf08 in close_thread_tables (thd=thd@entry=0x14eab8000db8) at /test/10.9_dbg/sql/sql_base.cc:865
|
#5 0x000055a26607327a in mysql_execute_command (thd=thd@entry=0x14eab8000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:6054
|
#6 0x000055a266059343 in mysql_parse (thd=thd@entry=0x14eab8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14eb200ee400) at /test/10.9_dbg/sql/sql_parse.cc:8027
|
#7 0x000055a266067fdf in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14eab8000db8, packet=packet@entry=0x14eab800b889 "TRUNCATE t", packet_length=packet_length@entry=10, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1362
|
#8 0x000055a26606b426 in do_command (thd=0x14eab8000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1402
|
#9 0x000055a2661e6036 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55a26a1d5098, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
|
#10 0x000055a2661e663b in handle_one_connection (arg=arg@entry=0x55a26a1d5098) at /test/10.9_dbg/sql/sql_connect.cc:1312
|
#11 0x000055a26666cd23 in pfs_spawn_thread (arg=0x55a26a117768) at /test/10.9_dbg/storage/perfschema/pfs.cc:2201
|
#12 0x000014eb2a062609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#13 0x000014eb29c50293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.6.8 (dbg), 10.6.8 (opt), 10.7.4 (dbg), 10.7.4 (opt), 10.8.3 (dbg), 10.8.3 (opt), 10.9.0 (dbg), 10.9.0 (opt)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (dbg), 10.3.35 (opt), 10.4.25 (dbg), 10.4.25 (opt), 10.5.16 (dbg), 10.5.16 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.37 (dbg), 5.7.37 (opt), 8.0.28 (dbg), 8.0.28 (opt)
- is caused by
-
MDEV-25506
Atomic DDL: .frm file is removed and orphan InnoDB tablespace is left behind upon crash recovery
-
-
Closed
{"report":{"fcp":809.7999999523163,"ttfb":139.5,"pageVisibility":"visible","entityId":108456,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"4006795a-90d7-41f0-9cbe-581701295c33","navigationType":0,"readyForUser":895,"redirectCount":0,"resourceLoadedEnd":934.1999998092651,"resourceLoadedStart":145.39999985694885,"resourceTiming":[{"duration":191.29999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":145.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":145.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":336.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":191,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":145.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":145.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":336.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":200.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/b09d0d077992e4331b5f9ec0d3ec448c-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":145.89999985694885,"connectEnd":145.89999985694885,"connectStart":145.89999985694885,"domainLookupEnd":145.89999985694885,"domainLookupStart":145.89999985694885,"fetchStart":145.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":145.89999985694885,"responseEnd":346.69999980926514,"responseStart":346.69999980926514,"secureConnectionStart":145.89999985694885},{"duration":297.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/b47ab3df14096803b180217eb8482517-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":145.89999985694885,"connectEnd":145.89999985694885,"connectStart":145.89999985694885,"domainLookupEnd":145.89999985694885,"domainLookupStart":145.89999985694885,"fetchStart":145.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":145.89999985694885,"responseEnd":443.09999990463257,"responseStart":443.09999990463257,"secureConnectionStart":145.89999985694885},{"duration":300.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/6c569cbf8087ab04e40d0bef98627457-CDN/lu2bsh/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":146.19999980926514,"connectEnd":146.19999980926514,"connectStart":146.19999980926514,"domainLookupEnd":146.19999980926514,"domainLookupStart":146.19999980926514,"fetchStart":146.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":146.19999980926514,"responseEnd":447,"responseStart":447,"secureConnectionStart":146.19999980926514},{"duration":301.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":146.19999980926514,"connectEnd":146.19999980926514,"connectStart":146.19999980926514,"domainLookupEnd":146.19999980926514,"domainLookupStart":146.19999980926514,"fetchStart":146.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":146.19999980926514,"responseEnd":447.39999985694885,"responseStart":447.39999985694885,"secureConnectionStart":146.19999980926514},{"duration":301.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":146.29999995231628,"connectEnd":146.29999995231628,"connectStart":146.29999995231628,"domainLookupEnd":146.29999995231628,"domainLookupStart":146.29999995231628,"fetchStart":146.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":146.29999995231628,"responseEnd":447.89999985694885,"responseStart":447.89999985694885,"secureConnectionStart":146.29999995231628},{"duration":305.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bsh/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":146.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":146.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":452.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":301.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":146.5,"connectEnd":146.5,"connectStart":146.5,"domainLookupEnd":146.5,"domainLookupStart":146.5,"fetchStart":146.5,"redirectEnd":0,"redirectStart":0,"requestStart":146.5,"responseEnd":448.39999985694885,"responseStart":448.39999985694885,"secureConnectionStart":146.5},{"duration":305.39999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bsh/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":146.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":146.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":452.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":302.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/81b5d7c27af3ebc078cc4a36383678ba-CDN/lu2bsh/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":146.79999995231628,"connectEnd":146.79999995231628,"connectStart":146.79999995231628,"domainLookupEnd":146.79999995231628,"domainLookupStart":146.79999995231628,"fetchStart":146.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":146.79999995231628,"responseEnd":449,"responseStart":449,"secureConnectionStart":146.79999995231628},{"duration":420.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":147.5,"connectEnd":147.5,"connectStart":147.5,"domainLookupEnd":147.5,"domainLookupStart":147.5,"fetchStart":147.5,"redirectEnd":0,"redirectStart":0,"requestStart":147.5,"responseEnd":568,"responseStart":568,"secureConnectionStart":147.5},{"duration":723.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":152.09999990463257,"connectEnd":152.09999990463257,"connectStart":152.09999990463257,"domainLookupEnd":152.09999990463257,"domainLookupStart":152.09999990463257,"fetchStart":152.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":152.09999990463257,"responseEnd":875.5999999046326,"responseStart":875.5999999046326,"secureConnectionStart":152.09999990463257},{"duration":68.79999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":500.09999990463257,"connectEnd":500.09999990463257,"connectStart":500.09999990463257,"domainLookupEnd":500.09999990463257,"domainLookupStart":500.09999990463257,"fetchStart":500.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":500.09999990463257,"responseEnd":568.8999998569489,"responseStart":568.8999998569489,"secureConnectionStart":500.09999990463257},{"duration":206.29999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bsh/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":727.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":727.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":934.1999998092651,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":10,"responseStart":140,"responseEnd":144,"domLoading":143,"domInteractive":959,"domContentLoadedEventStart":959,"domContentLoadedEventEnd":1007,"domComplete":1434,"loadEventStart":1434,"loadEventEnd":1435,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":934.5},{"name":"bigPipe.sidebar-id.end","time":935.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":935.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":936.8999998569489},{"name":"activityTabFullyLoaded","time":1026}],"measures":[],"correlationId":"2c21d2f0d54b5e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":73,"dbReadsTimeInMs":11,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This was caused by the last part of
MDEV-25506. The SIGSEGV occurs because a null pointer ha_innobase::m_prebuilt is being dereferenced. It was set to nullptr in ha_innobase::truncate():info.options|= HA_LEX_CREATE_TMP_TABLE;
btr_drop_temporary_table(*ib_table);
m_prebuilt->table = nullptr;
row_prebuilt_free(m_prebuilt);
m_prebuilt = nullptr;
Side note: InnoDB temporary tables should be indifferent to any form of compression.