It appears that innodb_safe_truncate makes TRUNCATE unsafe:
--source include/have_innodb.inc
|
|
CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB;
|
ALTER TABLE t1 ENCRYPTED=NO;
|
TRUNCATE t1;
|
10.2 861038f2e with default innodb_safe_truncate=ON
|
CURRENT_TEST: bug.temp3
|
mysqltest: At line 5: query 'TRUNCATE t1' failed: 1030: Got error 140 "Wrong create options" from storage engine InnoDB
|
2018-12-01 13:41:46 140647973488384 [Warning] Could not remove temporary table: '/data/bld/10.2/mysql-test/var/tmp/mysqld.1/#sql769d_9_1', error: 2
|
There is no warning/error with innodb_safe_truncate=OFF
{"report":{"fcp":823.1999998092651,"ttfb":214.60000038146973,"pageVisibility":"visible","entityId":71191,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"88c1b958-82d7-4b3c-8c56-9862c7c92939","navigationType":0,"readyForUser":911.6999998092651,"redirectCount":0,"resourceLoadedEnd":895.8000001907349,"resourceLoadedStart":220.80000019073486,"resourceTiming":[{"duration":12.59999942779541,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":220.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":220.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":233.39999961853027,"responseStart":0,"secureConnectionStart":0},{"duration":12.59999942779541,"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":221.10000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":221.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":233.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":76.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":221.19999980926514,"connectEnd":221.19999980926514,"connectStart":221.19999980926514,"domainLookupEnd":221.19999980926514,"domainLookupStart":221.19999980926514,"fetchStart":221.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":221.19999980926514,"responseEnd":297.69999980926514,"responseStart":297.69999980926514,"secureConnectionStart":221.19999980926514},{"duration":188.20000076293945,"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":221.39999961853027,"connectEnd":221.39999961853027,"connectStart":221.39999961853027,"domainLookupEnd":221.39999961853027,"domainLookupStart":221.39999961853027,"fetchStart":221.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":221.39999961853027,"responseEnd":409.6000003814697,"responseStart":409.6000003814697,"secureConnectionStart":221.39999961853027},{"duration":191.89999961853027,"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":221.60000038146973,"connectEnd":221.60000038146973,"connectStart":221.60000038146973,"domainLookupEnd":221.60000038146973,"domainLookupStart":221.60000038146973,"fetchStart":221.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":221.60000038146973,"responseEnd":413.5,"responseStart":413.5,"secureConnectionStart":221.60000038146973},{"duration":192.30000019073486,"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":221.80000019073486,"connectEnd":221.80000019073486,"connectStart":221.80000019073486,"domainLookupEnd":221.80000019073486,"domainLookupStart":221.80000019073486,"fetchStart":221.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":221.80000019073486,"responseEnd":414.1000003814697,"responseStart":414.1000003814697,"secureConnectionStart":221.80000019073486},{"duration":192.5,"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":222,"connectEnd":222,"connectStart":222,"domainLookupEnd":222,"domainLookupStart":222,"fetchStart":222,"redirectEnd":0,"redirectStart":0,"requestStart":222,"responseEnd":414.5,"responseStart":414.5,"secureConnectionStart":222},{"duration":223,"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":222.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":445.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":192.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":222.30000019073486,"connectEnd":222.30000019073486,"connectStart":222.30000019073486,"domainLookupEnd":222.30000019073486,"domainLookupStart":222.30000019073486,"fetchStart":222.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":222.30000019073486,"responseEnd":415,"responseStart":415,"secureConnectionStart":222.30000019073486},{"duration":222.89999961853027,"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":222.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":445.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":193.5,"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":222.69999980926514,"connectEnd":222.69999980926514,"connectStart":222.69999980926514,"domainLookupEnd":222.69999980926514,"domainLookupStart":222.69999980926514,"fetchStart":222.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":222.69999980926514,"responseEnd":416.19999980926514,"responseStart":416.19999980926514,"secureConnectionStart":222.69999980926514},{"duration":412.6000003814697,"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":223.69999980926514,"connectEnd":223.69999980926514,"connectStart":223.69999980926514,"domainLookupEnd":223.69999980926514,"domainLookupStart":223.69999980926514,"fetchStart":223.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":223.69999980926514,"responseEnd":636.3000001907349,"responseStart":636.3000001907349,"secureConnectionStart":223.69999980926514},{"duration":581.5999994277954,"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":223.80000019073486,"connectEnd":223.80000019073486,"connectStart":223.80000019073486,"domainLookupEnd":223.80000019073486,"domainLookupStart":223.80000019073486,"fetchStart":223.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":223.80000019073486,"responseEnd":805.3999996185303,"responseStart":805.3999996185303,"secureConnectionStart":223.80000019073486},{"duration":178.89999961853027,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":458.1000003814697,"connectEnd":458.1000003814697,"connectStart":458.1000003814697,"domainLookupEnd":458.1000003814697,"domainLookupStart":458.1000003814697,"fetchStart":458.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":458.1000003814697,"responseEnd":637,"responseStart":637,"secureConnectionStart":458.1000003814697},{"duration":94.79999923706055,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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&whisper-enabled=true","startTime":721.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":721.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":815.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":169.39999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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&whisper-enabled=true","startTime":722.1000003814697,"connectEnd":722.1000003814697,"connectStart":722.1000003814697,"domainLookupEnd":722.1000003814697,"domainLookupStart":722.1000003814697,"fetchStart":722.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":722.1000003814697,"responseEnd":891.5,"responseStart":891.3999996185303,"secureConnectionStart":722.1000003814697},{"duration":173.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/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&whisper-enabled=true","startTime":722.5,"connectEnd":722.5,"connectStart":722.5,"domainLookupEnd":722.5,"domainLookupStart":722.5,"fetchStart":722.5,"redirectEnd":0,"redirectStart":0,"requestStart":722.5,"responseEnd":895.8000001907349,"responseStart":895.8000001907349,"secureConnectionStart":722.5},{"duration":139.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":815.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":815.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":954.8999996185303,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":48,"responseStart":215,"responseEnd":219,"domLoading":218,"domInteractive":1010,"domContentLoadedEventStart":1010,"domContentLoadedEventEnd":1065,"domComplete":1307,"loadEventStart":1307,"loadEventEnd":1308,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":957.3999996185303},{"name":"bigPipe.sidebar-id.end","time":958.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":958.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":961.3000001907349},{"name":"activityTabFullyLoaded","time":1084.8000001907349}],"measures":[],"correlationId":"64fd9e36fc3ee5","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":98,"dbReadsTimeInMs":14,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I think that TRUNCATE is correctly refusing and rolling back the operation, now that
MDEV-17816has been fixed.The actual error is that ALTER TABLE is lacking validation that is being done by CREATE TABLE. This is similar to
MDEV-17833(which was just fixed) and should be fixed in 10.1 (which was the first version to introduce table options in InnoDB/XtraDB).