blob: 6fcfd491af1f916d97881751762434bfc042f188 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
|
--source include/have_rocksdb.inc
--source include/have_partition.inc
--source include/not_windows.inc
#
# Check that when either DATA DIRECTORY or INDEX DIRECTORY are specified
# then MyRocks returns an appropriate error. We don't support this
# functionality and therefore shouldn't just silently accept the values.
#
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
# On a Mac, strerror() prints "Unknown error: nn", as
# opposed to "Unknown error nn" on Linux/etc.
# Replacing 'error:' with 'error' below to make the output uniform.
--replace_result error: error
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb DATA DIRECTORY = '/foo/bar/data';
--replace_result error: error
show warnings;
--replace_result error: error
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb INDEX DIRECTORY = '/foo/bar/index';
--replace_result error: error
show warnings;
#
# Verify that we'll get the same error codes when using the partitions.
#
--replace_result error: error
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE (id)
(
PARTITION P0 VALUES LESS THAN (1000)
DATA DIRECTORY = '/foo/bar/data/',
PARTITION P1 VALUES LESS THAN (2000)
DATA DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
--replace_result error: error
show warnings;
--replace_result error: error
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE (id)
(
PARTITION P0 VALUES LESS THAN (1000)
INDEX DIRECTORY = '/foo/bar/data/',
PARTITION P1 VALUES LESS THAN (2000)
INDEX DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
--replace_result error: error
show warnings;
|