summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-06-26 15:46:36 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-30 11:43:02 +0200
commit99e48cb1d94e2d884b257b13f792323d3d633322 (patch)
tree0571ed63973349b091a9b306e2dc472254928a60 /mysql-test/r
parentc87e002bbb946907b4c9504612b3b3c2a0a19e51 (diff)
downloadmariadb-git-99e48cb1d94e2d884b257b13f792323d3d633322.tar.gz
restore ER_VIEW_CHECK_FAILED to be different from ER_CONSTRAINT_FAILED
collaterals: * use %`s, not '%s' * use correct SQLSTATE codes for these two errors
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/alter_table.result20
-rw-r--r--mysql-test/r/check_constraint.result20
-rw-r--r--mysql-test/r/constraints.result6
-rw-r--r--mysql-test/r/create_drop_binlog.result2
-rw-r--r--mysql-test/r/create_drop_index.result2
-rw-r--r--mysql-test/r/function_defaults.result8
-rw-r--r--mysql-test/r/function_defaults_innodb.result8
-rw-r--r--mysql-test/r/key.result2
-rw-r--r--mysql-test/r/partition_explicit_prune.result4
-rw-r--r--mysql-test/r/replace.result2
-rw-r--r--mysql-test/r/subselect.result2
-rw-r--r--mysql-test/r/subselect_no_exists_to_in.result2
-rw-r--r--mysql-test/r/subselect_no_mat.result2
-rw-r--r--mysql-test/r/subselect_no_opts.result2
-rw-r--r--mysql-test/r/subselect_no_scache.result2
-rw-r--r--mysql-test/r/subselect_no_semijoin.result2
-rw-r--r--mysql-test/r/view.result78
17 files changed, 82 insertions, 82 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index 7c1686379fe..6a91103279c 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -414,12 +414,12 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 DROP PRIMARY KEY;
-ERROR 42000: Can't DROP 'PRIMARY'; check that constraint/column/key exists
+ERROR 42000: Can't DROP `PRIMARY`; check that it exists
DROP TABLE t1;
create table t1 (a int, b int, key(a));
insert into t1 values (1,1), (2,2);
alter table t1 drop key no_such_key;
-ERROR 42000: Can't DROP 'no_such_key'; check that constraint/column/key exists
+ERROR 42000: Can't DROP `no_such_key`; check that it exists
alter table t1 drop key a;
drop table t1;
CREATE TABLE T12207(a int) ENGINE=MYISAM;
@@ -1374,7 +1374,7 @@ Note 1060 Duplicate column name 'lol'
ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
Warnings:
-Note 1091 Can't DROP 'lol'; check that constraint/column/key exists
+Note 1091 Can't DROP `lol`; check that it exists
ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
Warnings:
@@ -1385,7 +1385,7 @@ Note 1054 Unknown column 'lol' in 't1'
DROP INDEX IF EXISTS x_param ON t1;
DROP INDEX IF EXISTS x_param ON t1;
Warnings:
-Note 1091 Can't DROP 'x_param'; check that constraint/column/key exists
+Note 1091 Can't DROP `x_param`; check that it exists
CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
Warnings:
@@ -1416,7 +1416,7 @@ Note 1060 Duplicate column name 'lol'
ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
Warnings:
-Note 1091 Can't DROP 'lol'; check that constraint/column/key exists
+Note 1091 Can't DROP `lol`; check that it exists
ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
Warnings:
@@ -1427,7 +1427,7 @@ Note 1054 Unknown column 'lol' in 't1'
DROP INDEX IF EXISTS x_param ON t1;
DROP INDEX IF EXISTS x_param ON t1;
Warnings:
-Note 1091 Can't DROP 'x_param'; check that constraint/column/key exists
+Note 1091 Can't DROP `x_param`; check that it exists
CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
Warnings:
@@ -1447,7 +1447,7 @@ Note 1061 Duplicate key name 'fk'
ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk;
ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk;
Warnings:
-Note 1091 Can't DROP 'fk'; check that constraint/column/key exists
+Note 1091 Can't DROP `fk`; check that it exists
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1461,7 +1461,7 @@ Note 1061 Duplicate key name 't2_ibfk_1'
ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1;
ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1;
Warnings:
-Note 1091 Can't DROP 't2_ibfk_1'; check that constraint/column/key exists
+Note 1091 Can't DROP `t2_ibfk_1`; check that it exists
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1486,10 +1486,10 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t2 DROP KEY k_id, DROP KEY IF EXISTS k_id;
Warnings:
-Note 1091 Can't DROP 'k_id'; check that constraint/column/key exists
+Note 1091 Can't DROP `k_id`; check that it exists
ALTER TABLE t2 DROP COLUMN a, DROP COLUMN IF EXISTS a;
Warnings:
-Note 1091 Can't DROP 'a'; check that constraint/column/key exists
+Note 1091 Can't DROP `a`; check that it exists
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
diff --git a/mysql-test/r/check_constraint.result b/mysql-test/r/check_constraint.result
index 657c9326c38..a9e8b1138e9 100644
--- a/mysql-test/r/check_constraint.result
+++ b/mysql-test/r/check_constraint.result
@@ -10,15 +10,15 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (100,100);
insert into t1 values (1,1);
-ERROR HY000: CONSTRAINT 'a' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `a` failed for `test`.`t1`
insert into t1 values (20,1);
-ERROR HY000: CONSTRAINT 'b' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `b` failed for `test`.`t1`
insert into t1 values (20,30);
-ERROR HY000: CONSTRAINT 'min' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `min` failed for `test`.`t1`
insert into t1 values (500,500);
-ERROR HY000: CONSTRAINT 'max' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `max` failed for `test`.`t1`
insert into t1 values (101,101),(102,102),(600,600),(103,103);
-ERROR HY000: CONSTRAINT 'max' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `max` failed for `test`.`t1`
select * from t1;
a b
100 100
@@ -27,7 +27,7 @@ a b
truncate table t1;
insert ignore into t1 values (101,101),(102,102),(600,600),(103,103);
Warnings:
-Warning 1369 CONSTRAINT 'max' failed for 'test.t1'
+Warning 4016 CONSTRAINT `max` failed for `test`.`t1`
select * from t1;
a b
101 101
@@ -44,7 +44,7 @@ a b
103 103
set check_constraint_checks=@save_check_constraint;
alter table t1 add c int default 0 check (c < 10);
-ERROR HY000: CONSTRAINT 'max' failed for table
+ERROR 23000: CONSTRAINT `max` failed for table
set check_constraint_checks=0;
alter table t1 add c int default 0 check (c < 10);
alter table t1 add check (a+b+c < 500);
@@ -60,9 +60,9 @@ t1 CREATE TABLE `t1` (
CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values(105,105,105);
-ERROR HY000: CONSTRAINT 'c' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `c` failed for `test`.`t1`
insert into t1 values(249,249,9);
-ERROR HY000: CONSTRAINT 'CONSTRAINT_1' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
insert into t1 values(105,105,9);
select * from t1;
a b c
@@ -83,7 +83,7 @@ t2 CREATE TABLE `t2` (
CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t2 drop constraint c;
-ERROR 42000: Can't DROP 'c'; check that constraint/column/key exists
+ERROR 42000: Can't DROP `c`; check that it exists
alter table t2 drop constraint min;
show create table t2;
Table Create Table
diff --git a/mysql-test/r/constraints.result b/mysql-test/r/constraints.result
index 2c101a209ef..9fcb8a0f4d7 100644
--- a/mysql-test/r/constraints.result
+++ b/mysql-test/r/constraints.result
@@ -7,7 +7,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1);
insert into t1 values (0);
-ERROR HY000: CONSTRAINT 'a' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `a` failed for `test`.`t1`
drop table t1;
create table t1 (a int, b int, check (a>b));
show create table t1;
@@ -19,7 +19,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,0);
insert into t1 values (0,1);
-ERROR HY000: CONSTRAINT 'CONSTRAINT_1' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
drop table t1;
create table t1 (a int ,b int, constraint abc check (a>b));
show create table t1;
@@ -31,7 +31,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,0);
insert into t1 values (0,1);
-ERROR HY000: CONSTRAINT 'abc' failed for 'test.t1'
+ERROR 23000: CONSTRAINT `abc` failed for `test`.`t1`
drop table t1;
create table t1 (a int null);
show create table t1;
diff --git a/mysql-test/r/create_drop_binlog.result b/mysql-test/r/create_drop_binlog.result
index bc08ea82809..e8e8094a347 100644
--- a/mysql-test/r/create_drop_binlog.result
+++ b/mysql-test/r/create_drop_binlog.result
@@ -363,7 +363,7 @@ t1 CREATE TABLE `t1` (
DROP INDEX IF EXISTS i1 ON t1;
DROP INDEX IF EXISTS i1 ON t1;
Warnings:
-Note 1091 Can't DROP 'i1'; check that constraint/column/key exists
+Note 1091 Can't DROP `i1`; check that it exists
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
diff --git a/mysql-test/r/create_drop_index.result b/mysql-test/r/create_drop_index.result
index f7b9ac02da6..a38ab7f6aed 100644
--- a/mysql-test/r/create_drop_index.result
+++ b/mysql-test/r/create_drop_index.result
@@ -16,7 +16,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP INDEX IF EXISTS i1 ON t1;
Warnings:
-Note 1091 Can't DROP 'i1'; check that constraint/column/key exists
+Note 1091 Can't DROP `i1`; check that it exists
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/function_defaults.result b/mysql-test/r/function_defaults.result
index a5367c4c591..6840e5bbb6c 100644
--- a/mysql-test/r/function_defaults.result
+++ b/mysql-test/r/function_defaults.result
@@ -1443,7 +1443,7 @@ a b
# 1970-01-01 03:33:20
SET TIMESTAMP = 2000.000234;
UPDATE v1 SET a = 2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM t1;
a b
1 1970-01-01 03:16:40
@@ -1466,7 +1466,7 @@ a c
1973-08-14 09:11:22 1
SET TIMESTAMP = 1.126789;
INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM v1;
a c
1973-08-14 09:11:22 1
@@ -2989,7 +2989,7 @@ a b
# 1970-01-01 03:33:20
SET TIMESTAMP = 2000.000234;
UPDATE v1 SET a = 2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM t1;
a b
1 1970-01-01 03:16:40.123456
@@ -3012,7 +3012,7 @@ a c
1973-08-14 09:11:22.089786 1
SET TIMESTAMP = 1.126789;
INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM v1;
a c
1973-08-14 09:11:22.089786 1
diff --git a/mysql-test/r/function_defaults_innodb.result b/mysql-test/r/function_defaults_innodb.result
index ee89d847a5c..a877d27dba7 100644
--- a/mysql-test/r/function_defaults_innodb.result
+++ b/mysql-test/r/function_defaults_innodb.result
@@ -1444,7 +1444,7 @@ a b
# 1970-01-01 03:33:20
SET TIMESTAMP = 2000.000234;
UPDATE v1 SET a = 2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM t1;
a b
1 1970-01-01 03:16:40
@@ -1467,7 +1467,7 @@ a c
1973-08-14 09:11:22 1
SET TIMESTAMP = 1.126789;
INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM v1;
a c
1973-08-14 09:11:22 1
@@ -2990,7 +2990,7 @@ a b
# 1970-01-01 03:33:20
SET TIMESTAMP = 2000.000234;
UPDATE v1 SET a = 2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM t1;
a b
1 1970-01-01 03:16:40.123456
@@ -3013,7 +3013,7 @@ a c
1973-08-14 09:11:22.089786 1
SET TIMESTAMP = 1.126789;
INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM v1;
a c
1973-08-14 09:11:22.089786 1
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index 806cc7a7b1a..0d6e7d046e7 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -467,7 +467,7 @@ alter table t1 drop index c2, add index (c2(4),c3(7));
alter table t1 add primary key (c1, c2), drop primary key;
alter table t1 drop primary key;
alter table t1 add primary key (c1, c2), drop primary key;
-ERROR 42000: Can't DROP 'PRIMARY'; check that constraint/column/key exists
+ERROR 42000: Can't DROP `PRIMARY`; check that it exists
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/partition_explicit_prune.result b/mysql-test/r/partition_explicit_prune.result
index 1719556d9c8..ef196bcae0c 100644
--- a/mysql-test/r/partition_explicit_prune.result
+++ b/mysql-test/r/partition_explicit_prune.result
@@ -126,7 +126,7 @@ HANDLER_WRITE 2
# 4 locks (1 table, 1 partition lock/unlock)
FLUSH STATUS;
INSERT INTO v1 VALUES (31);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
@@ -135,7 +135,7 @@ HANDLER_TMP_WRITE 22
# 2 locks (1 table, all partitions pruned)
FLUSH STATUS;
INSERT INTO v1 VALUES (32);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
diff --git a/mysql-test/r/replace.result b/mysql-test/r/replace.result
index 2c1fc263b2d..9590a97e10a 100644
--- a/mysql-test/r/replace.result
+++ b/mysql-test/r/replace.result
@@ -27,6 +27,6 @@ drop table t1;
CREATE TABLE t1 (f1 INT);
CREATE VIEW v1 AS SELECT f1 FROM t1 WHERE f1 = 0 WITH CHECK OPTION;
REPLACE INTO v1 (f1) VALUES (1);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
DROP TABLE t1;
DROP VIEW v1;
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 45daac4fa10..bd30c04f272 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -5001,7 +5001,7 @@ CREATE VIEW v2 (a,b) AS
SELECT t2.id, t2.c AS c FROM t1, t2
WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
INSERT INTO v2(a,b) VALUES (2,2);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
SELECT * FROM v1;
c
1
diff --git a/mysql-test/r/subselect_no_exists_to_in.result b/mysql-test/r/subselect_no_exists_to_in.result
index f95704a28b1..8ef7fe90a40 100644
--- a/mysql-test/r/subselect_no_exists_to_in.result
+++ b/mysql-test/r/subselect_no_exists_to_in.result
@@ -5003,7 +5003,7 @@ CREATE VIEW v2 (a,b) AS
SELECT t2.id, t2.c AS c FROM t1, t2
WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
INSERT INTO v2(a,b) VALUES (2,2);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
SELECT * FROM v1;
c
1
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index d2a412caa1d..3b4d54b12e9 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -5001,7 +5001,7 @@ CREATE VIEW v2 (a,b) AS
SELECT t2.id, t2.c AS c FROM t1, t2
WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
INSERT INTO v2(a,b) VALUES (2,2);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
SELECT * FROM v1;
c
1
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index f06e2d8e554..8f5a967c516 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -4997,7 +4997,7 @@ CREATE VIEW v2 (a,b) AS
SELECT t2.id, t2.c AS c FROM t1, t2
WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
INSERT INTO v2(a,b) VALUES (2,2);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
SELECT * FROM v1;
c
1
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index ab27af586aa..4a50b01e9b3 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -5007,7 +5007,7 @@ CREATE VIEW v2 (a,b) AS
SELECT t2.id, t2.c AS c FROM t1, t2
WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
INSERT INTO v2(a,b) VALUES (2,2);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
SELECT * FROM v1;
c
1
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index d3be251a9e5..d253f48d593 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -4997,7 +4997,7 @@ CREATE VIEW v2 (a,b) AS
SELECT t2.id, t2.c AS c FROM t1, t2
WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
INSERT INTO v2(a,b) VALUES (2,2);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
SELECT * FROM v1;
c
1
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 1bf740698fe..8ab215fd99a 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -253,7 +253,7 @@ drop view v1;
drop table t1;
create table t1 (a int);
create view v1 as select distinct a from t1 WITH CHECK OPTION;
-ERROR HY000: CHECK OPTION on non-updatable view 'test.v1'
+ERROR HY000: CHECK OPTION on non-updatable view `test`.`v1`
create view v1 as select a from t1 WITH CHECK OPTION;
create view v2 as select a from t1 WITH CASCADED CHECK OPTION;
create view v3 as select a from t1 WITH LOCAL CHECK OPTION;
@@ -1134,11 +1134,11 @@ create table t1 (a int);
create view v1 as select * from t1 where a < 2 with check option;
insert into v1 values(1);
insert into v1 values(3);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
insert ignore into v1 values (2),(3),(0);
Warnings:
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+Warning 1369 CHECK OPTION failed `test`.`v1`
+Warning 1369 CHECK OPTION failed `test`.`v1`
select * from t1;
a
1
@@ -1146,20 +1146,20 @@ a
delete from t1;
insert into v1 SELECT 1;
insert into v1 SELECT 3;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
create table t2 (a int);
insert into t2 values (2),(3),(0);
insert ignore into v1 SELECT a from t2;
Warnings:
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+Warning 1369 CHECK OPTION failed `test`.`v1`
+Warning 1369 CHECK OPTION failed `test`.`v1`
select * from t1 order by a desc;
a
1
0
update v1 set a=-1 where a=0;
update v1 set a=2 where a=1;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
select * from t1 order by a desc;
a
1
@@ -1174,7 +1174,7 @@ a
update v1 set a=a+1;
update ignore v1,t2 set v1.a=v1.a+1 where v1.a=t2.a;
Warnings:
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+Warning 1369 CHECK OPTION failed `test`.`v1`
select * from t1;
a
1
@@ -1188,12 +1188,12 @@ create view v3 as select * from v1 where a > 0 with cascaded check option;
insert into v2 values (1);
insert into v3 values (1);
insert into v2 values (0);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
insert into v3 values (0);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3'
+ERROR 44000: CHECK OPTION failed `test`.`v3`
insert into v2 values (2);
insert into v3 values (2);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3'
+ERROR 44000: CHECK OPTION failed `test`.`v3`
select * from t1;
a
1
@@ -1205,10 +1205,10 @@ create table t1 (a int, primary key (a));
create view v1 as select * from t1 where a < 2 with check option;
insert into v1 values (1) on duplicate key update a=2;
insert into v1 values (1) on duplicate key update a=2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
insert ignore into v1 values (1) on duplicate key update a=2;
Warnings:
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+Warning 1369 CHECK OPTION failed `test`.`v1`
select * from t1;
a
1
@@ -1263,7 +1263,7 @@ s1
alter view v2 as select * from t2 where s1 in (select s1 from t1) with check option;
insert into v2 values (5);
update v2 set s1 = 1;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
insert into t1 values (1);
update v2 set s1 = 1;
select * from v2;
@@ -1300,16 +1300,16 @@ create table t1 (s1 tinyint);
create view v1 as select * from t1 where s1 <> 0 with local check option;
create view v2 as select * from v1 with cascaded check option;
insert into v2 values (0);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
drop view v2, v1;
drop table t1;
create table t1 (s1 int);
create view v1 as select * from t1 where s1 < 5 with check option;
insert ignore into v1 values (6);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
insert ignore into v1 values (6),(3);
Warnings:
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+Warning 1369 CHECK OPTION failed `test`.`v1`
select * from t1;
s1
3
@@ -1319,7 +1319,7 @@ create table t1 (s1 tinyint);
create trigger t1_bi before insert on t1 for each row set new.s1 = 500;
create view v1 as select * from t1 where s1 <> 127 with check option;
insert into v1 values (0);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
select * from v1;
s1
select * from t1;
@@ -1331,7 +1331,7 @@ create table t1 (s1 tinyint);
create view v1 as select * from t1 where s1 <> 0;
create view v2 as select * from v1 where s1 <> 1 with cascaded check option;
insert into v2 values (0);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
select * from v2;
s1
select * from t1;
@@ -1341,7 +1341,7 @@ drop table t1;
create table t1 (a int, b char(10));
create view v1 as select * from t1 where a != 0 with check option;
load data infile '../../std_data/loaddata3.dat' into table v1 fields terminated by '' enclosed by '' ignore 1 lines;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
select * from t1;
a b
1 row 1
@@ -1356,10 +1356,10 @@ Warnings:
Note 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+Warning 1369 CHECK OPTION failed `test`.`v1`
Note 1265 Data truncated for column 'a' at row 3
Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 4
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+Warning 1369 CHECK OPTION failed `test`.`v1`
select * from t1 order by a,b;
a b
1 row 1
@@ -1375,7 +1375,7 @@ drop table t1;
create table t1 (a text, b text);
create view v1 as select * from t1 where a <> 'Field A' with check option;
load data infile '../../std_data/loaddata2.dat' into table v1 fields terminated by ',' enclosed by '''';
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
select concat('|',a,'|'), concat('|',b,'|') from t1;
concat('|',a,'|') concat('|',b,'|')
select concat('|',a,'|'), concat('|',b,'|') from v1;
@@ -1383,7 +1383,7 @@ concat('|',a,'|') concat('|',b,'|')
delete from t1;
load data infile '../../std_data/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by '''';
Warnings:
-Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+Warning 1369 CHECK OPTION failed `test`.`v1`
Warning 1261 Row 2 doesn't contain data for all columns
select concat('|',a,'|'), concat('|',b,'|') from t1;
concat('|',a,'|') concat('|',b,'|')
@@ -3047,9 +3047,9 @@ CREATE VIEW v1 AS SELECT id, val FROM t1 WHERE val >= 1 AND val <= 5 WITH CHECK
INSERT INTO v1 (val) VALUES (2);
INSERT INTO v1 (val) VALUES (4);
INSERT INTO v1 (val) VALUES (6);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
UPDATE v1 SET val=6 WHERE id=2;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
DROP VIEW v1;
DROP TABLE t1;
DROP VIEW IF EXISTS v1, v2;
@@ -3135,7 +3135,7 @@ b
1
2
UPDATE v1 SET b=3;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
SELECT * FROM v1;
b
1
@@ -3467,14 +3467,14 @@ a1 c
1 0
2 0
UPDATE v1 SET c=3;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
PREPARE t FROM 'UPDATE v1 SET c=3';
EXECUTE t;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
EXECUTE t;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
INSERT INTO v1(a1, c) VALUES (3, 3);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1'
+ERROR 44000: CHECK OPTION failed `test`.`v1`
UPDATE v1 SET c=1 WHERE a1=1;
SELECT * FROM v1;
a1 c
@@ -3493,14 +3493,14 @@ a1 c
1 1
2 0
UPDATE v2 SET c=3;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
PREPARE t FROM 'UPDATE v2 SET c=3';
EXECUTE t;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
EXECUTE t;
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
INSERT INTO v2(a1, c) VALUES (3, 3);
-ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2'
+ERROR 44000: CHECK OPTION failed `test`.`v2`
UPDATE v2 SET c=2 WHERE a1=1;
SELECT * FROM v2;
a1 c
@@ -4746,13 +4746,13 @@ drop view if exists v_9801;
create table t_9801 (s1 int);
create view v_9801 as
select sum(s1) from t_9801 with check option;
-ERROR HY000: CHECK OPTION on non-updatable view 'test.v_9801'
+ERROR HY000: CHECK OPTION on non-updatable view `test`.`v_9801`
create view v_9801 as
select sum(s1) from t_9801 group by s1 with check option;
-ERROR HY000: CHECK OPTION on non-updatable view 'test.v_9801'
+ERROR HY000: CHECK OPTION on non-updatable view `test`.`v_9801`
create view v_9801 as
select sum(s1) from t_9801 group by s1 with rollup with check option;
-ERROR HY000: CHECK OPTION on non-updatable view 'test.v_9801'
+ERROR HY000: CHECK OPTION on non-updatable view `test`.`v_9801`
drop table t_9801;
#
# Bug #47335 assert in get_table_share