| 1 |
# |
| 2 |
# Check that functionality works before and after |
| 3 |
# dropping the given util table |
| 4 |
# |
| 5 |
# Arguments: |
| 6 |
# util_table_name - name of util table |
| 7 |
# |
| 8 |
|
| 9 |
if (!$util_table_name) |
| 10 |
{ |
| 11 |
die Need the name of the util table to drop; |
| 12 |
} |
| 13 |
|
| 14 |
--connection mysqld1 |
| 15 |
CREATE TABLE t1 ( |
| 16 |
a int primary key |
| 17 |
) ENGINE = NDB; |
| 18 |
|
| 19 |
--connection mysqld3 |
| 20 |
SHOW CREATE TABLE t1; |
| 21 |
|
| 22 |
--connection mysqld5 |
| 23 |
# Clear the binlog to prepare for checking if a LOST_EVENTS appears later |
| 24 |
RESET MASTER; |
| 25 |
|
| 26 |
--echo # Drop mysql.$util_table_name from NDB |
| 27 |
--exec $NDB_DROP_TABLE -d mysql $util_table_name |
| 28 |
|
| 29 |
# Wait for all servers connected again |
| 30 |
let $i = 1; |
| 31 |
while($i <= $NUM_MYSQLDS) |
| 32 |
{ |
| 33 |
--connection mysqld$i |
| 34 |
--echo # mysqld$i: Wait until ready again... |
| 35 |
--source include/ndb_not_readonly.inc |
| 36 |
inc $i; |
| 37 |
} |
| 38 |
|
| 39 |
--connection mysqld5 |
| 40 |
# NOTE! Neither drop of ndb_schema or ndb_schema_result should have a LOST_EVENT |
| 41 |
--echo # Check if a LOST_EVENTS event was written to the binlog |
| 42 |
--source include/show_binlog_events.inc |
| 43 |
|
| 44 |
--connection mysqld1 |
| 45 |
ALTER TABLE t1 ADD COLUMN b int not null; |
| 46 |
|
| 47 |
--connection mysqld3 |
| 48 |
SHOW CREATE TABLE t1; |
| 49 |
|
| 50 |
DROP TABLE t1; |
| 51 |
|
| 52 |
# Reset args |
| 53 |
let $util_table_name= ; |