Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
N/A
Normally creation of a new table with S3 engine is not allowed.
However, the modified CREATE OR REPLACE (from MDEV-25292 ) bypasses it and creates the table.
If it's intentional, then probably the plain CREATE should be allowed to do it too.
Either MinIO or credentials to AWS are needed to run S3 tests.
See suite/s3/suite.pm for how the suite initializes connection parameters, configure your MinIO or AWS accordingly, put the test case into suite/s3 and run from there.
Alternatively, all S3-related options can be provided from the command line.
drop table if exists t, t2;
create table t (a int ) engine=Aria;
insert into t values (1),(2);
alter table t engine=S3;
--error 1005
create table t2 (a int ) engine=S3;
--error 1005
create table t2 like t;
create or replace table t2 like t;
show create table t2;
# Cleanup
drop table if exists t, t2;
bb-10.11-midenok 8e82c973e
alter table t engine=S3;
create table t2 (a int ) engine=S3;
ERROR HY000: Can 't create table `test`.`t2` (errno: 131 "Command not supported by the engine")
create table t2 like t;
ERROR HY000: Can' t create table `test`.`t2` (errno: 131 "Command not supported by the engine" )
create or replace table t2 like t;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int (11) DEFAULT NULL
) ENGINE=S3 DEFAULT CHARSET=latin1 COLLATE =latin1_swedish_ci PAGE_CHECKSUM=1
Before MDEV-25292 , CREATE OR REPLACE would fail with ER_CANT_CREATE_TABLE/131, the same way as both CREATEs.
is caused by
MDEV-25292
Atomic CREATE OR REPLACE TABLE
Stalled
Elena Stepanova
made changes -
2022-10-11 15:30
Description
Normally creation of a new table with S3 engine is not allowed.
However, the modified CREATE OR REPLACE (from MDEV-25292 ) bypasses it and creates the table.
If it's intentional, then probably the plain CREATE should be allowed to do it too.
_Either MinIO or credentials to AWS are needed to run S3 tests._
_See suite/s3/suite.pm for how the suite initializes connection parameters, configure your MinIO or AWS accordingly, put the test case into suite/s3 and run from there._
_Alternatively, all S3-related options can be provided from the command line._
{code:sql}
drop table if exists t, t2;
create table t (a int) engine=Aria;
insert into t values (1),(2);
alter table t engine=S3;
--error 1005
create table t2 (a int) engine=S3;
--error 1005
create table t2 like t;
create or replace table t2 like t;
show create table t2;
# Cleanup
drop table if exists t, t2;
{code}
{code:sql|title=bb-10.11-midenok 8e82c973e}
alter table t engine=S3;
create table t2 (a int) engine=S3;
ERROR HY000: Can't create table `test`.`t2` (errno: 131 "Command not supported by the engine")
create table t2 like t;
ERROR HY000: Can't create table `test`.`t2` (errno: 131 "Command not supported by the engine")
create or replace table t2 like t;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=S3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
{code}
The difference in behavior appeared with
{noformat}
commit 93c8252f02faa8ad8dc5f005e52f1990c29d4a0d (HEAD)
Author: Aleksey Midenkov
Date: Wed Aug 31 11:55:04 2022 +0300
MDEV-25292 Atomic CREATE OR REPLACE TABLE
{noformat}
Before it, CREATE OR REPLACE would fail with ER_CANT_CREATE_TABLE/131, the same way as both CREATEs.
Normally creation of a new table with S3 engine is not allowed.
However, the modified CREATE OR REPLACE (from MDEV-25292 ) bypasses it and creates the table.
If it's intentional, then probably the plain CREATE should be allowed to do it too.
_Either MinIO or credentials to AWS are needed to run S3 tests._
_See suite/s3/suite.pm for how the suite initializes connection parameters, configure your MinIO or AWS accordingly, put the test case into suite/s3 and run from there._
_Alternatively, all S3-related options can be provided from the command line._
{code:sql}
drop table if exists t, t2;
create table t (a int) engine=Aria;
insert into t values (1),(2);
alter table t engine=S3;
--error 1005
create table t2 (a int) engine=S3;
--error 1005
create table t2 like t;
create or replace table t2 like t;
show create table t2;
# Cleanup
drop table if exists t, t2;
{code}
{code:sql|title=bb-10.11-midenok 8e82c973e}
alter table t engine=S3;
create table t2 (a int) engine=S3;
ERROR HY000: Can't create table `test`.`t2` (errno: 131 "Command not supported by the engine")
create table t2 like t;
ERROR HY000: Can't create table `test`.`t2` (errno: 131 "Command not supported by the engine")
create or replace table t2 like t;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=S3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
{code}
Before MDEV-25292 , CREATE OR REPLACE would fail with ER_CANT_CREATE_TABLE/131, the same way as both CREATEs.
Elena Stepanova
made changes -
2022-10-11 15:31
Link
This issue relates to TODO-3623
[ TODO-3623
]
Aleksey Midenkov
made changes -
2022-10-17 08:39
Status
Open
[ 1
]
In Progress
[ 3
]
Aleksey Midenkov
made changes -
2022-10-17 10:21
Assignee
Aleksey Midenkov
[ midenok
]
Oleksandr Byelkin
[ sanja
]
Status
In Progress
[ 3
]
In Review
[ 10002
]
Oleksandr Byelkin
made changes -
2022-10-25 13:28
Assignee
Oleksandr Byelkin
[ sanja
]
Michael Widenius
[ monty
]
Sergei Golubchik
made changes -
2022-11-01 12:52
Fix Version/s
10.12
[ 28320
]
Fix Version/s
10.11
[ 27614
]
Aleksey Midenkov
made changes -
2023-01-26 14:02
Fix Version/s
N/A
[ 14700
]
Fix Version/s
11.0
[ 28320
]
Assignee
Michael Widenius
[ monty
]
Aleksey Midenkov
[ midenok
]
Resolution
Fixed
[ 1
]
Status
In Review
[ 10002
]
Closed
[ 6
]
{"report":{"fcp":1388.6000003814697,"ttfb":312,"pageVisibility":"visible","entityId":115450,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"a1482186-c744-4985-b48a-825486068208","navigationType":0,"readyForUser":1473.3000001907349,"redirectCount":0,"resourceLoadedEnd":1510.4000005722046,"resourceLoadedStart":317.6000003814697,"resourceTiming":[{"duration":541.6999998092651,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":317.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":317.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":859.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":541.8000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":317.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":317.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":859.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":550.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":318,"connectEnd":318,"connectStart":318,"domainLookupEnd":318,"domainLookupStart":318,"fetchStart":318,"redirectEnd":0,"redirectStart":0,"requestStart":318,"responseEnd":868.8000001907349,"responseStart":868.8000001907349,"secureConnectionStart":318},{"duration":604.2999992370605,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":318.20000076293945,"connectEnd":318.20000076293945,"connectStart":318.20000076293945,"domainLookupEnd":318.20000076293945,"domainLookupStart":318.20000076293945,"fetchStart":318.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":318.20000076293945,"responseEnd":922.5,"responseStart":922.5,"secureConnectionStart":318.20000076293945},{"duration":608.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":318.4000005722046,"connectEnd":318.4000005722046,"connectStart":318.4000005722046,"domainLookupEnd":318.4000005722046,"domainLookupStart":318.4000005722046,"fetchStart":318.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":318.4000005722046,"responseEnd":926.8000001907349,"responseStart":926.8000001907349,"secureConnectionStart":318.4000005722046},{"duration":608.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":318.6000003814697,"connectEnd":318.6000003814697,"connectStart":318.6000003814697,"domainLookupEnd":318.6000003814697,"domainLookupStart":318.6000003814697,"fetchStart":318.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":318.6000003814697,"responseEnd":927.3000001907349,"responseStart":927.3000001907349,"secureConnectionStart":318.6000003814697},{"duration":609,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":318.70000076293945,"connectEnd":318.70000076293945,"connectStart":318.70000076293945,"domainLookupEnd":318.70000076293945,"domainLookupStart":318.70000076293945,"fetchStart":318.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":318.70000076293945,"responseEnd":927.7000007629395,"responseStart":927.7000007629395,"secureConnectionStart":318.70000076293945},{"duration":696.3000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":319,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":319,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1015.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":609.0999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":319.20000076293945,"connectEnd":319.20000076293945,"connectStart":319.20000076293945,"domainLookupEnd":319.20000076293945,"domainLookupStart":319.20000076293945,"fetchStart":319.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":319.20000076293945,"responseEnd":928.3000001907349,"responseStart":928.3000001907349,"secureConnectionStart":319.20000076293945},{"duration":696.1000003814697,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":319.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":319.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1015.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":609.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":319.5,"connectEnd":319.5,"connectStart":319.5,"domainLookupEnd":319.5,"domainLookupStart":319.5,"fetchStart":319.5,"redirectEnd":0,"redirectStart":0,"requestStart":319.5,"responseEnd":929.1000003814697,"responseStart":929.1000003814697,"secureConnectionStart":319.5},{"duration":789.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":325.1000003814697,"connectEnd":325.1000003814697,"connectStart":325.1000003814697,"domainLookupEnd":325.1000003814697,"domainLookupStart":325.1000003814697,"fetchStart":325.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":325.1000003814697,"responseEnd":1114.9000005722046,"responseStart":1114.9000005722046,"secureConnectionStart":325.1000003814697},{"duration":1109.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":325.1000003814697,"connectEnd":325.1000003814697,"connectStart":325.1000003814697,"domainLookupEnd":325.1000003814697,"domainLookupStart":325.1000003814697,"fetchStart":325.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":325.1000003814697,"responseEnd":1434.2000007629395,"responseStart":1434.2000007629395,"secureConnectionStart":325.1000003814697},{"duration":93.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1027.1000003814697,"connectEnd":1027.1000003814697,"connectStart":1027.1000003814697,"domainLookupEnd":1027.1000003814697,"domainLookupStart":1027.1000003814697,"fetchStart":1027.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1027.1000003814697,"responseEnd":1120.4000005722046,"responseStart":1120.4000005722046,"secureConnectionStart":1027.1000003814697},{"duration":206.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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":1304.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1304.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1510.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":246.39999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/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","startTime":1305.1000003814697,"connectEnd":1305.1000003814697,"connectStart":1305.1000003814697,"domainLookupEnd":1305.1000003814697,"domainLookupStart":1305.1000003814697,"fetchStart":1305.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1305.1000003814697,"responseEnd":1551.5,"responseStart":1551.5,"secureConnectionStart":1305.1000003814697},{"duration":251.39999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/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","startTime":1305.4000005722046,"connectEnd":1305.4000005722046,"connectStart":1305.4000005722046,"domainLookupEnd":1305.4000005722046,"domainLookupStart":1305.4000005722046,"fetchStart":1305.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":1305.4000005722046,"responseEnd":1556.8000001907349,"responseStart":1556.8000001907349,"secureConnectionStart":1305.4000005722046}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":109,"responseStart":312,"responseEnd":319,"domLoading":315,"domInteractive":1536,"domContentLoadedEventStart":1536,"domContentLoadedEventEnd":1584,"domComplete":1816,"loadEventStart":1816,"loadEventEnd":1816,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1517.9000005722046},{"name":"bigPipe.sidebar-id.end","time":1518.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1519},{"name":"bigPipe.activity-panel-pipe-id.end","time":1522.1000003814697},{"name":"activityTabFullyLoaded","time":1616.9000005722046}],"measures":[],"correlationId":"aeb5c620b86554","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":126,"dbReadsTimeInMs":21,"dbConnsTimeInMs":30,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Please review bb-10.11-midenok