Debian Codegraph @

mysql-test/suite/ndb_binlog/t/ndb_binlog_blob_alter.test

raw
1 -- source include/have_multi_ndb.inc
2 -- source include/have_binlog_format_mixed_or_row.inc
3
4 --connection server1
5 --echo Create table
6 --echo NoLogging to avoid redo overload issues + increase write rate
7 create table t1 (a int primary key, y int, b text, c text, d text, e int) engine=ndb comment='NDB_TABLE=NOLOGGING=1';
8
9 --let $rows=500
10
11 --let $i=$rows
12 --disable_query_log
13 while ($i)
14 {
15 --eval insert into t1 values ($i, 0, repeat('BJC', 1000), repeat('TSG', 2000), repeat('EIN', 3000), 0)
16 --dec $i
17 }
18 --enable_query_log
19
20 delimiter %;
21 create procedure blob_work()
22 begin
23 set @x = 0;
24 set @y = 0;
25 repeat
26 update t1 set y=@y+ 0, d=repeat('BJC', 1000), b=repeat('TSG', 2000), c= repeat('EIN', 3000), e=e+1 LIMIT 50;
27 update t1 set y=@y+ 1, c=repeat('BJC', 1000), d=repeat('TSG', 2000), b= repeat('EIN', 3000), e=e+1 LIMIT 50;
28 update t1 set y=@y+ 2, b=repeat('BJC', 1000), c=repeat('TSG', 2000), d= repeat('EIN', 3000), e=e+1 LIMIT 50;
29 update t1 set y=@y+ 3, d=repeat('BJC', 1000), b=repeat('TSG', 2000), c= repeat('EIN', 3000), e=e+1 LIMIT 50;
30 update t1 set y=@y+ 4, c=repeat('BJC', 1000), d=repeat('TSG', 2000), b= repeat('EIN', 3000), e=e+1 LIMIT 50;
31 update t1 set y=@y+ 5, b=repeat('BJC', 1000), c=repeat('TSG', 2000), d= repeat('EIN', 3000), e=e+1 LIMIT 50;
32 update t1 set y=@y+ 6, d=repeat('BJC', 1000), b=repeat('TSG', 2000), c= repeat('EIN', 3000), e=e+1 LIMIT 50;
33 update t1 set y=@y+ 7, c=repeat('BJC', 1000), d=repeat('TSG', 2000), b= repeat('EIN', 3000), e=e+1 LIMIT 50;
34 update t1 set y=@y+ 8, b=repeat('BJC', 1000), c=repeat('TSG', 2000), d= repeat('EIN', 3000), e=e+1 LIMIT 50;
35 update t1 set y=@y+ 9, d=repeat('BJC', 1000), b=repeat('TSG', 2000), c= repeat('EIN', 3000), e=e+1 LIMIT 50;
36 update t1 set y=@y+10, c=repeat('BJC', 1000), d=repeat('TSG', 2000), b= repeat('EIN', 3000), e=e+1 LIMIT 50;
37 update t1 set y=@y+11, b=repeat('BJC', 1000), c=repeat('TSG', 2000), d= repeat('EIN', 3000), e=e+1 LIMIT 50;
38 update t1 set y=@y+12, d=repeat('BJC', 1000), b=repeat('TSG', 2000), c= repeat('EIN', 3000), e=e+1 LIMIT 50;
39 update t1 set y=@y+13, c=repeat('BJC', 1000), d=repeat('TSG', 2000), b= repeat('EIN', 3000), e=e+1 LIMIT 50;
40 update t1 set y=@y+14, b=repeat('BJC', 1000), c=repeat('TSG', 2000), d= repeat('EIN', 3000), e=e+1 LIMIT 50;
41 set @y = @y+15;
42 select count(1) into @x from t1 where a=10000;
43 until @x > 0
44 end repeat;
45 end%
46 delimiter ;%
47
48 --echo Starting blob work on server 1
49 --send call blob_work()
50
51 --connection server2
52 --echo Starting adding columns to t1 on server 2
53
54 --let $cols=100
55
56 while ($cols)
57 {
58 --eval alter table t1 add column i$cols int column_format dynamic
59 --dec $cols
60 }
61
62 --echo 100 columns added
63 --echo Finish test
64 insert into t1 (a) values (10000);
65
66 --connection server1
67 --reap
68
69 drop procedure blob_work;
70 drop table test.t1;