| 1 |
*** TEST CASE 1 *** |
| 2 |
*** Positive test that a table named mtr__acl_test_table exhibits |
| 3 |
*** the special behavior used for upgrading ACL tables into 8.0 |
| 4 |
At MySQL Server 1 |
| 5 |
USE mysql; |
| 6 |
CREATE TABLE mtr__acl_test_table (i int not null primary key, j int) |
| 7 |
ENGINE=ndb; |
| 8 |
INSERT INTO mtr__acl_test_table values(1,2); |
| 9 |
INSERT INTO mtr__acl_test_table values(2,3); |
| 10 |
INSERT INTO mtr__acl_test_table values(3,4); |
| 11 |
ALTER TABLE mtr__acl_test_table ENGINE=InnoDB; |
| 12 |
SELECT * FROM mtr__acl_test_table ORDER BY i; |
| 13 |
i j |
| 14 |
1 2 |
| 15 |
2 3 |
| 16 |
3 4 |
| 17 |
SELECT engine FROM INFORMATION_SCHEMA.TABLES |
| 18 |
WHERE table_name='mtr__acl_test_table'; |
| 19 |
ENGINE |
| 20 |
InnoDB |
| 21 |
At MySQL Server 2 |
| 22 |
USE mysql; |
| 23 |
SELECT engine FROM INFORMATION_SCHEMA.TABLES |
| 24 |
WHERE table_name='mtr__acl_test_table'; |
| 25 |
ENGINE |
| 26 |
ndbcluster |
| 27 |
SELECT * FROM mtr__acl_test_table ORDER BY i; |
| 28 |
i j |
| 29 |
1 2 |
| 30 |
2 3 |
| 31 |
3 4 |
| 32 |
INSERT INTO mtr__acl_test_table values(4,5); |
| 33 |
At MySQL Server 1 |
| 34 |
SELECT * FROM mtr__acl_test_table ORDER BY i; |
| 35 |
i j |
| 36 |
1 2 |
| 37 |
2 3 |
| 38 |
3 4 |
| 39 |
At MySQL Server 3 also migrate the table to InnoDB |
| 40 |
SELECT engine FROM INFORMATION_SCHEMA.TABLES |
| 41 |
WHERE table_name='mtr__acl_test_table'; |
| 42 |
ENGINE |
| 43 |
ndbcluster |
| 44 |
ALTER TABLE mysql.mtr__acl_test_table ENGINE=InnoDB; |
| 45 |
At MySQL Server 2, DROP the NDB table: |
| 46 |
DROP TABLE mysql.mtr__acl_test_table; |
| 47 |
Warnings: |
| 48 |
Warning 1296 Node <nodeid> 'Distribution of DROP TABLE 'mtr__acl_test_table' failed' |
| 49 |
Warning 1296 Node <nodeid> 'Distribution of DROP TABLE 'mtr__acl_test_table' failed' |
| 50 |
At MySQL Server 4, Confirm that the NDB table has been dropped |
| 51 |
SELECT engine FROM INFORMATION_SCHEMA.TABLES |
| 52 |
WHERE table_name='mtr__acl_test_table'; |
| 53 |
ENGINE |
| 54 |
At MySQL Server 1 |
| 55 |
SELECT COUNT(*) FROM mtr__acl_test_table; |
| 56 |
COUNT(*) |
| 57 |
3 |
| 58 |
DROP TABLE mtr__acl_test_table; |
| 59 |
At MySQL Server 3 Drop the local InnoDB table |
| 60 |
DROP TABLE mysql.mtr__acl_test_table; |
| 61 |
*** TEST CASE 2 *** |
| 62 |
*** Negative test that a table *not* named mtr__acl_test_table |
| 63 |
*** does not exhibit the special behavior |
| 64 |
CREATE TABLE mtr__acl_test_table_2 (i int not null primary key, j int) |
| 65 |
ENGINE=ndb; |
| 66 |
INSERT INTO mtr__acl_test_table_2 values(1,2); |
| 67 |
INSERT INTO mtr__acl_test_table_2 values(2,3); |
| 68 |
INSERT INTO mtr__acl_test_table_2 values(3,4); |
| 69 |
ALTER TABLE mtr__acl_test_table_2 ENGINE=InnoDB; |
| 70 |
SELECT * FROM mtr__acl_test_table_2 ORDER BY i; |
| 71 |
i j |
| 72 |
1 2 |
| 73 |
2 3 |
| 74 |
3 4 |
| 75 |
SELECT engine FROM INFORMATION_SCHEMA.TABLES |
| 76 |
WHERE table_name='mtr__acl_test_table_2'; |
| 77 |
ENGINE |
| 78 |
InnoDB |
| 79 |
At MySQL 2 we expect the table does not exist |
| 80 |
SELECT count(*) FROM INFORMATION_SCHEMA.TABLES |
| 81 |
WHERE table_name='mtr__acl_test_table_2'; |
| 82 |
count(*) |
| 83 |
0 |
| 84 |
Back at mysqld1 drop the negative test table |
| 85 |
DROP TABLE mtr__acl_test_table_2; |