Debian Codegraph @

mysql-test/suite/innodb/t/builder_insert_direct_freed.test

raw
1 --source include/have_debug.inc
2 # Test error handling in case m_btr_load was found nullptr
3
4 --echo # Bug scenario:
5 CREATE TABLE t1 (c1 INT);
6
7 --echo # Create big enough table to ensure another call to Builder::insert_direct
8 --disable_query_log
9 call mtr.add_suppression("\\[ERROR\\] .* DDL failed as Builder is already freed");
10 DELIMITER |;
11 CREATE PROCEDURE populate_t1(IN BASE INT, IN SIZE INT)
12 BEGIN
13 DECLARE i INT DEFAULT BASE;
14 WHILE (i <= SIZE) DO
15 INSERT INTO t1 values (i);
16 SET i = i + 1;
17 END WHILE;
18 END|
19 DELIMITER ;|
20
21 CALL populate_t1(0, 10000);
22 DROP PROCEDURE populate_t1;
23 --enable_query_log
24
25 SELECT COUNT(*) FROM t1;
26
27 SET DEBUG="+d,builder_insert_direct_no_builder";
28 --error ER_GET_ERRNO
29 ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ALGORITHM=INPLACE;
30
31 DROP TABLE t1;