Debian Codegraph @

mysql-test/suite/test_services/r/test_table_access.result

raw
1 INSTALL COMPONENT 'file://component_test_table_access';
2 SELECT test_table_access_driver("unknown test");
3 test_table_access_driver("unknown test")
4 NULL
5 SELECT test_table_access_driver("INSERT-CUSTOMER-STRESS-1");
6 test_table_access_driver("INSERT-CUSTOMER-STRESS-1")
7 create() failed
8 SELECT test_table_access_driver("INSERT-CUSTOMER-STRESS-2");
9 test_table_access_driver("INSERT-CUSTOMER-STRESS-2")
10 get() failed
11 SELECT test_table_access_driver("INSERT-CUSTOMER");
12 test_table_access_driver("INSERT-CUSTOMER")
13 get() failed
14 CREATE SCHEMA shop;
15 SELECT test_table_access_driver("INSERT-CUSTOMER");
16 test_table_access_driver("INSERT-CUSTOMER")
17 get() failed
18 CREATE TABLE shop.customer (x integer);
19 SELECT test_table_access_driver("INSERT-CUSTOMER-STRESS-3");
20 test_table_access_driver("INSERT-CUSTOMER-STRESS-3")
21 get() failed
22 SELECT test_table_access_driver("INSERT-CUSTOMER");
23 test_table_access_driver("INSERT-CUSTOMER")
24 check() failed
25 DROP TABLE shop.customer;
26 CREATE TABLE shop.customer(x integer, y integer, z integer);
27 SELECT test_table_access_driver("INSERT-CUSTOMER");
28 test_table_access_driver("INSERT-CUSTOMER")
29 check() failed
30 DROP TABLE shop.customer;
31 CREATE TABLE shop.customer(
32 `ID` integer not null,
33 `NAME` varchar(50) not null,
34 `ADDRESS` varchar(255));
35 SELECT test_table_access_driver("INSERT-CUSTOMER-NO-COMMIT");
36 test_table_access_driver("INSERT-CUSTOMER-NO-COMMIT")
37 OK, but forgot to commit
38 SELECT * from shop.customer;
39 ID NAME ADDRESS
40 SELECT test_table_access_driver("INSERT-CUSTOMER-ROLLBACK");
41 test_table_access_driver("INSERT-CUSTOMER-ROLLBACK")
42 OK
43 SELECT * from shop.customer;
44 ID NAME ADDRESS
45 SELECT test_table_access_driver("INSERT-CUSTOMER");
46 test_table_access_driver("INSERT-CUSTOMER")
47 OK
48 SELECT * from shop.customer;
49 ID NAME ADDRESS
50 1 John Doe NULL
51 SELECT test_table_access_driver("FETCH-ORDER");
52 test_table_access_driver("FETCH-ORDER")
53 get(order) failed
54 CREATE TABLE `shop`.`order` (x integer);
55 SELECT test_table_access_driver("FETCH-ORDER");
56 test_table_access_driver("FETCH-ORDER")
57 check(order) failed
58 DROP TABLE `shop`.`order`;
59 CREATE TABLE `shop`.`order` (
60 CUSTOMER_ID INTEGER not null,
61 ORDER_ID INTEGER not null,
62 ORDER_COMMENT VARCHAR(50),
63 DATE_CREATED DATE);
64 SELECT test_table_access_driver("FETCH-ORDER");
65 test_table_access_driver("FETCH-ORDER")
66 get(order_line) failed
67 CREATE TABLE `shop`.`order_line` (y integer);
68 SELECT test_table_access_driver("FETCH-ORDER");
69 test_table_access_driver("FETCH-ORDER")
70 check(order_line) failed
71 DROP TABLE `shop`.`order_line`;
72 CREATE TABLE `shop`.`order_line` (
73 ORDER_ID INTEGER not null,
74 LINE_NUM INTEGER not null,
75 ITEM_ID INTEGER not null,
76 UNIT_PRICE DECIMAL(5,2) not null,
77 QTY INTEGER not null);
78 SELECT test_table_access_driver("FETCH-ORDER");
79 test_table_access_driver("FETCH-ORDER")
80 init(order::pk) failed
81 ALTER TABLE `shop`.`order` ADD INDEX index_date_created(DATE_CREATED);
82 SELECT TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX, COLUMN_NAME, IS_VISIBLE
83 FROM INFORMATION_SCHEMA.STATISTICS
84 WHERE TABLE_SCHEMA = 'shop'
85 ORDER BY TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX;
86 TABLE_SCHEMA TABLE_NAME INDEX_NAME SEQ_IN_INDEX COLUMN_NAME IS_VISIBLE
87 shop order index_date_created 1 DATE_CREATED YES
88 SHOW CREATE TABLE `shop`.`order`;
89 Table Create Table
90 order CREATE TABLE `order` (
91 `CUSTOMER_ID` int NOT NULL,
92 `ORDER_ID` int NOT NULL,
93 `ORDER_COMMENT` varchar(50) DEFAULT NULL,
94 `DATE_CREATED` date DEFAULT NULL,
95 KEY `index_date_created` (`DATE_CREATED`)
96 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
97 SELECT test_table_access_driver("FETCH-ORDER");
98 test_table_access_driver("FETCH-ORDER")
99 init(order::pk) failed
100 ALTER TABLE `shop`.`order` ADD KEY(ORDER_ID);
101 SELECT TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX, COLUMN_NAME, IS_VISIBLE
102 FROM INFORMATION_SCHEMA.STATISTICS
103 WHERE TABLE_SCHEMA = 'shop'
104 ORDER BY TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX;
105 TABLE_SCHEMA TABLE_NAME INDEX_NAME SEQ_IN_INDEX COLUMN_NAME IS_VISIBLE
106 shop order index_date_created 1 DATE_CREATED YES
107 shop order ORDER_ID 1 ORDER_ID YES
108 SELECT test_table_access_driver("FETCH-ORDER");
109 test_table_access_driver("FETCH-ORDER")
110 init(order::pk) failed
111 ALTER TABLE `shop`.`order` DROP KEY ORDER_ID;
112 ALTER TABLE `shop`.`order` ADD PRIMARY KEY(ORDER_ID);
113 SELECT TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX, COLUMN_NAME, IS_VISIBLE
114 FROM INFORMATION_SCHEMA.STATISTICS
115 WHERE TABLE_SCHEMA = 'shop'
116 ORDER BY TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX;
117 TABLE_SCHEMA TABLE_NAME INDEX_NAME SEQ_IN_INDEX COLUMN_NAME IS_VISIBLE
118 shop order index_date_created 1 DATE_CREATED YES
119 shop order PRIMARY 1 ORDER_ID YES
120 SELECT test_table_access_driver("FETCH-ORDER");
121 test_table_access_driver("FETCH-ORDER")
122 No such order
123 INSERT INTO `shop`.`order` VALUES(1, 1000, 'This is order 1000', '2023-04-01');
124 INSERT INTO `shop`.`order` VALUES(1, 1002, 'This is order 1002', '2048-04-01');
125 SELECT test_table_access_driver("FETCH-ORDER");
126 test_table_access_driver("FETCH-ORDER")
127 No such order
128 INSERT INTO `shop`.`order` VALUES(1, 1001, 'This is order 1001', '2020-12-31');
129 SELECT test_table_access_driver("FETCH-ORDER");
130 test_table_access_driver("FETCH-ORDER")
131 init(order_line::pk) failed
132 ALTER TABLE `shop`.`order_line` ADD PRIMARY KEY(ORDER_ID, LINE_NUM);
133 SELECT test_table_access_driver("FETCH-ORDER");
134 test_table_access_driver("FETCH-ORDER")
135 found: (This is order 1001), no order line
136 INSERT INTO `shop`.`order_line` VALUES(1000, 1, 888, 12.23, 10);
137 INSERT INTO `shop`.`order_line` VALUES(1000, 2, 777, 34.45, 20);
138 INSERT INTO `shop`.`order_line` VALUES(1000, 3, 666, 8.99, 5);
139 INSERT INTO `shop`.`order_line` VALUES(1002, 1, 555, 100, 1);
140 INSERT INTO `shop`.`order_line` VALUES(1002, 2, 444, 0.99, 1000);
141 SELECT test_table_access_driver("FETCH-ORDER");
142 test_table_access_driver("FETCH-ORDER")
143 found: (This is order 1001), no order line
144 INSERT INTO `shop`.`order_line` VALUES(1001, 1, 333, 12, 1);
145 SELECT test_table_access_driver("FETCH-ORDER");
146 test_table_access_driver("FETCH-ORDER")
147 found: (This is order 1001), total qty: 1
148 INSERT INTO `shop`.`order_line` VALUES(1001, 2, 222, 24, 5);
149 SELECT test_table_access_driver("FETCH-ORDER");
150 test_table_access_driver("FETCH-ORDER")
151 found: (This is order 1001), total qty: 6
152 SELECT test_table_access_driver("INDEX-SCAN");
153 test_table_access_driver("INDEX-SCAN")
154 get(warehouse) failed
155 CREATE TABLE `shop`.`warehouse` (BUILDING_ID integer);
156 SELECT test_table_access_driver("INDEX-SCAN");
157 test_table_access_driver("INDEX-SCAN")
158 check(warehouse) failed
159 DROP TABLE `shop`.`warehouse`;
160 CREATE TABLE `shop`.`warehouse` (
161 BUILDING_ID integer not null,
162 FLOOR_NUMBER integer not null,
163 ALLEY_NUMBER integer not null,
164 SHELVE_NUMBER integer not null,
165 CAPACITY integer not null,
166 DESCRIPTION VARCHAR(100));
167 SELECT test_table_access_driver("INDEX-SCAN");
168 test_table_access_driver("INDEX-SCAN")
169 init(shelves) failed
170 ALTER TABLE `shop`.`warehouse` ADD INDEX some_index(DESCRIPTION);
171 SELECT test_table_access_driver("INDEX-SCAN");
172 test_table_access_driver("INDEX-SCAN")
173 init(shelves) failed
174 ALTER TABLE `shop`.`warehouse` ADD INDEX `SHELVES`(SHELVE_NUMBER);
175 SELECT test_table_access_driver("INDEX-SCAN");
176 test_table_access_driver("INDEX-SCAN")
177 init(shelves) failed
178 ALTER TABLE `shop`.`warehouse` DROP INDEX `SHELVES`;
179 ALTER TABLE `shop`.`warehouse` ADD INDEX `SHELVES`(
180 SHELVE_NUMBER, ALLEY_NUMBER, FLOOR_NUMBER, BUILDING_ID);
181 SELECT test_table_access_driver("INDEX-SCAN");
182 test_table_access_driver("INDEX-SCAN")
183 init(shelves) failed
184 ALTER TABLE `shop`.`warehouse` DROP INDEX `SHELVES`;
185 ALTER TABLE `shop`.`warehouse` ADD INDEX `SHELVES`(
186 BUILDING_ID, ALLEY_NUMBER, FLOOR_NUMBER, SHELVE_NUMBER);
187 SELECT test_table_access_driver("INDEX-SCAN");
188 test_table_access_driver("INDEX-SCAN")
189 init(shelves) failed
190 ALTER TABLE `shop`.`warehouse` DROP INDEX `SHELVES`;
191 ALTER TABLE `shop`.`warehouse` ADD INDEX `SHELVES`(
192 BUILDING_ID, FLOOR_NUMBER, ALLEY_NUMBER, SHELVE_NUMBER, DESCRIPTION);
193 SELECT test_table_access_driver("INDEX-SCAN");
194 test_table_access_driver("INDEX-SCAN")
195 init(shelves) failed
196 ALTER TABLE `shop`.`warehouse` DROP INDEX `SHELVES`;
197 ALTER TABLE `shop`.`warehouse` ADD INDEX `SHELVES`(
198 BUILDING_ID, FLOOR_NUMBER, ALLEY_NUMBER, SHELVE_NUMBER);
199 SELECT test_table_access_driver("INDEX-SCAN");
200 test_table_access_driver("INDEX-SCAN")
201 No shelve with min capacity (100) in anywhere
202 SELECT test_table_access_driver("INDEX-FETCH-B");
203 test_table_access_driver("INDEX-FETCH-B")
204 No shelve with min capacity (100) in B:1005
205 SELECT test_table_access_driver("INDEX-FETCH-BF");
206 test_table_access_driver("INDEX-FETCH-BF")
207 No shelve with min capacity (100) in B:1005 F:5
208 SELECT test_table_access_driver("INDEX-FETCH-BFA");
209 test_table_access_driver("INDEX-FETCH-BFA")
210 No shelve with min capacity (100) in B:1005 F:5 A:5
211 SELECT test_table_access_driver("INDEX-FETCH-BFAS");
212 test_table_access_driver("INDEX-FETCH-BFAS")
213 No shelve with min capacity (100) in B:1005 F:5 A:5 S:5
214 INSERT INTO `shop`.`warehouse` VALUES(1007, 4, 3, 12, 50, "no comments");
215 SELECT test_table_access_driver("INDEX-SCAN");
216 test_table_access_driver("INDEX-SCAN")
217 No shelve with min capacity (100) in anywhere
218 SELECT test_table_access_driver("INDEX-FETCH-B");
219 test_table_access_driver("INDEX-FETCH-B")
220 No shelve with min capacity (100) in B:1005
221 SELECT test_table_access_driver("INDEX-FETCH-BF");
222 test_table_access_driver("INDEX-FETCH-BF")
223 No shelve with min capacity (100) in B:1005 F:5
224 SELECT test_table_access_driver("INDEX-FETCH-BFA");
225 test_table_access_driver("INDEX-FETCH-BFA")
226 No shelve with min capacity (100) in B:1005 F:5 A:5
227 SELECT test_table_access_driver("INDEX-FETCH-BFAS");
228 test_table_access_driver("INDEX-FETCH-BFAS")
229 No shelve with min capacity (100) in B:1005 F:5 A:5 S:5
230 INSERT INTO `shop`.`warehouse` VALUES(1007, 4, 3, 11, 150, "no comments");
231 SELECT test_table_access_driver("INDEX-SCAN");
232 test_table_access_driver("INDEX-SCAN")
233 Found capacity (150) for min (100) at B:1007 F:4 A:3 S:11
234 SELECT test_table_access_driver("INDEX-FETCH-B");
235 test_table_access_driver("INDEX-FETCH-B")
236 No shelve with min capacity (100) in B:1005
237 SELECT test_table_access_driver("INDEX-FETCH-BF");
238 test_table_access_driver("INDEX-FETCH-BF")
239 No shelve with min capacity (100) in B:1005 F:5
240 SELECT test_table_access_driver("INDEX-FETCH-BFA");
241 test_table_access_driver("INDEX-FETCH-BFA")
242 No shelve with min capacity (100) in B:1005 F:5 A:5
243 SELECT test_table_access_driver("INDEX-FETCH-BFAS");
244 test_table_access_driver("INDEX-FETCH-BFAS")
245 No shelve with min capacity (100) in B:1005 F:5 A:5 S:5
246 INSERT INTO `shop`.`warehouse` VALUES(1003, 4, 3, 11, 250, "no comments");
247 INSERT INTO `shop`.`warehouse` VALUES(1005, 6, 3, 11, 6311, "no comments");
248 INSERT INTO `shop`.`warehouse` VALUES(1005, 4, 3, 11, 4311, "no comments");
249 SELECT test_table_access_driver("INDEX-SCAN");
250 test_table_access_driver("INDEX-SCAN")
251 Found capacity (250) for min (100) at B:1003 F:4 A:3 S:11
252 SELECT test_table_access_driver("INDEX-FETCH-B");
253 test_table_access_driver("INDEX-FETCH-B")
254 Found capacity (4311) for min (100) at B:1005 F:4 A:3 S:11
255 SELECT test_table_access_driver("INDEX-FETCH-BF");
256 test_table_access_driver("INDEX-FETCH-BF")
257 No shelve with min capacity (100) in B:1005 F:5
258 SELECT test_table_access_driver("INDEX-FETCH-BFA");
259 test_table_access_driver("INDEX-FETCH-BFA")
260 No shelve with min capacity (100) in B:1005 F:5 A:5
261 SELECT test_table_access_driver("INDEX-FETCH-BFAS");
262 test_table_access_driver("INDEX-FETCH-BFAS")
263 No shelve with min capacity (100) in B:1005 F:5 A:5 S:5
264 INSERT INTO `shop`.`warehouse` VALUES(1003, 4, 3, 11, 250, "no comments");
265 INSERT INTO `shop`.`warehouse` VALUES(1005, 5, 7, 18, 5718, "no comments");
266 INSERT INTO `shop`.`warehouse` VALUES(1005, 5, 2, 19, 5219, "no comments");
267 SELECT test_table_access_driver("INDEX-SCAN");
268 test_table_access_driver("INDEX-SCAN")
269 Found capacity (250) for min (100) at B:1003 F:4 A:3 S:11
270 SELECT test_table_access_driver("INDEX-FETCH-B");
271 test_table_access_driver("INDEX-FETCH-B")
272 Found capacity (4311) for min (100) at B:1005 F:4 A:3 S:11
273 SELECT test_table_access_driver("INDEX-FETCH-BF");
274 test_table_access_driver("INDEX-FETCH-BF")
275 Found capacity (5219) for min (100) at B:1005 F:5 A:2 S:19
276 SELECT test_table_access_driver("INDEX-FETCH-BFA");
277 test_table_access_driver("INDEX-FETCH-BFA")
278 No shelve with min capacity (100) in B:1005 F:5 A:5
279 SELECT test_table_access_driver("INDEX-FETCH-BFAS");
280 test_table_access_driver("INDEX-FETCH-BFAS")
281 No shelve with min capacity (100) in B:1005 F:5 A:5 S:5
282 INSERT INTO `shop`.`warehouse` VALUES(1002, 2, 2, 2, 20, "no comments");
283 INSERT INTO `shop`.`warehouse` VALUES(1005, 5, 5, 33, 5533, "no comments");
284 INSERT INTO `shop`.`warehouse` VALUES(1005, 5, 5, 22, 5522, "no comments");
285 INSERT INTO `shop`.`warehouse` VALUES(1005, 5, 5, 11, 11, "no comments");
286 SELECT test_table_access_driver("INDEX-SCAN");
287 test_table_access_driver("INDEX-SCAN")
288 Found capacity (250) for min (100) at B:1003 F:4 A:3 S:11
289 SELECT test_table_access_driver("INDEX-FETCH-B");
290 test_table_access_driver("INDEX-FETCH-B")
291 Found capacity (4311) for min (100) at B:1005 F:4 A:3 S:11
292 SELECT test_table_access_driver("INDEX-FETCH-BF");
293 test_table_access_driver("INDEX-FETCH-BF")
294 Found capacity (5219) for min (100) at B:1005 F:5 A:2 S:19
295 SELECT test_table_access_driver("INDEX-FETCH-BFA");
296 test_table_access_driver("INDEX-FETCH-BFA")
297 Found capacity (5522) for min (100) at B:1005 F:5 A:5 S:22
298 SELECT test_table_access_driver("INDEX-FETCH-BFAS");
299 test_table_access_driver("INDEX-FETCH-BFAS")
300 No shelve with min capacity (100) in B:1005 F:5 A:5 S:5
301 INSERT INTO `shop`.`warehouse` VALUES(1001, 5, 5, 5, 12, "no comments");
302 INSERT INTO `shop`.`warehouse` VALUES(1005, 5, 5, 2, 552, "no comments");
303 INSERT INTO `shop`.`warehouse` VALUES(1005, 5, 5, 7, 557, "no comments");
304 INSERT INTO `shop`.`warehouse` VALUES(1005, 5, 5, 5, 5555, "no comments");
305 SELECT test_table_access_driver("INDEX-SCAN");
306 test_table_access_driver("INDEX-SCAN")
307 Found capacity (250) for min (100) at B:1003 F:4 A:3 S:11
308 SELECT test_table_access_driver("INDEX-FETCH-B");
309 test_table_access_driver("INDEX-FETCH-B")
310 Found capacity (4311) for min (100) at B:1005 F:4 A:3 S:11
311 SELECT test_table_access_driver("INDEX-FETCH-BF");
312 test_table_access_driver("INDEX-FETCH-BF")
313 Found capacity (5219) for min (100) at B:1005 F:5 A:2 S:19
314 SELECT test_table_access_driver("INDEX-FETCH-BFA");
315 test_table_access_driver("INDEX-FETCH-BFA")
316 Found capacity (552) for min (100) at B:1005 F:5 A:5 S:2
317 SELECT test_table_access_driver("INDEX-FETCH-BFAS");
318 test_table_access_driver("INDEX-FETCH-BFAS")
319 Found capacity (5555) for min (100) at B:1005 F:5 A:5 S:5
320 DROP TABLE shop.warehouse;
321 DROP TABLE shop.customer;
322 DROP SCHEMA shop;
323 UNINSTALL COMPONENT 'file://component_test_table_access';