[MDEV-24389] CREATE TABLE ... ENGINE=S3 fails with (errno: 131 "Command not supported by the engine") Created: 2020-12-10 Updated: 2023-03-24 Resolved: 2020-12-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - S3 |
| Affects Version/s: | 10.5.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Claudio Nanni | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Create an S3 table fails, but I can create it as InnoDB and then change the engine to S3:
If then I copy the same create table and execute it, it fails as well:
|
| Comments |
| Comment by Elena Stepanova [ 2020-12-10 ] | |
|
That's how S3 works https://mariadb.com/kb/en/using-the-s3-storage-engine/ Given that it's a read-only engine, there would be no point creating a table anyway, as you can't write into it. | |
| Comment by Claudio Nanni [ 2020-12-11 ] | |
|
elenst It surely makes sense on second thought, but could we make it more clear in the docs? CREATE TABLE is not supported because... In my opinion an explicit statement would help, some parts of the docs can even mislead you in thinking some sort of CREATE TABLE is supported, like: "s3_block_size: Set to 4M as default. This is the default block size for a table, if not specified in CREATE TABLE." I also think there is an use case for CREATE TABLE, I'll open another Jira for that, this is closed now. | |
| Comment by Vincent Milum Jr [ 2023-02-13 ] | |
|
I think this bug should be re-evaluated. In my particular case, I'm trying to do:
This reason for this is because SPIDER engine itself when using ALTER TABLE ENGINE doesn't copy data, instead just creating an empty table which is worthless. This is noted in the following bug: MDEV-30649 | |
| Comment by Sergei Golubchik [ 2023-03-24 ] | |
|
CREATE ... SELECT makes sense, indeed. But it'd be difficult make it work, it's more realistic to fix MDEV-30649 than to use CREATE ENGINE=S3 SELECT as a workaround |