Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
10.11
Run in S3-enabled environment.
The test case is non-deterministic by nature, although it hits the problem for me every time.
I only tried with MinIO, with AWS timing may need to be adjusted, depending on how slowly it is.
Don't put it into the regression suite , create a deterministic one instead.
In the test case, one connection does CREATE OR REPLACE of an existing S3 table. Another connection is monitoring visible tables. As soon as #sql-backup-... table becomes visible (which is already strange), the monitoring connection crash-restarts the server. After recovery, the temporary table remains permanently in S3.
# Because it 's not easy to drop the garbage tables which are the essense
# of the report, I re-create the bucket to force-remove the contents.
# This assumes that I run the test with --mysqld=--s3-bucket=mtr,
# and MinIO server is already running. Naturally it doesn' t belong
# to the eventual test case for the regression suite
--exec mc alias set local http://127.0.0.1:9000 minio minioadmin
--exec mc rb --force local/mtr || true
--exec mc mb local/mtr
show tables;
# This is to clean up S3 in a "normal" situation, when there is no garbage
drop table if exists t;
--connect (con1,localhost,root,,test)
CREATE TABLE t (a INT );
ALTER TABLE t ENGINE=S3;
--send
CREATE OR REPLACE TABLE t (b INT );
--connection default
--let $i= 100
while ($i)
{
--let $tbl= `show tables like '%sql-backup%'`
if ($tbl != '' )
{
--echo #
--echo # Found a backup table $tbl
--echo #
show tables;
--let $shutdown_timeout= 0
--source include/restart_mysqld.inc
--echo #
--echo # The table is still there
--echo #
show tables;
--echo #
--echo # .. but cannot be dropped
--echo #
--eval drop table if exists `$tbl`
show tables;
--let $i= 1
}
--dec $i
}
# Cleanup
DROP TABLE t;
bb-10.11-midenok 6df00b8559
connection default ;
#
# Found a backup table #sql-backup-12beea-5-t
#
show tables;
Tables_in_test
#sql-backup-12beea-5-t
t
# restart
#
# The table is still there
#
show tables;
Tables_in_test
#sql-backup-12beea-5-t
t
#
# .. but cannot be dropped
#
drop table if exists `#sql-backup-12beea-5-t`;
Warnings:
Note 1051 Unknown table 'test.#sql-backup-12beea-5-t'
show tables;
Tables_in_test
#sql-backup-12beea-5-t
t
Couldn't reproduce before MDEV-25292 .
is caused by
MDEV-25292
Atomic CREATE OR REPLACE TABLE
In Testing
{"report":{"fcp":1408.0999999046326,"ttfb":281.90000009536743,"pageVisibility":"visible","entityId":115595,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"dbbaad53-6375-4fd7-b06f-2e4fd4268166","navigationType":0,"readyForUser":1509.8000001907349,"redirectCount":0,"resourceLoadedEnd":1113.6999998092651,"resourceLoadedStart":290.40000009536743,"resourceTiming":[{"duration":286,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":290.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":290.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":576.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":286,"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":290.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":290.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":576.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":708.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":290.90000009536743,"connectEnd":290.90000009536743,"connectStart":290.90000009536743,"domainLookupEnd":290.90000009536743,"domainLookupStart":290.90000009536743,"fetchStart":290.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":580.9000000953674,"responseEnd":999,"responseStart":623.6999998092651,"secureConnectionStart":290.90000009536743},{"duration":822.5999999046326,"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":291.09999990463257,"connectEnd":291.09999990463257,"connectStart":291.09999990463257,"domainLookupEnd":291.09999990463257,"domainLookupStart":291.09999990463257,"fetchStart":291.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":582.0999999046326,"responseEnd":1113.6999998092651,"responseStart":663.3000001907349,"secureConnectionStart":291.09999990463257},{"duration":348.90000009536743,"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":291.19999980926514,"connectEnd":291.19999980926514,"connectStart":291.19999980926514,"domainLookupEnd":291.19999980926514,"domainLookupStart":291.19999980926514,"fetchStart":291.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":592,"responseEnd":640.0999999046326,"responseStart":632.6999998092651,"secureConnectionStart":291.19999980926514},{"duration":340.69999980926514,"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":291.40000009536743,"connectEnd":291.40000009536743,"connectStart":291.40000009536743,"domainLookupEnd":291.40000009536743,"domainLookupStart":291.40000009536743,"fetchStart":291.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":582.1999998092651,"responseEnd":632.0999999046326,"responseStart":628.1999998092651,"secureConnectionStart":291.40000009536743},{"duration":350.90000009536743,"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":291.59999990463257,"connectEnd":291.59999990463257,"connectStart":291.59999990463257,"domainLookupEnd":291.59999990463257,"domainLookupStart":291.59999990463257,"fetchStart":291.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":592.6999998092651,"responseEnd":642.5,"responseStart":635.6999998092651,"secureConnectionStart":291.59999990463257},{"duration":289.69999980926514,"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":291.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":291.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":581.5,"responseStart":0,"secureConnectionStart":0},{"duration":352.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":292,"connectEnd":292,"connectStart":292,"domainLookupEnd":292,"domainLookupStart":292,"fetchStart":292,"redirectEnd":0,"redirectStart":0,"requestStart":594,"responseEnd":644.9000000953674,"responseStart":642.6999998092651,"secureConnectionStart":292},{"duration":289.80000019073486,"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":292.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":292.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":582,"responseStart":0,"secureConnectionStart":0},{"duration":352.2999997138977,"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":292.40000009536743,"connectEnd":292.40000009536743,"connectStart":292.40000009536743,"domainLookupEnd":292.40000009536743,"domainLookupStart":292.40000009536743,"fetchStart":292.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":594.1999998092651,"responseEnd":644.6999998092651,"responseStart":636.3000001907349,"secureConnectionStart":292.40000009536743},{"duration":812.8999996185303,"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":295.80000019073486,"connectEnd":295.80000019073486,"connectStart":295.80000019073486,"domainLookupEnd":295.80000019073486,"domainLookupStart":295.80000019073486,"fetchStart":295.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":644.4000000953674,"responseEnd":1108.6999998092651,"responseStart":1102.6999998092651,"secureConnectionStart":295.80000019073486},{"duration":814.4000000953674,"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":295.90000009536743,"connectEnd":295.90000009536743,"connectStart":295.90000009536743,"domainLookupEnd":295.90000009536743,"domainLookupStart":295.90000009536743,"fetchStart":295.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":691.6999998092651,"responseEnd":1110.3000001907349,"responseStart":1106,"secureConnectionStart":295.90000009536743},{"duration":212.7999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1136.9000000953674,"connectEnd":1136.9000000953674,"connectStart":1136.9000000953674,"domainLookupEnd":1136.9000000953674,"domainLookupStart":1136.9000000953674,"fetchStart":1136.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1310.0999999046326,"responseEnd":1349.6999998092651,"responseStart":1348.5999999046326,"secureConnectionStart":1136.9000000953674}],"fetchStart":0,"domainLookupStart":12,"domainLookupEnd":67,"connectStart":67,"connectEnd":87,"secureConnectionStart":76,"requestStart":88,"responseStart":282,"responseEnd":292,"domLoading":286,"domInteractive":1584,"domContentLoadedEventStart":1584,"domContentLoadedEventEnd":1642,"domComplete":2006,"loadEventStart":2006,"loadEventEnd":2006,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1555.3000001907349},{"name":"bigPipe.sidebar-id.end","time":1556.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1556.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1558.4000000953674},{"name":"activityTabFullyLoaded","time":1659.4000000953674}],"measures":[],"correlationId":"403b23d0ac7db3","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":105,"dbReadsTimeInMs":15,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Just FYI, this may or may not work, s3.basic uses the below to cleanup the mess:
--source create_database.inc
...
--replace_result $database database
...
--source drop_database.inc