mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Make error messages from DROP TABLE and DROP TABLE IF EXISTS consistent
- IF EXISTS ends with a list of all not existing object, instead of a separate note for every not existing object - Produce a "Note" for all wrongly dropped objects (like trying to do DROP SEQUENCE for a normal table) - Do not write existing tables that could not be dropped to binlog Other things: MDEV-22820 Bogus "Unknown table" warnings produced upon attempt to drop parent table referenced by FK This was caused by an older version of this commit patch and later fixed
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# BUG#13684:
|
||||
# SP: DROP PROCEDURE|FUNCTION IF EXISTS not binlogged if routine
|
||||
# does not exist
|
||||
@@ -128,3 +130,33 @@ DROP TABLE IF EXISTS /* */ t1;
|
||||
|
||||
--source include/show_binlog_events.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22820 Bogus "Unknown table" warnings produced upon attempt to
|
||||
--echo # drop parent table referenced by FK
|
||||
--echo #
|
||||
|
||||
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
|
||||
create table t1 (a int, key(a)) engine=InnoDB;
|
||||
create table t2 (b int, foreign key(b) references t1(a)) engine=InnoDB;
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
drop table if exists t1;
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
drop table if exists t1,t0;
|
||||
show warnings;
|
||||
drop table t2,t1;
|
||||
|
||||
create table t3 (a int) engine=aria;
|
||||
|
||||
# This is not logged
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
drop table t10,t20;
|
||||
# This is logged
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
drop table t10,t20,t3;
|
||||
|
||||
# These are both logged
|
||||
drop table if exists t10,t20;
|
||||
drop table if exists t10,t20,t3;
|
||||
|
||||
--source include/show_binlog_events.inc
|
||||
|
Reference in New Issue
Block a user