[MCOL-1883] RENAME crashes when tablename contains `/` symbol Created: 2018-11-13  Updated: 2019-03-16  Resolved: 2019-03-16

Status: Closed
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: 1.2.1
Fix Version/s: 1.2.3

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

Issue Links:
Problem/Incident
is caused by MCOL-1855 ColumnStore table whose name contains... Closed
Sprint: 2019-03

 Description   

Mariadb server code randomly crashes when tablename contains `/`.
RENAME TABLE statement decodes the path provided by the server prior the rename operation and if the path contains '/' then server crashes in ha_calpont_ddl.cpp by parseTableName(). This is valid after MCOL-1855 only.



 Comments   
Comment by Roman [ 2019-03-06 ]

Please review.

Comment by Patrick LeBlanc (Inactive) [ 2019-03-07 ]

It will be in the nightly build of dev-1.2 tonight.

Comment by Daniel Lee (Inactive) [ 2019-03-08 ]

Build verified: 1.2.3-1 nightly
[dlee@cs-tst-06 centos7]$ cat gitversionInfo.txt
server commit:
2243073
engine commit:
26e6154

I could not rename a table with tablename with ‘/’
MariaDB [mytest]> create table `this/is/test` (c1 int) engine=columnstore;
Query OK, 0 rows affected (0.406 sec)

MariaDB [mytest]> insert into `this/is/test` values (1);
Query OK, 1 row affected (0.174 sec)

MariaDB [mytest]> select * from `this/is/test`;
------

c1

------

1

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

MariaDB [mytest]> rename table `this/is/test` to testtable;
ERROR 1815 (HY000): Internal error: CAL0001: Alter table Failed: IDB-2006: ‘mytest.this’ does not exist in Columnstore.

The same statement works on innodb table.

Comment by Daniel Lee (Inactive) [ 2019-03-11 ]

Build verified: 1.2.3-1 nightly

[dlee@cs-tst-06 centos7]$ cat gitversionInfo.txt
server commit:
2243073
engine commit:
2509d83

There was a fix for the latest issue, but the comment was posted to the wrong ticket (MCOL-901).

Comment by Roman [ 2019-03-13 ]

The fix introduced a bug when '/' is used in the middle of a table name. The current implementation uses only a prefix that is from the left of the '/' sign. It doesn't allow to use '/' in the beginning of the table name.

Comment by Roman [ 2019-03-13 ]

Please review.

Comment by Patrick LeBlanc (Inactive) [ 2019-03-14 ]

Merged it

Comment by Daniel Lee (Inactive) [ 2019-03-16 ]

Build verified: 1.2.3-1

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