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 84 85
|
*** TEST CASE 1 ***
*** Positive test that a table named mtr__acl_test_table exhibits
*** the special behavior used for upgrading ACL tables into 8.0
At MySQL Server 1
USE mysql;
CREATE TABLE mtr__acl_test_table (i int not null primary key, j int)
ENGINE=ndb;
INSERT INTO mtr__acl_test_table values(1,2);
INSERT INTO mtr__acl_test_table values(2,3);
INSERT INTO mtr__acl_test_table values(3,4);
ALTER TABLE mtr__acl_test_table ENGINE=InnoDB;
SELECT * FROM mtr__acl_test_table ORDER BY i;
i j
1 2
2 3
3 4
SELECT engine FROM INFORMATION_SCHEMA.TABLES
WHERE table_name='mtr__acl_test_table';
ENGINE
InnoDB
At MySQL Server 2
USE mysql;
SELECT engine FROM INFORMATION_SCHEMA.TABLES
WHERE table_name='mtr__acl_test_table';
ENGINE
ndbcluster
SELECT * FROM mtr__acl_test_table ORDER BY i;
i j
1 2
2 3
3 4
INSERT INTO mtr__acl_test_table values(4,5);
At MySQL Server 1
SELECT * FROM mtr__acl_test_table ORDER BY i;
i j
1 2
2 3
3 4
At MySQL Server 3 also migrate the table to InnoDB
SELECT engine FROM INFORMATION_SCHEMA.TABLES
WHERE table_name='mtr__acl_test_table';
ENGINE
ndbcluster
ALTER TABLE mysql.mtr__acl_test_table ENGINE=InnoDB;
At MySQL Server 2, DROP the NDB table:
DROP TABLE mysql.mtr__acl_test_table;
Warnings:
Warning 1296 Node <nodeid> 'Distribution of DROP TABLE 'mtr__acl_test_table' failed'
Warning 1296 Node <nodeid> 'Distribution of DROP TABLE 'mtr__acl_test_table' failed'
At MySQL Server 4, Confirm that the NDB table has been dropped
SELECT engine FROM INFORMATION_SCHEMA.TABLES
WHERE table_name='mtr__acl_test_table';
ENGINE
At MySQL Server 1
SELECT COUNT(*) FROM mtr__acl_test_table;
COUNT(*)
3
DROP TABLE mtr__acl_test_table;
At MySQL Server 3 Drop the local InnoDB table
DROP TABLE mysql.mtr__acl_test_table;
*** TEST CASE 2 ***
*** Negative test that a table *not* named mtr__acl_test_table
*** does not exhibit the special behavior
CREATE TABLE mtr__acl_test_table_2 (i int not null primary key, j int)
ENGINE=ndb;
INSERT INTO mtr__acl_test_table_2 values(1,2);
INSERT INTO mtr__acl_test_table_2 values(2,3);
INSERT INTO mtr__acl_test_table_2 values(3,4);
ALTER TABLE mtr__acl_test_table_2 ENGINE=InnoDB;
SELECT * FROM mtr__acl_test_table_2 ORDER BY i;
i j
1 2
2 3
3 4
SELECT engine FROM INFORMATION_SCHEMA.TABLES
WHERE table_name='mtr__acl_test_table_2';
ENGINE
InnoDB
At MySQL 2 we expect the table does not exist
SELECT count(*) FROM INFORMATION_SCHEMA.TABLES
WHERE table_name='mtr__acl_test_table_2';
count(*)
0
Back at mysqld1 drop the negative test table
DROP TABLE mtr__acl_test_table_2;
|