| 1 |
# Emulate failure to start the NDB schema transaction |
| 2 |
# when creating a table. Note that no NDB error really occurred |
| 3 |
# and it's thus normal to have error 0. |
| 4 |
SET SESSION debug="+d,ndb_schema_trans_start_fail"; |
| 5 |
CREATE TABLE t1(a int primary key) engine = NDB; |
| 6 |
ERROR HY000: Can't create table 't1' (use SHOW WARNINGS for more info). |
| 7 |
SHOW WARNINGS; |
| 8 |
Level Code Message |
| 9 |
Warning 1296 Got error 0 'No error' from NDB |
| 10 |
Warning 1296 Failed to start NDB schema transaction |
| 11 |
Error 1005 Can't create table 't1' (use SHOW WARNINGS for more info). |
| 12 |
SET SESSION debug="-d,ndb_schema_trans_start_fail"; |
| 13 |
# Check that table does not exist |
| 14 |
SELECT * FROM t1; |
| 15 |
ERROR 42S02: Table 'test.t1' doesn't exist |
| 16 |
# Emulate failure to commit the NDB schema transaction |
| 17 |
# when creating a table. |
| 18 |
SET SESSION debug="+d,ndb_schema_trans_commit_fail"; |
| 19 |
CREATE TABLE t1(a int primary key) engine = NDB; |
| 20 |
ERROR HY000: Can't create table 't1' (use SHOW WARNINGS for more info). |
| 21 |
SHOW WARNINGS; |
| 22 |
Level Code Message |
| 23 |
Warning 1296 Got error 0 'No error' from NDB |
| 24 |
Warning 1296 Failed to commit NDB schema transaction |
| 25 |
Error 1005 Can't create table 't1' (use SHOW WARNINGS for more info). |
| 26 |
SET SESSION debug="-d,ndb_schema_trans_commit_fail"; |
| 27 |
# Check that table does not exist |
| 28 |
SELECT * FROM t1; |
| 29 |
ERROR 42S02: Table 'test.t1' doesn't exist |