mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Give warnings for unused objects
Changed error message to be compatible with old error file Added new error message for new DUP_ENTRY syntax
This commit is contained in:
@ -393,24 +393,24 @@ DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (a int, b int);
|
||||
insert into t1 values (1,1),(1,2);
|
||||
--error 1062
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
CREATE TABLE t2 (primary key (a)) select * from t1;
|
||||
# This should give warning
|
||||
drop table if exists t2;
|
||||
--error 1062
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
CREATE TEMPORARY TABLE t2 (primary key (a)) select * from t1;
|
||||
# This should give warning
|
||||
drop table if exists t2;
|
||||
CREATE TABLE t2 (a int, b int, primary key (a));
|
||||
BEGIN;
|
||||
INSERT INTO t2 values(100,100);
|
||||
--error 1062
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
|
||||
SELECT * from t2;
|
||||
ROLLBACK;
|
||||
SELECT * from t2;
|
||||
TRUNCATE table t2;
|
||||
--error 1062
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
INSERT INTO t2 select * from t1;
|
||||
SELECT * from t2;
|
||||
drop table t2;
|
||||
@ -418,19 +418,19 @@ drop table t2;
|
||||
CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a));
|
||||
BEGIN;
|
||||
INSERT INTO t2 values(100,100);
|
||||
--error 1062
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
|
||||
SELECT * from t2;
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 values(101,101);
|
||||
--error 1062
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
|
||||
SELECT * from t2;
|
||||
ROLLBACK;
|
||||
SELECT * from t2;
|
||||
TRUNCATE table t2;
|
||||
--error 1062
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
INSERT INTO t2 select * from t1;
|
||||
SELECT * from t2;
|
||||
drop table t1,t2;
|
||||
|
Reference in New Issue
Block a user