1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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:
monty@mysql.com/narttu.mysql.fi
2007-01-22 18:42:52 +02:00
parent 693b906f6e
commit 2dcc7110c9
60 changed files with 282 additions and 251 deletions

View File

@ -128,7 +128,7 @@ SELECT * FROM t1 WHERE b=NULL;
explain SELECT * FROM t1 WHERE b IS NULL;
SELECT * FROM t1 WHERE b<=>NULL;
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
INSERT INTO t1 VALUES (1,3);
DROP TABLE t1;
@ -270,7 +270,7 @@ explain select count(*) from t1 where v like 'a%';
explain select count(*) from t1 where v between 'a' and 'a ';
explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add unique(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*'));
explain select * from t1 where v='a';
@ -296,17 +296,17 @@ drop table t1;
create table t1 (a char(10), unique (a));
insert into t1 values ('a');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
alter table t1 modify a varchar(10);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a '),('a '),('a '),('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
update t1 set a='a ' where a like 'a ';
update t1 set a='a ' where a like 'a ';
@ -357,7 +357,7 @@ explain select count(*) from t1 where v between 'a' and 'a ';
--replace_column 9 #
explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
alter table t1 add unique(v);
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*'));
# Number of rows is not constant for b-trees keys
@ -372,17 +372,17 @@ drop table t1;
create table t1 (a char(10), unique using btree (a)) engine=heap;
insert into t1 values ('a');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
alter table t1 modify a varchar(10);
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a '),('a '),('a '),('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ('a ');
update t1 set a='a ' where a like 'a ';
update t1 set a='a ' where a like 'a ';
@ -432,7 +432,7 @@ create table t1 (a int not null, b int not null auto_increment,
#
create table t1 (c char(255), primary key(c(90)));
insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
--error 1062
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
drop table t1;