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