Skip to content

Commit a48cae1

Browse files
committed
Add localtest that expects gh-ost to fail on exhausted retries
1 parent 96f1a28 commit a48cae1

File tree

6 files changed

+27
-0
lines changed

6 files changed

+27
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set global max_binlog_cache_size = 1073741824; -- 1GB
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set global max_binlog_cache_size = 1024;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
drop table if exists gh_ost_test;
2+
create table gh_ost_test (
3+
id int auto_increment,
4+
name mediumtext not null,
5+
primary key (id)
6+
) auto_increment=1;
7+
8+
insert into gh_ost_test (name)
9+
select repeat('a', 1500)
10+
from information_schema.columns
11+
cross join information_schema.tables
12+
limit 1000;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--alter "modify column name mediumtext" --default-retries=1 --chunk-size=1000

localtests/test.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ test_single() {
142142
fi
143143

144144
gh-ost-test-mysql-master --default-character-set=utf8mb4 test < $tests_path/$test_name/create.sql
145+
146+
if [ -f $tests_path/$test_name/before.sql ]; then
147+
gh-ost-test-mysql-master --default-character-set=utf8mb4 test < $tests_path/$test_name/before.sql
148+
gh-ost-test-mysql-replica --default-character-set=utf8mb4 test < $tests_path/$test_name/before.sql
149+
fi
150+
145151
test_create_result=$?
146152

147153
if [ $test_create_result -ne 0 ] ; then
@@ -208,6 +214,11 @@ test_single() {
208214
gh-ost-test-mysql-replica --default-character-set=utf8mb4 test -e "set @@global.sql_mode='${original_sql_mode}'"
209215
fi
210216

217+
if [ -f $tests_path/$test_name/after.sql ]; then
218+
gh-ost-test-mysql-master --default-character-set=utf8mb4 test < $tests_path/$test_name/after.sql
219+
gh-ost-test-mysql-replica --default-character-set=utf8mb4 test < $tests_path/$test_name/after.sql
220+
fi
221+
211222
if [ -f $tests_path/$test_name/destroy.sql ] ; then
212223
gh-ost-test-mysql-master --default-character-set=utf8mb4 test < $tests_path/$test_name/destroy.sql
213224
fi

0 commit comments

Comments
 (0)