Debian Codegraph @

mysql-test/suite/secondary_engine/r/load.result

raw
1 #
2 # Load into and unload from secondary engine.
3 #
4 CREATE TABLE t1 (a INT) SECONDARY_ENGINE MOCK;
5 ALTER TABLE t1 SECONDARY_LOAD;
6 ALTER TABLE t1 SECONDARY_UNLOAD;
7 SHOW CREATE TABLE t1;
8 Table Create Table
9 t1 CREATE TABLE `t1` (
10 `a` int DEFAULT NULL
11 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci SECONDARY_ENGINE=MOCK
12 DROP TABLE t1;
13 #
14 # Attempt to load and unload table with no secondary engine.
15 #
16 CREATE TABLE t1 (a INT);
17 ALTER TABLE t1 SECONDARY_LOAD;
18 ERROR HY000: Secondary engine operation failed. No secondary engine defined.
19 ALTER TABLE t1 SECONDARY_UNLOAD;
20 ERROR HY000: Secondary engine operation failed. No secondary engine defined.
21 ALTER TABLE t1 SECONDARY_ENGINE NULL;
22 DROP TABLE t1;
23 #
24 # Attempt to unload temporary table with no secondary engine.
25 #
26 CREATE TEMPORARY TABLE t1 (a INT);
27 ALTER TABLE t1 SECONDARY_LOAD;
28 ERROR HY000: Secondary engine operation failed. No secondary engine defined.
29 ALTER TABLE t1 SECONDARY_UNLOAD;
30 ERROR HY000: Secondary engine operation failed. No secondary engine defined.
31 ALTER TABLE t1 SECONDARY_ENGINE NULL;
32 DROP TABLE t1;
33 #
34 # Attempt to load into secondary engine in conjunction with other DDL
35 # operations.
36 #
37 CREATE TABLE t1 (a INT) SECONDARY_ENGINE MOCK;
38 ALTER TABLE t1 SECONDARY_LOAD, FORCE;
39 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ', FORCE' at line 1
40 DROP TABLE t1;
41 #
42 # Perform alterations related to secondary engine using differing
43 # algorithms.
44 #
45 CREATE TABLE t1 (a INT) SECONDARY_ENGINE MOCK;
46 ALTER TABLE t1 SECONDARY_LOAD, ALGORITHM=INPLACE;
47 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ', ALGORITHM=INPLACE' at line 1
48 ALTER TABLE t1 SECONDARY_UNLOAD, ALGORITHM=INPLACE;
49 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ', ALGORITHM=INPLACE' at line 1
50 ALTER TABLE t1 SECONDARY_LOAD, ALGORITHM=COPY;
51 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ', ALGORITHM=COPY' at line 1
52 ALTER TABLE t1 SECONDARY_UNLOAD, ALGORITHM=COPY;
53 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ', ALGORITHM=COPY' at line 1
54 ALTER TABLE t1 SECONDARY_ENGINE NULL, ALGORITHM=INPLACE;
55 ALTER TABLE t1 SECONDARY_ENGINE MOCK, ALGORITHM=INPLACE;
56 ALTER TABLE t1 SECONDARY_ENGINE NULL, ALGORITHM=COPY;
57 ALTER TABLE t1 SECONDARY_ENGINE MOCK, ALGORITHM=COPY;
58 SHOW CREATE TABLE t1;
59 Table Create Table
60 t1 CREATE TABLE `t1` (
61 `a` int DEFAULT NULL
62 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci SECONDARY_ENGINE=MOCK
63 DROP TABLE t1;
64 #
65 # Load and unload a table in one session while another session
66 # accesses the table concurrently.
67 #
68 CREATE TABLE t1 (a INT) SECONDARY_ENGINE MOCK;
69 DROP TABLE t1;
70 #
71 # Attempt to LOCK TABLE before loading a table into secondary engine.
72 #
73 CREATE TABLE t1 (a INT) SECONDARY_ENGINE MOCK;
74 LOCK TABLES t1 WRITE;
75 ALTER TABLE t1 SECONDARY_LOAD;
76 ALTER TABLE t1 SECONDARY_UNLOAD;
77 UNLOCK TABLES;
78 LOCK TABLES t1 READ;
79 ALTER TABLE t1 SECONDARY_LOAD;
80 ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
81 ALTER TABLE t1 SECONDARY_UNLOAD;
82 ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
83 LOCK TABLES t1 WRITE;
84 ALTER TABLE t1 SECONDARY_LOAD;
85 ALTER TABLE t1 SECONDARY_UNLOAD;
86 UNLOCK TABLES;
87 ALTER TABLE t1 SECONDARY_LOAD;
88 ALTER TABLE t1 SECONDARY_UNLOAD;
89 DROP TABLE t1;
90 #
91 # Bug#28835066: Table not unloaded with SECONDARY_ENGINE = NULL
92 #
93 CREATE TABLE t1 (a INT) SECONDARY_ENGINE MOCK;
94 ALTER TABLE t1 SECONDARY_LOAD;
95 ALTER TABLE t1 SECONDARY_ENGINE NULL;
96 ALTER TABLE t1 SECONDARY_ENGINE MOCK;
97 FLUSH STATUS;
98 SELECT * FROM t1;
99 a
100 SHOW SESSION STATUS LIKE 'Secondary_engine_execution_count';
101 Variable_name Value
102 Secondary_engine_execution_count 0
103 DROP TABLE t1;
104 #
105 # Exclude some columns from secondary engine.
106 #
107 CREATE TABLE t1 (
108 a INT,
109 b INT NOT SECONDARY,
110 c INT,
111 d INT NOT SECONDARY
112 ) SECONDARY_ENGINE MOCK;
113 ALTER TABLE t1 SECONDARY_LOAD;
114 DROP TABLE t1;
115 #
116 # Attempt to exclude all columns from secondary engine.
117 #
118 CREATE TABLE t1 (a INT NOT SECONDARY, b INT NOT SECONDARY) SECONDARY_ENGINE MOCK;
119 CREATE TABLE t2 (a INT NOT SECONDARY, KEY i ((a < 10))) SECONDARY_ENGINE MOCK;
120 ALTER TABLE t1 SECONDARY_LOAD;
121 ERROR HY000: Secondary engine operation failed. All columns marked as NOT SECONDARY.
122 ALTER TABLE t2 SECONDARY_LOAD;
123 ERROR HY000: Secondary engine operation failed. All columns marked as NOT SECONDARY.
124 DROP TABLE t1, t2;