[MCOL-3799] Missing backticks for reserved table name during DROP DATABASE Created: 2020-02-16  Updated: 2023-10-25  Resolved: 2023-10-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: DDLProc
Affects Version/s: 1.2.5
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: Sasha V Assignee: Roman
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

mariadb-community-columnstore-docker
Server version: 10.3.16-MariaDB-log Columnstore 1.2.5-1


Sprint: 2020-4, 2020-5, 2020-6, 2020-7

 Description   

ColumnStore has additional reserved words that cannot be used as table names without backticks, like USER. For example:

CREATE DATABASE test;
USE test;
CREATE TABLE user ( id 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.

Most of those reserved keywords can be used as table names when wrapped in the backticks:

MariaDB [test]> CREATE TABLE `user` ( id int ) ENGINE=ColumnStore;
Query OK, 0 rows affected (0.209 sec)

However, such tables are not dropped during DROP DATABASE:

MariaDB [test]> DROP DATABASE test;
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.

To circumvent this issue, one could drop such tables one by one wrapped in the backticks like:

MariaDB [test]> drop table `user`;
Query OK, 0 rows affected (0.199 sec)
MariaDB [test]> drop database test;
Query OK, 0 rows affected (0.002 sec)


Generated at Thu Feb 08 02:45:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.