| 1 |
set binlog_format=statement; |
| 2 |
Warnings: |
| 3 |
Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release. |
| 4 |
|
| 5 |
# 'DROP TABLE IF EXISTS <deleted table>' are binlogged |
| 6 |
# for each table in SEs not supporting atomic DDL which |
| 7 |
# were dropped by failed 'DROP DATABASE'. |
| 8 |
# |
| 9 |
# Unlike test for bug#11765416/58381 this test uses MyISAM |
| 10 |
# for t1. So failed DROP DATABASE will have side-effect even |
| 11 |
# though removal of InnoDB tables is rolled back. |
| 12 |
# DROP TABLE IF EXISTS is logged for MyISAM table in this case. |
| 13 |
RESET MASTER; |
| 14 |
CREATE DATABASE testing_1; |
| 15 |
USE testing_1; |
| 16 |
CREATE TABLE t1(c1 INT) ENGINE=MyISAM; |
| 17 |
CREATE TABLE t2(c1 INT PRIMARY KEY) ENGINE=InnoDB; |
| 18 |
# |
| 19 |
# 'DROP DATABASE' will fail but will delete table t1. |
| 20 |
# |
| 21 |
SET SESSION DEBUG='+d,rm_table_no_locks_abort_after_atomic_tables'; |
| 22 |
DROP DATABASE testing_1; |
| 23 |
ERROR HY000: Unknown error |
| 24 |
SET SESSION DEBUG='-d,rm_table_no_locks_abort_after_atomic_tables'; |
| 25 |
include/show_binlog_events.inc |
| 26 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 27 |
binlog.000001 # Query # # CREATE DATABASE testing_1 |
| 28 |
binlog.000001 # Query # # use `testing_1`; CREATE TABLE t1(c1 INT) ENGINE=MyISAM |
| 29 |
binlog.000001 # Query # # use `testing_1`; CREATE TABLE t2(c1 INT PRIMARY KEY) ENGINE=InnoDB |
| 30 |
binlog.000001 # Query # # use `testing_1`; DROP TABLE IF EXISTS `t1` /* generated by server */ |
| 31 |
# Cleanup. |
| 32 |
DROP DATABASE testing_1; |
| 33 |
set binlog_format=mixed; |
| 34 |
Warnings: |
| 35 |
Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release. |
| 36 |
|
| 37 |
# 'DROP TABLE IF EXISTS <deleted table>' are binlogged |
| 38 |
# for each table in SEs not supporting atomic DDL which |
| 39 |
# were dropped by failed 'DROP DATABASE'. |
| 40 |
# |
| 41 |
# Unlike test for bug#11765416/58381 this test uses MyISAM |
| 42 |
# for t1. So failed DROP DATABASE will have side-effect even |
| 43 |
# though removal of InnoDB tables is rolled back. |
| 44 |
# DROP TABLE IF EXISTS is logged for MyISAM table in this case. |
| 45 |
RESET MASTER; |
| 46 |
CREATE DATABASE testing_1; |
| 47 |
USE testing_1; |
| 48 |
CREATE TABLE t1(c1 INT) ENGINE=MyISAM; |
| 49 |
CREATE TABLE t2(c1 INT PRIMARY KEY) ENGINE=InnoDB; |
| 50 |
# |
| 51 |
# 'DROP DATABASE' will fail but will delete table t1. |
| 52 |
# |
| 53 |
SET SESSION DEBUG='+d,rm_table_no_locks_abort_after_atomic_tables'; |
| 54 |
DROP DATABASE testing_1; |
| 55 |
ERROR HY000: Unknown error |
| 56 |
SET SESSION DEBUG='-d,rm_table_no_locks_abort_after_atomic_tables'; |
| 57 |
include/show_binlog_events.inc |
| 58 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 59 |
binlog.000001 # Query # # CREATE DATABASE testing_1 |
| 60 |
binlog.000001 # Query # # use `testing_1`; CREATE TABLE t1(c1 INT) ENGINE=MyISAM |
| 61 |
binlog.000001 # Query # # use `testing_1`; CREATE TABLE t2(c1 INT PRIMARY KEY) ENGINE=InnoDB |
| 62 |
binlog.000001 # Query # # use `testing_1`; DROP TABLE IF EXISTS `t1` /* generated by server */ |
| 63 |
# Cleanup. |
| 64 |
DROP DATABASE testing_1; |
| 65 |
set binlog_format='row'; |
| 66 |
Warnings: |
| 67 |
Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release. |
| 68 |
|
| 69 |
# 'DROP TABLE IF EXISTS <deleted table>' are binlogged |
| 70 |
# for each table in SEs not supporting atomic DDL which |
| 71 |
# were dropped by failed 'DROP DATABASE'. |
| 72 |
# |
| 73 |
# Unlike test for bug#11765416/58381 this test uses MyISAM |
| 74 |
# for t1. So failed DROP DATABASE will have side-effect even |
| 75 |
# though removal of InnoDB tables is rolled back. |
| 76 |
# DROP TABLE IF EXISTS is logged for MyISAM table in this case. |
| 77 |
RESET MASTER; |
| 78 |
CREATE DATABASE testing_1; |
| 79 |
USE testing_1; |
| 80 |
CREATE TABLE t1(c1 INT) ENGINE=MyISAM; |
| 81 |
CREATE TABLE t2(c1 INT PRIMARY KEY) ENGINE=InnoDB; |
| 82 |
# |
| 83 |
# 'DROP DATABASE' will fail but will delete table t1. |
| 84 |
# |
| 85 |
SET SESSION DEBUG='+d,rm_table_no_locks_abort_after_atomic_tables'; |
| 86 |
DROP DATABASE testing_1; |
| 87 |
ERROR HY000: Unknown error |
| 88 |
SET SESSION DEBUG='-d,rm_table_no_locks_abort_after_atomic_tables'; |
| 89 |
include/show_binlog_events.inc |
| 90 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 91 |
binlog.000001 # Query # # CREATE DATABASE testing_1 |
| 92 |
binlog.000001 # Query # # use `testing_1`; CREATE TABLE t1(c1 INT) ENGINE=MyISAM |
| 93 |
binlog.000001 # Query # # use `testing_1`; CREATE TABLE t2(c1 INT PRIMARY KEY) ENGINE=InnoDB |
| 94 |
binlog.000001 # Query # # use `testing_1`; DROP TABLE IF EXISTS `t1` /* generated by server */ |
| 95 |
# Cleanup. |
| 96 |
DROP DATABASE testing_1; |
| 97 |
show databases; |
| 98 |
Database |
| 99 |
information_schema |
| 100 |
mtr |
| 101 |
mysql |
| 102 |
performance_schema |
| 103 |
sys |
| 104 |
test |