@@ -103,14 +103,18 @@ f fig
103103# dropping an excluded column should have no effect
104104$ mysql-execute name=mysql
105105ALTER TABLE foo DROP COLUMN meta_col;
106+ INSERT INTO foo VALUES ('g', 'grape');
106107
108+ # The INSERT after the DROP COLUMN forces the binlog to advance past the ALTER
109+ # TABLE event, so the SELECT must succeed after the schema change is processed.
107110> SELECT * FROM foo3;
108111a apple
109112b banana
110113c cherry
111114d date
112115e elderberry
113116f fig
117+ g grape
114118
115119> DROP TABLE foo3;
116120
@@ -123,9 +127,10 @@ c cherry
123127d date
124128e elderberry
125129f fig
130+ g grape
126131
127132$ mysql-execute name=mysql
128- INSERT INTO foo VALUES ('g ', 'grape ');
133+ INSERT INTO foo VALUES ('h ', 'honeydew ');
129134
130135> SELECT * FROM foo4;
131136a apple
@@ -158,16 +163,23 @@ b banana 7
158163
159164$ mysql-execute name=mysql
160165ALTER TABLE bar DROP COLUMN meta_col;
166+ INSERT INTO bar VALUES ('c', 'cherry', 9, 'grove');
161167
168+ # The INSERT after the DROP COLUMN forces the binlog to advance past the ALTER
169+ # TABLE event, so the SELECT must succeed after the schema change is processed.
162170> SELECT * FROM bar1;
163171a apple 5
164172b banana 7
173+ c cherry 9
165174
166175$ mysql-execute name=mysql
167176ALTER TABLE bar ADD COLUMN lastname VARCHAR(16) AFTER `name`;
177+ INSERT INTO bar VALUES ('d', 'date_lastname', 'date', 10, 'oasis');
168178
169179> SELECT * FROM bar1;
170180a apple 5
171181b banana 7
182+ c cherry 9
183+ d date 10
172184
173185> DROP SOURCE mysql_src CASCADE;
0 commit comments