Starting with MariaDB Server 10.2.2, CREATE TEMPORARY TABLE in InnoDB actually creates temporary tables instead of persistent, redo-logged tables like it used to do. These tables are always created in a shared temporary tablespace.
However, CREATE TEMPORARY TABLE is not consistent when checking whether the table attributes are valid. The setting innodb_file_per_table should have no effect on the creation of temporary tables, but unfortunately it does have an effect:
--source include/have_innodb.inc
|
SET @save_per_table = @@GLOBAL.innodb_file_per_table;
|
SET GLOBAL innodb_file_per_table=1;
|
CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB ENCRYPTED=NO;
|
DROP TEMPORARY TABLE t1;
|
SET GLOBAL innodb_file_per_table=0;
|
CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB ENCRYPTED=NO;
|
SET GLOBAL innodb_file_per_table=@save_per_table;
|
The first CREATE TEMPORARY TABLE succeeds, but the second one will fail:
10.2 c913cd2b669f906f17c87b4c0864ae95b3911e03
|
mysqltest: At line 7: query 'CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB ENCRYPTED=NO' failed: 1005: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
serg suggested that we should issue errors if IGNORE_BAD_TABLE_OPTIONS sql_mode is not set, and warnings otherwise. To check for that option, it looks like thd_is_strict_mode() should be replaced with something that returns the sql_mode flags, or a new accessor function should be added.
When fixing this, please consider also the TRUNCATE code path, which was last fixed in MDEV-17885.
- relates to
-
MDEV-17885
TRUNCATE on temporary table causes ER_GET_ERRNO and "Could not remove temporary table" in the log
-
-
Closed
There are no comments yet on this issue.
{"report":{"fcp":952.7000000476837,"ttfb":321.3000000715256,"pageVisibility":"visible","entityId":71382,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"7b4d4f70-b26c-465c-b389-9d279a6b559e","navigationType":0,"readyForUser":1010.6000000238419,"redirectCount":0,"resourceLoadedEnd":489.39999997615814,"resourceLoadedStart":329.10000002384186,"resourceTiming":[{"duration":6.600000023841858,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":329.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":329.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":335.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":6.699999928474426,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":329.3000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":329.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":336,"responseStart":0,"secureConnectionStart":0},{"duration":151.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":329.60000002384186,"connectEnd":329.60000002384186,"connectStart":329.60000002384186,"domainLookupEnd":329.60000002384186,"domainLookupStart":329.60000002384186,"fetchStart":329.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":416.10000002384186,"responseEnd":481.3000000715256,"responseStart":447.10000002384186,"secureConnectionStart":329.60000002384186},{"duration":159.69999992847443,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":329.7000000476837,"connectEnd":329.7000000476837,"connectStart":329.7000000476837,"domainLookupEnd":329.7000000476837,"domainLookupStart":329.7000000476837,"fetchStart":329.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":415.2000000476837,"responseEnd":489.39999997615814,"responseStart":425.8000000715256,"secureConnectionStart":329.7000000476837},{"duration":95.39999997615814,"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":330,"connectEnd":330,"connectStart":330,"domainLookupEnd":330,"domainLookupStart":330,"fetchStart":330,"redirectEnd":0,"redirectStart":0,"requestStart":415.10000002384186,"responseEnd":425.39999997615814,"responseStart":424.7000000476837,"secureConnectionStart":330},{"duration":121,"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":330.10000002384186,"connectEnd":330.10000002384186,"connectStart":330.10000002384186,"domainLookupEnd":330.10000002384186,"domainLookupStart":330.10000002384186,"fetchStart":330.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":417.3000000715256,"responseEnd":451.10000002384186,"responseStart":450.60000002384186,"secureConnectionStart":330.10000002384186},{"duration":93.39999997615814,"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":330.2000000476837,"connectEnd":330.2000000476837,"connectStart":330.2000000476837,"domainLookupEnd":330.2000000476837,"domainLookupStart":330.2000000476837,"fetchStart":330.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":413.10000002384186,"responseEnd":423.60000002384186,"responseStart":423,"secureConnectionStart":330.2000000476837},{"duration":11.800000071525574,"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":330.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":342.3000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":120,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":330.60000002384186,"connectEnd":330.60000002384186,"connectStart":330.60000002384186,"domainLookupEnd":330.60000002384186,"domainLookupStart":330.60000002384186,"fetchStart":330.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":416.3000000715256,"responseEnd":450.60000002384186,"responseStart":449.89999997615814,"secureConnectionStart":330.60000002384186},{"duration":17.299999952316284,"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":330.8000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":348.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":120.90000009536743,"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":330.89999997615814,"connectEnd":330.89999997615814,"connectStart":330.89999997615814,"domainLookupEnd":330.89999997615814,"domainLookupStart":330.89999997615814,"fetchStart":330.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":417.39999997615814,"responseEnd":451.8000000715256,"responseStart":451.2000000476837,"secureConnectionStart":330.89999997615814},{"duration":97.29999995231628,"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":337.7000000476837,"connectEnd":423.8000000715256,"connectStart":423.8000000715256,"domainLookupEnd":423.8000000715256,"domainLookupStart":423.8000000715256,"fetchStart":337.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":424.5,"responseEnd":435,"responseStart":434,"secureConnectionStart":423.8000000715256},{"duration":99.39999997615814,"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":337.8000000715256,"connectEnd":337.8000000715256,"connectStart":337.8000000715256,"domainLookupEnd":337.8000000715256,"domainLookupStart":337.8000000715256,"fetchStart":337.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":426.8000000715256,"responseEnd":437.2000000476837,"responseStart":436.39999997615814,"secureConnectionStart":337.8000000715256},{"duration":180.89999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":693.1000000238419,"connectEnd":693.1000000238419,"connectStart":693.1000000238419,"domainLookupEnd":693.1000000238419,"domainLookupStart":693.1000000238419,"fetchStart":693.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":841.7000000476837,"responseEnd":874,"responseStart":873.3000000715256,"secureConnectionStart":693.1000000238419},{"duration":130,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":913.8000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":913.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1043.8000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":148,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":931.3000000715256,"connectEnd":931.3000000715256,"connectStart":931.3000000715256,"domainLookupEnd":931.3000000715256,"domainLookupStart":931.3000000715256,"fetchStart":931.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":1047.3999999761581,"responseEnd":1079.3000000715256,"responseStart":1078.3000000715256,"secureConnectionStart":931.3000000715256}],"fetchStart":0,"domainLookupStart":24,"domainLookupEnd":138,"connectStart":138,"connectEnd":163,"secureConnectionStart":147,"requestStart":163,"responseStart":322,"responseEnd":337,"domLoading":325,"domInteractive":1062,"domContentLoadedEventStart":1062,"domContentLoadedEventEnd":1100,"domComplete":1400,"loadEventStart":1400,"loadEventEnd":1401,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1045.7000000476837},{"name":"bigPipe.sidebar-id.end","time":1046.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1046.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1047.1000000238419},{"name":"activityTabFullyLoaded","time":1111.5}],"measures":[],"correlationId":"2b113b59bd7641","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":98,"dbReadsTimeInMs":13,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}