Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
If the target table doesn't exist and I run CREATE OR REPLACE TABLE, it doesn't work and I get an error:
MariaDB [test]> CREATE OR REPLACE TABLE t (a INT, b INT) ENGINE ColumnStore; |
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types. |
Error (Code 1178): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types. |
Warning (Code 9999):
|
Warning (Code 1030): Got error 1 "Operation not permitted" from storage engine ColumnStore |
MariaDB [test]> SHOW CREATE TABLE t; |
ERROR 1146 (42S02): Table 'test.t' doesn't exist |
This is ok. No complains.
But if the table exists, it is dropped and not recreated. To make things worse, the error seems to suggest that nothing happened.
MariaDB [test]> CREATE TABLE t (a INT, b INT) ENGINE ColumnStore; |
Query OK, 0 rows affected (0.145 sec) |
|
MariaDB [test]> SHOW CREATE TABLE t; |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+ |
| Table | Create Table | |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+ |
| t | CREATE TABLE `t` ( |
`a` int(11) DEFAULT NULL, |
`b` int(11) DEFAULT NULL |
) ENGINE=Columnstore DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci | |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.001 sec) |
|
MariaDB [test]> CREATE OR REPLACE TABLE t (a INT, b INT) ENGINE ColumnStore; |
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types. |
Error (Code 1178): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types. |
Warning (Code 9999):
|
Warning (Code 1030): Got error 1 "Operation not permitted" from storage engine ColumnStore |
MariaDB [test]> SHOW CREATE TABLE t; |
ERROR 1146 (42S02): Table 'test.t' doesn't exist |
If you don't want to support OR CREATE it's fine, but please don't drop the existing table.