[MDEV-11627] TokuDB table can be renamed to a non-existent database Created: 2016-12-21  Updated: 2020-12-01

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - TokuDB
Affects Version/s: 10.0, 10.1, 10.0.28, 10.1.20, 10.2
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: Kyle Joiner (Inactive) Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None


 Description   

When renaming a table to move it to a different database there is no error if the database does not exist and the table is in limbo at that point. This should create an error instead of allowing the statement to return success.



 Comments   
Comment by Elena Stepanova [ 2016-12-25 ]

Reproducible on MariaDB 10.x.
Not reproducible on MariaDB 5.5, Percona Server 5.7.13, 5.6.31.

Test case runnable both on MariaDB and Percona:

# On Percona, run with LD_PRELOAD=<path to libjemalloc.so.1>
 
# to make sure it works with Percona, too
INSTALL PLUGIN tokudb SONAME 'ha_tokudb.so';
 
CREATE TABLE t1 (i  INT) ENGINE=TokuDB;
 
--error 1025,7,2,168
RENAME TABLE t1 TO non_existing.t1;
 
SELECT * FROM t1;
DROP TABLE t1;
UNINSTALL PLUGIN tokudb;

Generated at Thu Feb 08 07:51:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.