Debian Codegraph @

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

raw
1
2 --source include/have_debug.inc
3
4 ####################################################################
5 # TC to test temp-table DML optimization changes for correctness #
6 # Sceanrio covered: #
7 # 1. test insert/delete/update of big-rec (blob) #
8 ####################################################################
9
10 #-------------------------------------------------------------------
11 #
12 # 1. test insert/delete/update of big-rec (blob) #
13 #
14 use test;
15 create temporary table t1
16 (i int, b mediumblob,
17 primary key pk(i), index sk(b(100))
18 ) engine=innodb;
19 delimiter |;
20 create procedure populate_t1()
21 begin
22 declare i int default 1;
23 while (i <= 100) do
24 insert into t1 values (i, repeat(i,1000));
25 set i = i + 1;
26 end while;
27 end|
28 create procedure populate_t1_small()
29 begin
30 declare i int default 1;
31 while (i <= 8) do
32 insert into t1 values (i, repeat(i,1000));
33 set i = i + 1;
34 end while;
35 end|
36 delimiter ;|
37 #
38 begin;
39 select count(*) from t1;
40 call populate_t1();
41 select count(*) from t1;
42 delete from t1 where i < 10;
43 select count(*) from t1;
44 commit;
45 set global innodb_purge_stop_now=ON;
46 set global innodb_purge_run_now=ON;
47 --source include/wait_innodb_all_purged.inc
48 #
49 delete from t1 where i < 20;
50 select count(*) from t1;
51 #
52 begin;
53 call populate_t1_small();
54 select count(*) from t1;
55 rollback;
56 select count(*) from t1;
57 #
58 begin;
59 select count(*) from t1;
60 update t1 set b = repeat('a', 100) where i < 100;
61 select * from t1 limit 1;
62 select count(*) from t1;
63 rollback;
64 update t1 set b = repeat('a', 100) where i < 100;
65 select * from t1 limit 1;
66 #
67 truncate table t1;
68 select count(*) from t1;
69 #
70 drop table if exists t1;
71 drop procedure populate_t1;
72 drop procedure populate_t1_small;
73
74
75 #-------------------------------------------------------------------
76 #
77 # remove test-bed
78 #
79
80