| 1 |
# Create big enough table to ensure another call to Builder::insert_direct |
| 2 |
CREATE TABLE t1 (c1 INT); |
| 3 |
SELECT COUNT(*) FROM t1; |
| 4 |
COUNT(*) |
| 5 |
11000 |
| 6 |
# Builder::insert_direct returns DB_ONLINE_LOG_TOO_BIG |
| 7 |
SET DEBUG="+d,builder_insert_direct_trigger_error"; |
| 8 |
ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ALGORITHM=INPLACE; |
| 9 |
ERROR HY000: Creating index 'GEN_CLUST_INDEX' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again. |
| 10 |
SET DEBUG="-d,builder_insert_direct_trigger_error"; |
| 11 |
# Builder::add_row returns DB_ONLINE_LOG_TOO_BIG |
| 12 |
SET DEBUG="+d,builder_add_row_trigger_error"; |
| 13 |
ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ALGORITHM=INPLACE; |
| 14 |
ERROR HY000: Creating index 'GEN_CLUST_INDEX' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again. |
| 15 |
SET DEBUG="-d,builder_add_row_trigger_error"; |
| 16 |
call mtr.add_suppression("\\[InnoDB\\] DDL failed as Builder is already freed"); |
| 17 |
# Builder::bulk_add_row returns DB_DUPLICATE_KEY |
| 18 |
SET DEBUG="+d,builder_bulk_add_row_trigger_error_1"; |
| 19 |
OPTIMIZE TABLE t1; |
| 20 |
Table Op Msg_type Msg_text |
| 21 |
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead |
| 22 |
test.t1 optimize error Duplicate entry '' for key '*UNKNOWN*' |
| 23 |
test.t1 optimize status Operation failed |
| 24 |
Warnings: |
| 25 |
Error 1062 Duplicate entry '' for key '*UNKNOWN*' |
| 26 |
SET DEBUG="-d,builder_bulk_add_row_trigger_error_1"; |
| 27 |
# Builder::bulk_add_row returns DB_INVALID_NULL |
| 28 |
SET DEBUG="+d,builder_bulk_add_row_trigger_error_2"; |
| 29 |
OPTIMIZE TABLE t1; |
| 30 |
Table Op Msg_type Msg_text |
| 31 |
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead |
| 32 |
test.t1 optimize error Invalid use of NULL value |
| 33 |
test.t1 optimize status Operation failed |
| 34 |
Warnings: |
| 35 |
Error 1138 Invalid use of NULL value |
| 36 |
SET DEBUG="-d,builder_bulk_add_row_trigger_error_2"; |
| 37 |
# Builder::bulk_add_row returns DB_IO_ERROR |
| 38 |
SET DEBUG="+d,builder_bulk_add_row_trigger_error_3"; |
| 39 |
OPTIMIZE TABLE t1; |
| 40 |
Table Op Msg_type Msg_text |
| 41 |
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead |
| 42 |
test.t1 optimize status OK |
| 43 |
SET DEBUG="-d,builder_bulk_add_row_trigger_error_3"; |
| 44 |
# ddl::pwrite returns DB_IO_ERROR |
| 45 |
SET DEBUG="+d,builder_bulk_add_row_trigger_error_4"; |
| 46 |
OPTIMIZE TABLE t1; |
| 47 |
Table Op Msg_type Msg_text |
| 48 |
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead |
| 49 |
test.t1 optimize status OK |
| 50 |
SET DEBUG="-d,builder_bulk_add_row_trigger_error_4"; |
| 51 |
# Pages still buffer fixed should assert during shutdown |
| 52 |
# restart |
| 53 |
# Cleanup |
| 54 |
DROP TABLE t1; |