Query (0x7f3bbc010650): ALTER TABLE imp_t1 IMPORT TABLESPACE
Connection ID (thread ID): 4
Status: NOT_KILLED
#3 <signal handler called>
#4 0x000055c41ab763e0 in ha_innobase::discard_or_import_tablespace (this=0x7f3bbc0baa70, discard=<optimized out>) at /data/Server/10.6G/storage/innobase/handler/ha_innodb.cc:13201
#5 0x000055c41a77ff96 in mysql_discard_or_import_tablespace (thd=thd@entry=0x7f3bbc000c58, table_list=table_list@entry=0x7f3bbc010740, discard=<optimized out>) at /data/Server/10.6G/sql/sql_table.cc:5463
#6 0x000055c41a7ebe54 in Sql_cmd_discard_import_tablespace::execute (this=0x7f3bbc010e28, thd=0x7f3bbc000c58) at /data/Server/10.6G/sql/sql_alter.cc:591
#7 0x000055c41a6ed626 in mysql_execute_command (thd=0x7f3bbc000c58, is_called_from_prepared_stmt=<optimized out>) at /data/Server/10.6G/sql/sql_parse.cc:5995
#8 0x000055c41a6de446 in mysql_parse (rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, thd=0x7f3bbc000c58) at /data/Server/10.6G/sql/sql_parse.cc:8028
#10 0x000055c41a6e9e12 in dispatch_command (command=COM_QUERY, thd=0x7f3bbc000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /data/Server/10.6G/sql/sql_class.h:1340
#11 0x000055c41a6eba98 in do_command (thd=0x7f3bbc000c58, blocking=blocking@entry=true) at /data/Server/10.6G/sql/sql_parse.cc:1406
#12 0x000055c41a7e7837 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55c41e0a5a58, put_in_cache=put_in_cache@entry=true) at /data/Server/10.6G/sql/sql_connect.cc:1410
#13 0x000055c41a7e7b2d in handle_one_connection (arg=0x55c41e0a5a58) at /data/Server/10.6G/sql/sql_connect.cc:1312
#14 0x00007f3bf84df609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#15 0x00007f3bf80b3293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
The suggested fix would unconditionally dereference m_prebuilt->table, which could theoretically be a null pointer. However, if that were the case, then the data dictionary tables should be corrupted. So, I think that the code should be fine.
Please add a simplified test case to the regression test suite.
Marko Mäkelä
added a comment - The suggested fix would unconditionally dereference m_prebuilt->table , which could theoretically be a null pointer. However, if that were the case, then the data dictionary tables should be corrupted. So, I think that the code should be fine.
Please add a simplified test case to the regression test suite.
The rewritten patch is even better. When importing a table without a .cfg file, we will only allow the clustered index to exist in the table metadata. This should make it a little ‘safer’ to use the import mechanism as a last resort attempt to rescue data from an .ibd file that was not properly exported (for example, because the system tablespace of the original server became corrupted for whatever reason).
Marko Mäkelä
added a comment - The rewritten patch is even better. When importing a table without a .cfg file, we will only allow the clustered index to exist in the table metadata. This should make it a little ‘safer’ to use the import mechanism as a last resort attempt to rescue data from an .ibd file that was not properly exported (for example, because the system tablespace of the original server became corrupted for whatever reason).
People
Thirunarayanan Balathandayuthapani
Matthias Leich
Votes:
0Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1160.6999998092651,"ttfb":304.69999980926514,"pageVisibility":"visible","entityId":101179,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"39259de9-d637-4ab5-8167-e78df1f6e8e3","navigationType":0,"readyForUser":1274,"redirectCount":0,"resourceLoadedEnd":1485.5999999046326,"resourceLoadedStart":315.19999980926514,"resourceTiming":[{"duration":307.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":315.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":315.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":623.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":308,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":315.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":315.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":623.5,"responseStart":0,"secureConnectionStart":0},{"duration":316.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":315.69999980926514,"connectEnd":315.69999980926514,"connectStart":315.69999980926514,"domainLookupEnd":315.69999980926514,"domainLookupStart":315.69999980926514,"fetchStart":315.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":315.69999980926514,"responseEnd":632.5999999046326,"responseStart":632.5999999046326,"secureConnectionStart":315.69999980926514},{"duration":350.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":316,"connectEnd":316,"connectStart":316,"domainLookupEnd":316,"domainLookupStart":316,"fetchStart":316,"redirectEnd":0,"redirectStart":0,"requestStart":316,"responseEnd":666.8999998569489,"responseStart":666.8999998569489,"secureConnectionStart":316},{"duration":354.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":316.19999980926514,"connectEnd":316.19999980926514,"connectStart":316.19999980926514,"domainLookupEnd":316.19999980926514,"domainLookupStart":316.19999980926514,"fetchStart":316.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":316.19999980926514,"responseEnd":670.6999998092651,"responseStart":670.6999998092651,"secureConnectionStart":316.19999980926514},{"duration":354.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":316.5,"connectEnd":316.5,"connectStart":316.5,"domainLookupEnd":316.5,"domainLookupStart":316.5,"fetchStart":316.5,"redirectEnd":0,"redirectStart":0,"requestStart":316.5,"responseEnd":671.0999999046326,"responseStart":671.0999999046326,"secureConnectionStart":316.5},{"duration":354.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":316.69999980926514,"connectEnd":316.69999980926514,"connectStart":316.69999980926514,"domainLookupEnd":316.69999980926514,"domainLookupStart":316.69999980926514,"fetchStart":316.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":316.69999980926514,"responseEnd":671.5,"responseStart":671.5,"secureConnectionStart":316.69999980926514},{"duration":465.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":316.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":316.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":782.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":534.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":316.89999985694885,"connectEnd":316.89999985694885,"connectStart":316.89999985694885,"domainLookupEnd":316.89999985694885,"domainLookupStart":316.89999985694885,"fetchStart":316.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":316.89999985694885,"responseEnd":851.7999999523163,"responseStart":851.7999999523163,"secureConnectionStart":316.89999985694885},{"duration":535.3000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":317.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":317.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":852.5,"responseStart":0,"secureConnectionStart":0},{"duration":535.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":317.2999999523163,"connectEnd":317.2999999523163,"connectStart":317.2999999523163,"domainLookupEnd":317.2999999523163,"domainLookupStart":317.2999999523163,"fetchStart":317.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":317.2999999523163,"responseEnd":852.3999998569489,"responseStart":852.3999998569489,"secureConnectionStart":317.2999999523163},{"duration":1166.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":318.39999985694885,"connectEnd":318.39999985694885,"connectStart":318.39999985694885,"domainLookupEnd":318.39999985694885,"domainLookupStart":318.39999985694885,"fetchStart":318.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":318.39999985694885,"responseEnd":1485.1999998092651,"responseStart":1485.1999998092651,"secureConnectionStart":318.39999985694885},{"duration":1167.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":318.39999985694885,"connectEnd":318.39999985694885,"connectStart":318.39999985694885,"domainLookupEnd":318.39999985694885,"domainLookupStart":318.39999985694885,"fetchStart":318.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":318.39999985694885,"responseEnd":1485.5999999046326,"responseStart":1485.5999999046326,"secureConnectionStart":318.39999985694885},{"duration":270.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":818.1999998092651,"connectEnd":818.1999998092651,"connectStart":818.1999998092651,"domainLookupEnd":818.1999998092651,"domainLookupStart":818.1999998092651,"fetchStart":818.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":818.1999998092651,"responseEnd":1088.6999998092651,"responseStart":1088.6999998092651,"secureConnectionStart":818.1999998092651}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":142,"responseStart":305,"responseEnd":308,"domLoading":313,"domInteractive":1509,"domContentLoadedEventStart":1509,"domContentLoadedEventEnd":1553,"domComplete":1975,"loadEventStart":1975,"loadEventEnd":1976,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1492},{"name":"bigPipe.sidebar-id.end","time":1492.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1492.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":1494.0999999046326},{"name":"activityTabFullyLoaded","time":1567.5}],"measures":[],"correlationId":"9c740604634577","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":95,"dbReadsTimeInMs":13,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The suggested fix would unconditionally dereference m_prebuilt->table, which could theoretically be a null pointer. However, if that were the case, then the data dictionary tables should be corrupted. So, I think that the code should be fine.
Please add a simplified test case to the regression test suite.