summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/r/dir_per_db_rename_to_nonexisting_schema.result
blob: 992f380591fbfd9d9229017df973c1f0193fabfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
SET GLOBAL tokudb_dir_per_db=true;
######
# Tokudb and mysql data dirs are the same, rename to existent db
###
CREATE DATABASE new_db;
CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY NOT NULL) ENGINE=tokudb;
ALTER TABLE test.t1 RENAME new_db.t1;
The content of "test" directory:
db.opt
The content of "new_db" directory:
db.opt
t1.frm
t1_main_id.tokudb
t1_status_id.tokudb
DROP DATABASE new_db;
######
# Tokudb and mysql data dirs are the same, rename to nonexistent db
###
CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY NOT NULL) ENGINE=tokudb;
CALL mtr.add_suppression("because destination db does not exist");
ALTER TABLE test.t1 RENAME foo.t1;
ERROR HY000: Error on rename of './test/t1' to './foo/t1' (errno: 2 "No such file or directory")
DROP TABLE t1;
SELECT @@tokudb_data_dir;
@@tokudb_data_dir
NULL
SELECT @@tokudb_dir_per_db;
@@tokudb_dir_per_db
0
######
# Tokudb and mysql data dirs are different, rename to existent db
###
CREATE DATABASE new_db;
CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY NOT NULL) ENGINE=tokudb;
ALTER TABLE test.t1 RENAME new_db.t1;
The content of "test" direcotry:
The content of "new_db" directory:
DROP DATABASE new_db;
######
# Tokudb and mysql data dirs are different, rename to nonexistent db
###
CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY NOT NULL) ENGINE=tokudb;
CALL mtr.add_suppression("because destination db does not exist");
ALTER TABLE test.t1 RENAME foo.t1;
ERROR HY000: Error on rename of './test/t1' to './foo/t1' (errno: 2 "No such file or directory")
DROP TABLE t1;
SET GLOBAL tokudb_dir_per_db=default;