| 1 |
--source include/have_ndb.inc |
| 2 |
# Test is using debug only features |
| 3 |
--source include/have_debug.inc |
| 4 |
|
| 5 |
--echo # Emulate failure to start the NDB schema transaction |
| 6 |
--echo # when creating a table. Note that no NDB error really occurred |
| 7 |
--echo # and it's thus normal to have error 0. |
| 8 |
SET SESSION debug="+d,ndb_schema_trans_start_fail"; |
| 9 |
--error ER_CANT_CREATE_TABLE |
| 10 |
CREATE TABLE t1(a int primary key) engine = NDB; |
| 11 |
SHOW WARNINGS; |
| 12 |
SET SESSION debug="-d,ndb_schema_trans_start_fail"; |
| 13 |
|
| 14 |
--echo # Check that table does not exist |
| 15 |
--error ER_NO_SUCH_TABLE |
| 16 |
SELECT * FROM t1; |
| 17 |
|
| 18 |
--echo # Emulate failure to commit the NDB schema transaction |
| 19 |
--echo # when creating a table. |
| 20 |
SET SESSION debug="+d,ndb_schema_trans_commit_fail"; |
| 21 |
--error ER_CANT_CREATE_TABLE |
| 22 |
CREATE TABLE t1(a int primary key) engine = NDB; |
| 23 |
SHOW WARNINGS; |
| 24 |
SET SESSION debug="-d,ndb_schema_trans_commit_fail"; |
| 25 |
|
| 26 |
--echo # Check that table does not exist |
| 27 |
--error ER_NO_SUCH_TABLE |
| 28 |
SELECT * FROM t1; |