[MCOL-3701] RENAME TABLE makes the table unusable Created: 2019-12-27  Updated: 2020-09-21  Resolved: 2020-09-08

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.4.2
Fix Version/s: 5.4.1

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Attachments: File columnstoreSupportReport.columnstore-1.tar.gz    

 Description   

According to documentation, RENAME TABLE is supposed to work for ColumnStore. It doesn't seem to be the case.

MariaDB f93bfb9288d020b190f5c73a31223fff6439687d

MariaDB [db]> create table t5 (a int) engine=Columnstore;
Query OK, 0 rows affected (0.729 sec)
 
MariaDB [db]> select * from t5;
Empty set (0.064 sec)
 
MariaDB [db]> rename table t5 to t5a;
Query OK, 0 rows affected (0.003 sec)
 
MariaDB [db]> select * from t5a;
ERROR 1815 (HY000): Internal error: IDB-2006: 'db.t5a' does not exist in Columnstore.
 
MariaDB [db]> drop table t5a;
Query OK, 0 rows affected, 1 warning (0.044 sec)
 
MariaDB [db]> show warnings;
+---------+------+--------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                          |
+---------+------+--------------------------------------------------------------------------------------------------+
| Warning | 9999 | Error occured during file deletion. Restart DDLProc or use command tool ddlcleanup to clean up.  |
+---------+------+--------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)

Support report is attached.



 Comments   
Comment by Roman [ 2020-07-13 ]

Works in 10.5.4 for sure and I'll test in the latest 10.4.

MariaDB [test]> show variables like 'version';
+---------------+------------------------------------------+
| Variable_name | Value                                    |
+---------------+------------------------------------------+
| version       | 10.5.4-MariaDB-1:10.5.4+maria~bionic-log |
+---------------+------------------------------------------+
1 row in set (0.001 sec)
MariaDB [test]> create table cs1 (i bigint)engine=columnstore;
Query OK, 0 rows affected (0.548 sec)
 
MariaDB [test]> rename table cs1 to cs2;
Query OK, 0 rows affected (0.124 sec)
 
MariaDB [test]> select * from cs2;
Empty set (0.063 sec)
 
MariaDB [test]> select * from information_schema.columnstore_tables;
+--------------+------------+-----------+---------------------+--------------+---------------+
| TABLE_SCHEMA | TABLE_NAME | OBJECT_ID | CREATION_DATE       | COLUMN_COUNT | AUTOINCREMENT |
+--------------+------------+-----------+---------------------+--------------+---------------+
| test         | cs2        |      3000 | 2020-07-13 00:00:00 |            1 |          NULL |
+--------------+------------+-----------+---------------------+--------------+---------------+
1 row in set (0.021 sec)

Comment by Ben Thompson (Inactive) [ 2020-09-02 ]

Retested in latest 10.4 and observed no issues.

MariaDB [mytest]> show variables like 'version';
+---------------+------------------------------+
| Variable_name | Value                        |
+---------------+------------------------------+
| version       | 10.4.13-7-MariaDB-enterprise |
+---------------+------------------------------+
1 row in set (0.002 sec)
 
MariaDB [mytest]> create table cs1 (i bigint)engine=columnstore;
Query OK, 0 rows affected (1.341 sec)
 
MariaDB [mytest]> rename table cs1 to cs2;
Query OK, 0 rows affected (0.372 sec)
 
MariaDB [mytest]> select * from cs2;
Empty set (0.064 sec)
 
MariaDB [mytest]> select * from information_schema.columnstore_tables;
+--------------+------------+-----------+---------------+--------------+---------------+
| TABLE_SCHEMA | TABLE_NAME | OBJECT_ID | CREATION_DATE | COLUMN_COUNT | AUTOINCREMENT |
+--------------+------------+-----------+---------------+--------------+---------------+
| mytest       | cs2        |      3002 | 2020-09-02    |            1 |          NULL |
+--------------+------------+-----------+---------------+--------------+---------------+
1 row in set (0.027 sec)

Comment by Ben Thompson (Inactive) [ 2020-09-03 ]

Seems to be working in 10.4 and 10.5 enterprise builds and releases moving to you to verify and close

Comment by Daniel Lee (Inactive) [ 2020-09-08 ]

Build verified: 1.5.4-1 (Drone #587)

The described scenario worked in this build.

There was a ticket, MCOL-3764, relating to table renaming and it was fixed in 1.4.3. The reported issue here could be relating to that.

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