[MCOL-1384] Couldn't use reserved words in idents even with quotes(backport from develop) Created: 2018-05-04  Updated: 2018-07-06  Resolved: 2018-06-06

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: None
Fix Version/s: 1.1.5

Type: Bug Priority: Minor
Reporter: Roman Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
includes MCOL-573 CS does not support reserved words as... Closed
Sprint: 2018-10, 2018-11, 2018-12

 Description   

Steps to reproduce

CREATE TABLE `table`
(
id int NOT NULL,
sVal varchar(50),
`datetime` datetime
) ENGINE=columnstore;

create table kvstore( `key` varchar(1024), `value` varchar(1024) ) engine=columnstore;



 Comments   
Comment by Roman [ 2018-05-04 ]

Backport the feature from the issue.

Comment by Roman [ 2018-05-07 ]

Please review. I will come regression tests later.

Comment by Daniel Lee (Inactive) [ 2018-05-22 ]

Build verified: 1.1.5-1 source

[root@localhost ~]# cat mariadb-columnstore-1.1.5-1-centos7.x86_64.bin.tar.gz.txt
/root/columnstore/mariadb-columnstore-server
commit 0c983bff02172849a174dde46b62d76aa66485f8
Merge: 6b8a674 d5e6d89
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Thu Apr 26 16:16:51 2018 -0500

Merge pull request #112 from mariadb-corporation/davidhilldallas-patch-3

update to 1.1.5

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 1ea5198e0e9ecc2a8d13e6b44bf6c632f8561199
Merge: 4533116 59858aa
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Fri May 18 12:37:47 2018 +0100

Merge pull request #475 from drrtuy/MCOL-1415

MCOL-1415

Could not reproduced the issue in 1.1.4-1. Verified that it works in 1.1.5-1.

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 136
Server version: 10.2.14-MariaDB-log Columnstore 1.1.5-1

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [tpch1]> create database cs;
Query OK, 1 row affected (0.00 sec)

MariaDB [tpch1]> use cs;
Database changed
MariaDB [cs]> create table `cs`.`cs1`(i bigint) engine=columnstore;
Query OK, 0 rows affected (0.16 sec)

MariaDB [cs]> desc cs1;
------------------------------------+

Field Type Null Key Default Extra

------------------------------------+

i bigint(20) YES   NULL  

------------------------------------+

Comment by Daniel Lee (Inactive) [ 2018-05-23 ]

MariaDB [mytest]> create database cs;
Query OK, 1 row affected (0.00 sec)

MariaDB [mytest]> create table `cs`.`insert`(i bigint) engine=columnstore;
Query OK, 0 rows affected (0.12 sec)

MariaDB [mytest]> create table cs.update(i bigint) engine=columnstore;
Query OK, 0 rows affected (0.11 sec)

MariaDB [mytest]> insert into cs.insert values (1);
Query OK, 1 row affected (0.11 sec)

MariaDB [mytest]> select * from cs.insert;
------

i

------

1

------
1 row in set (0.05 sec)

MariaDB [mytest]> update cs.insert set i=5;
Query OK, 1 row affected (0.07 sec)
Rows matched: 0 Changed: 0 Warnings: 0

MariaDB [mytest]> select * from cs.insert;
------

i

------

5

------
1 row in set (0.02 sec)

MariaDB [mytest]> delete from cs.insert;
Query OK, 1 row affected (0.10 sec)

MariaDB [mytest]> truncate table cs.insert;
Query OK, 0 rows affected (0.09 sec)

MariaDB [mytest]> drop table cs.insert;
Query OK, 0 rows affected (0.13 sec)

Comment by Daniel Lee (Inactive) [ 2018-05-25 ]

Build tested: 1.1.5-1 source

/root/columnstore/mariadb-columnstore-server
commit 0c983bff02172849a174dde46b62d76aa66485f8
Merge: 6b8a674 d5e6d89
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Thu Apr 26 16:16:51 2018 -0500

Merge pull request #112 from mariadb-corporation/davidhilldallas-patch-3

update to 1.1.5

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 1ea5198e0e9ecc2a8d13e6b44bf6c632f8561199
Merge: 4533116 59858aa
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Fri May 18 12:37:47 2018 +0100

Merge pull request #475 from drrtuy/MCOL-1415

MCOL-1415

Developer provided additional test case. The original provided test case did not test the issue sufficiently.

Reproduced the reported issues in 1.1.4-1

In 1.1.5-1, these two statements worked:

MariaDB [mytest]> set session sql_mode=ANSI_QUOTES;
Query OK, 0 rows affected (0.00 sec)

MariaDB [mytest]> create table `cs`. `SELECTe`(`key` bigint) engine=columnstore;
Query OK, 0 rows affected (1.33 sec)

MariaDB [mytest]> create table "cs". "SELECTf"("key" bigint) engine=columnstore;
Query OK, 0 rows affected (0.13 sec)

but the following statement hung and never returned:

create table cs.`somea`(`key` bigint) engine=columnstore;

I restarted ColumnStore and tried the create statement again and got:

MariaDB [mytest]> create table cs.`somea`(`key` bigint) engine=columnstore;
ERROR 1050 (42S01): Table 'somea' already exists

I tried to drop the table and it also hung:

MariaDB [mytest]> drop table cs.`somea`;

Comment by Roman [ 2018-05-26 ]

Not fixed yet.

Comment by Daniel Lee (Inactive) [ 2018-06-04 ]

Build tested: 1.1.5-1 source

/root/columnstore/mariadb-columnstore-server
commit 3e6e2b692a5847cc6e89fb200558ebc781b14b09
Merge: 0c983bf 1f94211
Author: David.Hall <david.hall@mariadb.com>
Date: Thu May 31 09:30:12 2018 -0500

Merge pull request #118 from mariadb-corporation/MCOL-1435

Merge MariaDB 10.2.15 into develop-1.1

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 3ab634bde692e5c96f823aef933120eb09c72465
Merge: 12f2e11 efbf297
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Thu May 31 13:15:46 2018 +0100

Merge pull request #485 from drrtuy/MCOL-1384_2

MCOL-1384 Backport MCOL-573 to 1.1

The reported hanging issue has been fixed, but the following create statement that was working, now no longer works.

MariaDB [mytest]> create table "cs". "SELECTf"("key" bigint) engine=columnstore;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"cs". "SELECTf"("key" bigint) engine=columnstore' at line 1
MariaDB [mytest]> create table "cs"."SELECTf"("key" bigint) engine=columnstore;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"cs"."SELECTf"("key" bigint) engine=columnstore' at line 1

The 2nd one has the space between the schema name and table name removed.

It seems that double quote is no longer supported.

Comment by Daniel Lee (Inactive) [ 2018-06-04 ]

reopened per my last comment

Comment by Andrew Hutchings (Inactive) [ 2018-06-06 ]

Your CREATE TABLE statement isn't valid for MariaDB, this is not a regression. This is regular MariaDB:

MariaDB [test]> create table "cs". "SELECTf" ("key" bigint);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"cs"."SELECTf" ("key" bigint)' at line 1

Comment by Daniel Lee (Inactive) [ 2018-06-06 ]

Since the statement with double is not supposed by the MariaDB server, it is a non-issue.

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