mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -165,7 +165,7 @@ drop sequence t1;
|
||||
ERROR 42S02: 'test.t1' is not a SEQUENCE
|
||||
drop sequence if exists t1;
|
||||
Warnings:
|
||||
Note 4091 Unknown SEQUENCE: 'test.t1'
|
||||
Note 4090 'test.t1' is not a SEQUENCE
|
||||
create sequence t1 start with 10 maxvalue=9;
|
||||
ERROR HY000: Sequence 'test.t1' values are conflicting
|
||||
create sequence t1 minvalue= 100 maxvalue=10;
|
||||
@ -421,12 +421,11 @@ CREATE SEQUENCE s1;
|
||||
drop sequence s1;
|
||||
drop sequence if exists t1,t2,t3,t4;
|
||||
Warnings:
|
||||
Note 4091 Unknown SEQUENCE: 'test.t3'
|
||||
Note 4090 'test.t3' is not a SEQUENCE
|
||||
Note 4091 Unknown SEQUENCE: 'test.t4'
|
||||
drop table if exists t1,t2,t3;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'test.t1'
|
||||
Note 1051 Unknown table 'test.t2'
|
||||
Note 1051 Unknown table 'test.t1,test.t2'
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (a int);
|
||||
CREATE SEQUENCE s1;
|
||||
@ -441,15 +440,15 @@ CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (a int);
|
||||
CREATE SEQUENCE s1;
|
||||
drop sequence t1,t2,s1,s2;
|
||||
ERROR 42S02: Unknown SEQUENCE: 'test.t1,test.t2,test.s2'
|
||||
ERROR 42S02: 'test.t1' is not a SEQUENCE
|
||||
drop table if exists t1,t2;
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (a int);
|
||||
CREATE SEQUENCE s1;
|
||||
drop sequence if exists t1,t2,s1,s2;
|
||||
Warnings:
|
||||
Note 4091 Unknown SEQUENCE: 'test.t1'
|
||||
Note 4091 Unknown SEQUENCE: 'test.t2'
|
||||
Note 4090 'test.t1' is not a SEQUENCE
|
||||
Note 4090 'test.t2' is not a SEQUENCE
|
||||
Note 4091 Unknown SEQUENCE: 'test.s2'
|
||||
drop table if exists t1,t2;
|
||||
CREATE TEMPORARY SEQUENCE s1;
|
||||
|
@ -342,7 +342,7 @@ drop table if exists t1,t2,s1,s2;
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (a int);
|
||||
CREATE SEQUENCE s1;
|
||||
--error ER_UNKNOWN_SEQUENCES
|
||||
--error ER_NOT_SEQUENCE2
|
||||
drop sequence t1,t2,s1,s2;
|
||||
drop table if exists t1,t2;
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
drop table if exists t1,s1,s2;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'test.t1'
|
||||
Note 1051 Unknown table 'test.s1'
|
||||
Note 1051 Unknown table 'test.s2'
|
||||
Note 1051 Unknown table 'test.t1,test.s1,test.s2'
|
||||
drop view if exists v1;
|
||||
Warnings:
|
||||
Note 4092 Unknown VIEW: 'test.v1'
|
||||
|
Reference in New Issue
Block a user