1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
--source connect.inc
--source include/have_debug.inc
# Force restart to start MySQL Servers with the
# --debug=d,ndb_simulate_upgrade_from_non_dd_version
--source include/force_restart.inc
# MySQL Servers were started with --debug=d,ndb_simulate_upgrade_from_non_dd_version
# This simulates an ongoing upgrade and atleast one data node still running 7.6
# The ndb_schema table will not be upgraded. Suppress any warnings thrown by MySQL Servers.
let $i = $NUM_MYSQLDS;
while($i)
{
connection mysqld$i;
--disable_query_log
call mtr.add_suppression("Creating table definition without .* column");
--enable_query_log
dec $i;
}
--echo # Verify that NDB SE DDLs are blocked in all MySQL Servers
let $i = $NUM_MYSQLDS;
while($i)
{
connection mysqld$i;
--error ER_DISALLOWED_OPERATION
create table t1 (a int) engine ndb;
dec $i;
}
--echo # Verify that the ndb_schema table was not upgraded
--source check_ndb_schema_upgrade_status.inc
--echo # Verify that DDLs are allowed when MySQL Server see all API nodes as
--echo # upgraded to version supporting new MySQL DD
let $i = $NUM_MYSQLDS;
while($i)
{
connection mysqld$i;
set GLOBAL debug="-d,ndb_simulate_upgrade_from_non_dd_version";
create table t1 (a int) engine ndb;
drop table t1;
dec $i;
}
--echo # ndb_schema will be upgraded only when a MySQL Server restarts
--source check_ndb_schema_upgrade_status.inc
--echo # Restart first MySQL Server to trigger schema distribution upgrade, the
--echo # other Servers will pick it up gracefully
let $mysqld_name=mysqld.1.1;
let $param1 = --debug=-d,ndb_simulate_upgrade_from_non_dd_version,ndb_schema_skip_create_schema_op_id;
let $restart_parameters = restart: $param1;
--source include/restart_mysqld.inc
--echo # Verify that the ndb_schema table was upgraded
--source check_ndb_schema_upgrade_status.inc
let $i = 1;
while($i <= $NUM_MYSQLDS)
{
connection mysqld$i;
echo Checking mysqld$i;
# Wait until not readonly after binlog thread restart
--source include/ndb_not_readonly.inc
--echo # Verify DDLs and DMLs
create table t1(
pk int not null,
a varchar(37) not null
) engine ndb;
insert into t1 values (1, "hello");
alter table t1 add column b int null default 24;
alter table t1 modify column b int not null;
select * from t1;
drop table t1;
inc $i;
}
|