summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/type_mix_incompatible.inc58
-rw-r--r--mysql-test/main/gis.result4
-rw-r--r--mysql-test/main/sp-row.result6
-rw-r--r--mysql-test/main/sp-vars.result6
-rw-r--r--mysql-test/main/sp-vars.test6
-rw-r--r--mysql-test/main/sp.result2
-rw-r--r--mysql-test/main/type_geometry_mix_int.result95
-rw-r--r--mysql-test/suite/archive/archive_gis.result4
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-row.result8
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-row.test8
-rw-r--r--mysql-test/suite/innodb/r/innodb_gis.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/0.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/1.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/gis.result4
14 files changed, 109 insertions, 104 deletions
diff --git a/mysql-test/include/type_mix_incompatible.inc b/mysql-test/include/type_mix_incompatible.inc
index 750dc7bcac6..92a75be6e81 100644
--- a/mysql-test/include/type_mix_incompatible.inc
+++ b/mysql-test/include/type_mix_incompatible.inc
@@ -1,5 +1,9 @@
--echo # Start of type_store_assignment_incompatible.inc
+--disable_abort_on_error
+
+SET @sql_mode_save= @@sql_mode;
+
SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='source'
AND TABLE_NAME='t1'
@@ -10,8 +14,15 @@ SET @target_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
AND TABLE_NAME='t1'
AND TABLE_SCHEMA='test');
+# 'IGNORE' -> ' IGNORE'
+SET @ignore= CASE WHEN @ignore IS NULL OR @ignore = '' THEN ''
+ WHEN @ignore NOT LIKE ' %' THEN CONCAT(' ',@ignore)
+ ELSE @ignore
+ END;
+
let $source_type= `(SELECT @source_type)`;
let $target_type= `(SELECT @target_type)`;
+let $ignore=`(SELECT @ignore)`;
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ADD id INT NOT NULL PRIMARY KEY FIRST;
@@ -23,8 +34,7 @@ SHOW CREATE TABLE t2;
#
CREATE TABLE t3 LIKE t2;
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
-INSERT INTO t3 VALUES
+eval INSERT$ignore INTO t3 VALUES
(1,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
@@ -52,8 +62,7 @@ EXECUTE IMMEDIATE
IF(@source_type='geometry','AsText(source)','source'), ' AS source ',
' FROM t3');
---error 0,ER_CANT_CREATE_GEOMETRY_OBJECT
-INSERT INTO t3 VALUES
+eval INSERT$ignore INTO t3 VALUES
(1,
(SELECT target FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1)),
@@ -64,8 +73,7 @@ SELECT * FROM v3;
TRUNCATE TABLE t3;
SET sql_mode=STRICT_ALL_TABLES;
---error ER_TRUNCATED_WRONG_VALUE, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD, WARN_DATA_TRUNCATED, ER_CANT_CREATE_GEOMETRY_OBJECT
-INSERT INTO t3 VALUES
+eval INSERT$ignore INTO t3 VALUES
(1,
(SELECT target FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1)),
@@ -74,7 +82,7 @@ INSERT INTO t3 VALUES
(SELECT source FROM t2 ORDER BY id LIMIT 1));
SELECT * FROM v3;
TRUNCATE TABLE t3;
-SET sql_mode=DEFAULT;
+SET sql_mode=@sql_mode_save;
DROP TABLE t3;
DROP VIEW v3;
@@ -83,55 +91,46 @@ DROP VIEW v3;
#
CREATE TABLE t3 LIKE t2;
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
-INSERT INTO t3 SELECT id,source,source FROM t2;
+eval INSERT$ignore INTO t3 SELECT id,source,source FROM t2;
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
-INSERT INTO t3 (id,target,source) SELECT id,source,source FROM t2;
+eval INSERT$ignore INTO t3 (id,target,source) SELECT id,source,source FROM t2;
#
# INSERT .. VALUES .. ON DUPLICATE KEY UPDATE target=source
#
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
-INSERT INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
+eval INSERT$ignore INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
-INSERT INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
+eval INSERT$ignore INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
#
# INSERT .. SELECT .. ON DUPLICATE KEY UPDATE target=source
#
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
-INSERT INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
+eval INSERT$ignore INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
-INSERT INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
+eval INSERT$ignore INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
#
# UPDATE
#
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
-UPDATE t3 SET target=source;
+eval UPDATE$ignore t3 SET target=source;
#
# UPDATE, multi-table
#
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
-UPDATE t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
+eval UPDATE$ignore t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
#
# ALTER
#
-SET @alter=CONCAT('ALTER TABLE t3 MODIFY target ', @source_type);
+SET @alter=CONCAT('ALTER', @ignore, ' TABLE t3 MODIFY target ', @source_type);
SELECT @alter;
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
EXECUTE IMMEDIATE @alter;
@@ -154,7 +153,6 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1;
DROP PROCEDURE p1;
@@ -163,12 +161,10 @@ DROP PROCEDURE p1;
#
--eval CREATE FUNCTION f1(a $target_type) RETURNS INT RETURN NULL;
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT f1((SELECT source FROM t1 ORDER BY source LIMIT 1));
DROP FUNCTION f1;
--eval CREATE PROCEDURE p1(a $target_type) BEGIN END;
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1((SELECT source FROM t1 ORDER BY source LIMIT 1));
DROP PROCEDURE p1;
@@ -190,7 +186,6 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p2();
SHOW WARNINGS;
DROP PROCEDURE p2;
@@ -209,7 +204,6 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT f1();
DROP FUNCTION f1;
@@ -227,7 +221,6 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
@@ -249,10 +242,11 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
DROP TABLE t2;
+--enable_abort_on_error
+
--echo # End of type_store_assignment_incompatible.inc
diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result
index 5fdea9cb353..88e56c4ea96 100644
--- a/mysql-test/main/gis.result
+++ b/mysql-test/main/gis.result
@@ -688,9 +688,9 @@ object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
drop table t1;
create table t1 (fl geometry not null);
insert into t1 values (1);
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values (1.11);
-ERROR HY000: Illegal parameter data types geometry and decimal for operation 'SET'
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (pointfromtext('point(1,1)'));
diff --git a/mysql-test/main/sp-row.result b/mysql-test/main/sp-row.result
index 1cbfa8c639f..f3c0a9e343a 100644
--- a/mysql-test/main/sp-row.result
+++ b/mysql-test/main/sp-row.result
@@ -20,7 +20,7 @@ RETURN a;
END;
$$
SELECT f1(ROW(10,20));
-ERROR HY000: Illegal parameter data types int and row for operation 'SET'
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `f1(ROW(10,20))`
DROP FUNCTION f1;
#
# ROW as an SP parameter
@@ -236,7 +236,7 @@ SELECT f1(a);
END;
$$
CALL p1();
-ERROR HY000: Illegal parameter data types int and row for operation 'SET'
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `a`
DROP PROCEDURE p1;
DROP FUNCTION f1;
#
@@ -286,7 +286,7 @@ RETURN rec;
END;
$$
SELECT f1(10);
-ERROR HY000: Illegal parameter data types int and row for operation 'SET'
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `f1(10)`
DROP FUNCTION f1;
#
# Using the entire ROW in SELECT..CREATE
diff --git a/mysql-test/main/sp-vars.result b/mysql-test/main/sp-vars.result
index 42e709cc521..a755f8e739f 100644
--- a/mysql-test/main/sp-vars.result
+++ b/mysql-test/main/sp-vars.result
@@ -1026,11 +1026,11 @@ BEGIN
SELECT arg;
END|
CALL p1((1, 2));
-ERROR HY000: Illegal parameter data types tinyint and row for operation 'SET'
+ERROR 21000: Operand should contain 1 column(s)
CALL p1((SELECT * FROM t1 LIMIT 1));
-ERROR HY000: Illegal parameter data types tinyint and row for operation 'SET'
+ERROR 21000: Operand should contain 1 column(s)
CALL p1((SELECT col1, col2 FROM t1 LIMIT 1));
-ERROR HY000: Illegal parameter data types tinyint and row for operation 'SET'
+ERROR 21000: Operand should contain 1 column(s)
DROP PROCEDURE p1;
DROP TABLE t1;
diff --git a/mysql-test/main/sp-vars.test b/mysql-test/main/sp-vars.test
index 5e1e07888ca..9edf245acbe 100644
--- a/mysql-test/main/sp-vars.test
+++ b/mysql-test/main/sp-vars.test
@@ -1221,13 +1221,13 @@ BEGIN
END|
delimiter ;|
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+--error ER_OPERAND_COLUMNS
CALL p1((1, 2));
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+--error ER_OPERAND_COLUMNS
CALL p1((SELECT * FROM t1 LIMIT 1));
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+--error ER_OPERAND_COLUMNS
CALL p1((SELECT col1, col2 FROM t1 LIMIT 1));
#
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index 37b9b12ac67..67aaa6221c6 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -255,7 +255,7 @@ return i+1|
call sub1("sub1a", (select 7))|
call sub1("sub1b", (select max(i) from t2))|
call sub1("sub1c", (select i,d from t2 limit 1))|
-ERROR HY000: Illegal parameter data types int and row for operation 'SET'
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `x`
call sub1("sub1d", (select 1 from (select 1) a))|
call sub2("sub2")|
select * from t1 order by id|
diff --git a/mysql-test/main/type_geometry_mix_int.result b/mysql-test/main/type_geometry_mix_int.result
index e5d00c63727..bf05ca1829d 100644
--- a/mysql-test/main/type_geometry_mix_int.result
+++ b/mysql-test/main/type_geometry_mix_int.result
@@ -6,6 +6,7 @@
#
CREATE TABLE t1 (target GEOMETRY DEFAULT POINT(1,1), source INT DEFAULT 0);
# Start of type_store_assignment_incompatible.inc
+SET @sql_mode_save= @@sql_mode;
SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='source'
AND TABLE_NAME='t1'
@@ -14,6 +15,10 @@ SET @target_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='target'
AND TABLE_NAME='t1'
AND TABLE_SCHEMA='test');
+SET @ignore= CASE WHEN @ignore IS NULL OR @ignore = '' THEN ''
+ WHEN @ignore NOT LIKE ' %' THEN CONCAT(' ',@ignore)
+ELSE @ignore
+END;
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ADD id INT NOT NULL PRIMARY KEY FIRST;
INSERT INTO t2 VALUES (1,DEFAULT,DEFAULT);
@@ -30,7 +35,7 @@ INSERT INTO t3 VALUES
(1,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
DROP TABLE t3;
SET sql_mode='';
CREATE TABLE t3 LIKE t2;
@@ -47,6 +52,7 @@ INSERT INTO t3 VALUES
(2,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
+ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
SELECT * FROM v3;
id target source
1 POINT(1 1) 0
@@ -59,37 +65,37 @@ INSERT INTO t3 VALUES
(2,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
-Got one of the listed errors
+ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
SELECT * FROM v3;
id target source
1 POINT(1 1) 0
TRUNCATE TABLE t3;
-SET sql_mode=DEFAULT;
+SET sql_mode=@sql_mode_save;
DROP TABLE t3;
DROP VIEW v3;
CREATE TABLE t3 LIKE t2;
INSERT INTO t3 SELECT id,source,source FROM t2;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) SELECT id,source,source FROM t2;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
UPDATE t3 SET target=source;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
UPDATE t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
-SET @alter=CONCAT('ALTER TABLE t3 MODIFY target ', @source_type);
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+SET @alter=CONCAT('ALTER', @ignore, ' TABLE t3 MODIFY target ', @source_type);
SELECT @alter;
@alter
ALTER TABLE t3 MODIFY target int(11)
EXECUTE IMMEDIATE @alter;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
DROP TABLE t3;
DROP TABLE t2;
CREATE PROCEDURE p1()
@@ -100,15 +106,15 @@ SET dst=src;
END;
$$
CALL p1;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `dst`
DROP PROCEDURE p1;
CREATE FUNCTION f1(a geometry) RETURNS INT RETURN NULL;;
SELECT f1((SELECT source FROM t1 ORDER BY source LIMIT 1));
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `a`
DROP FUNCTION f1;
CREATE PROCEDURE p1(a geometry) BEGIN END;;
CALL p1((SELECT source FROM t1 ORDER BY source LIMIT 1));
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `a`
DROP PROCEDURE p1;
CREATE PROCEDURE p1(OUT dst geometry)
BEGIN
@@ -123,10 +129,10 @@ CALL p1(dst);
END;
$$
CALL p2();
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `dst`
SHOW WARNINGS;
Level Code Message
-Error 4078 Illegal parameter data types geometry and int for operation 'SET'
+Error 4078 Cannot cast 'int' as 'geometry' in assignment of `dst`
Note 4094 At line 4 in test.p1
Note 4094 At line 4 in test.p2
DROP PROCEDURE p2;
@@ -138,7 +144,7 @@ RETURN rc;
END;
$$
SELECT f1();
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `f1()`
DROP FUNCTION f1;
CREATE PROCEDURE p1()
BEGIN
@@ -149,7 +155,7 @@ CLOSE cur1;
END;
$$
CALL p1();
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `t`
DROP PROCEDURE p1;
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES ();
@@ -163,13 +169,14 @@ CLOSE cur2;
END;
$$
CALL p1();
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `dst`
DROP PROCEDURE p1;
DROP TABLE t2;
# End of type_store_assignment_incompatible.inc
DROP TABLE t1;
CREATE TABLE t1 (target INT DEFAULT 0, source GEOMETRY DEFAULT POINT(1,1));
# Start of type_store_assignment_incompatible.inc
+SET @sql_mode_save= @@sql_mode;
SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='source'
AND TABLE_NAME='t1'
@@ -178,6 +185,10 @@ SET @target_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='target'
AND TABLE_NAME='t1'
AND TABLE_SCHEMA='test');
+SET @ignore= CASE WHEN @ignore IS NULL OR @ignore = '' THEN ''
+ WHEN @ignore NOT LIKE ' %' THEN CONCAT(' ',@ignore)
+ELSE @ignore
+END;
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ADD id INT NOT NULL PRIMARY KEY FIRST;
INSERT INTO t2 VALUES (1,DEFAULT,DEFAULT);
@@ -194,7 +205,7 @@ INSERT INTO t3 VALUES
(1,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
DROP TABLE t3;
SET sql_mode='';
CREATE TABLE t3 LIKE t2;
@@ -226,37 +237,37 @@ INSERT INTO t3 VALUES
(2,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
-Got one of the listed errors
+ERROR 22007: Incorrect integer value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\xF0?' for column `test`.`t3`.`target` at row 2
SELECT * FROM v3;
id target source
1 0 POINT(1 1)
TRUNCATE TABLE t3;
-SET sql_mode=DEFAULT;
+SET sql_mode=@sql_mode_save;
DROP TABLE t3;
DROP VIEW v3;
CREATE TABLE t3 LIKE t2;
INSERT INTO t3 SELECT id,source,source FROM t2;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) SELECT id,source,source FROM t2;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
UPDATE t3 SET target=source;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
UPDATE t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
-SET @alter=CONCAT('ALTER TABLE t3 MODIFY target ', @source_type);
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+SET @alter=CONCAT('ALTER', @ignore, ' TABLE t3 MODIFY target ', @source_type);
SELECT @alter;
@alter
ALTER TABLE t3 MODIFY target geometry
EXECUTE IMMEDIATE @alter;
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
DROP TABLE t3;
DROP TABLE t2;
CREATE PROCEDURE p1()
@@ -267,15 +278,15 @@ SET dst=src;
END;
$$
CALL p1;
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `dst`
DROP PROCEDURE p1;
CREATE FUNCTION f1(a int(11)) RETURNS INT RETURN NULL;;
SELECT f1((SELECT source FROM t1 ORDER BY source LIMIT 1));
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `a`
DROP FUNCTION f1;
CREATE PROCEDURE p1(a int(11)) BEGIN END;;
CALL p1((SELECT source FROM t1 ORDER BY source LIMIT 1));
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `a`
DROP PROCEDURE p1;
CREATE PROCEDURE p1(OUT dst int(11))
BEGIN
@@ -290,10 +301,10 @@ CALL p1(dst);
END;
$$
CALL p2();
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `dst`
SHOW WARNINGS;
Level Code Message
-Error 4078 Illegal parameter data types int and geometry for operation 'SET'
+Error 4078 Cannot cast 'geometry' as 'int' in assignment of `dst`
Note 4094 At line 4 in test.p1
Note 4094 At line 4 in test.p2
DROP PROCEDURE p2;
@@ -305,7 +316,7 @@ RETURN rc;
END;
$$
SELECT f1();
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `f1()`
DROP FUNCTION f1;
CREATE PROCEDURE p1()
BEGIN
@@ -316,7 +327,7 @@ CLOSE cur1;
END;
$$
CALL p1();
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `t`
DROP PROCEDURE p1;
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES ();
@@ -330,7 +341,7 @@ CLOSE cur2;
END;
$$
CALL p1();
-ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `dst`
DROP PROCEDURE p1;
DROP TABLE t2;
# End of type_store_assignment_incompatible.inc
diff --git a/mysql-test/suite/archive/archive_gis.result b/mysql-test/suite/archive/archive_gis.result
index 25854db1feb..527a6daeee8 100644
--- a/mysql-test/suite/archive/archive_gis.result
+++ b/mysql-test/suite/archive/archive_gis.result
@@ -452,9 +452,9 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values (1.11);
-ERROR HY000: Illegal parameter data types geometry and decimal for operation 'SET'
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
diff --git a/mysql-test/suite/compat/oracle/r/sp-row.result b/mysql-test/suite/compat/oracle/r/sp-row.result
index a15fe30d8af..7fd986a71c8 100644
--- a/mysql-test/suite/compat/oracle/r/sp-row.result
+++ b/mysql-test/suite/compat/oracle/r/sp-row.result
@@ -24,7 +24,7 @@ RETURN a;
END;
$$
SELECT f1(ROW(10,20));
-ERROR HY000: Illegal parameter data types int and row for operation 'SET'
+ERROR 21000: Operand should contain 1 column(s)
DROP FUNCTION f1;
#
# ROW as an SP parameter
@@ -261,7 +261,7 @@ SELECT f1(a);
END;
$$
CALL p1();
-ERROR HY000: Illegal parameter data types int and row for operation 'SET'
+ERROR 21000: Operand should contain 1 column(s)
DROP PROCEDURE p1;
DROP FUNCTION f1;
CREATE FUNCTION f1(a INT) RETURN INT
@@ -278,7 +278,7 @@ SELECT f1(a);
END;
$$
CALL p1();
-ERROR HY000: Illegal parameter data types int and row for operation 'SET'
+ERROR 21000: Operand should contain 1 column(s)
DROP PROCEDURE p1;
DROP FUNCTION f1;
#
@@ -332,7 +332,7 @@ RETURN rec;
END;
$$
SELECT f1(10);
-ERROR HY000: Illegal parameter data types int and row for operation 'SET'
+ERROR 21000: Operand should contain 1 column(s)
DROP FUNCTION f1;
#
# Using the entire ROW in SELECT..CREATE
diff --git a/mysql-test/suite/compat/oracle/t/sp-row.test b/mysql-test/suite/compat/oracle/t/sp-row.test
index c7658c76838..ebd0a2a2137 100644
--- a/mysql-test/suite/compat/oracle/t/sp-row.test
+++ b/mysql-test/suite/compat/oracle/t/sp-row.test
@@ -35,7 +35,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+--error ER_OPERAND_COLUMNS
SELECT f1(ROW(10,20));
DROP FUNCTION f1;
@@ -334,7 +334,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+--error ER_OPERAND_COLUMNS
CALL p1();
DROP PROCEDURE p1;
DROP FUNCTION f1;
@@ -355,7 +355,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+--error ER_OPERAND_COLUMNS
CALL p1();
DROP PROCEDURE p1;
DROP FUNCTION f1;
@@ -427,7 +427,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+--error ER_OPERAND_COLUMNS
SELECT f1(10);
DROP FUNCTION f1;
diff --git a/mysql-test/suite/innodb/r/innodb_gis.result b/mysql-test/suite/innodb/r/innodb_gis.result
index c222e7d053a..57f894d85ef 100644
--- a/mysql-test/suite/innodb/r/innodb_gis.result
+++ b/mysql-test/suite/innodb/r/innodb_gis.result
@@ -452,9 +452,9 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values (1.11);
-ERROR HY000: Illegal parameter data types geometry and decimal for operation 'SET'
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
diff --git a/mysql-test/suite/innodb_gis/r/0.result b/mysql-test/suite/innodb_gis/r/0.result
index 3f72baadd12..355f8958018 100644
--- a/mysql-test/suite/innodb_gis/r/0.result
+++ b/mysql-test/suite/innodb_gis/r/0.result
@@ -452,9 +452,9 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values (1.11);
-ERROR HY000: Illegal parameter data types geometry and decimal for operation 'SET'
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result
index 1c286ff6ce4..1d7b188e0e3 100644
--- a/mysql-test/suite/innodb_gis/r/1.result
+++ b/mysql-test/suite/innodb_gis/r/1.result
@@ -660,9 +660,9 @@ object_id ST_geometrytype(geo) ST_ISSIMPLE(GEO) ST_ASTEXT(ST_centroid(geo))
drop table t1;
create table t1 (fl geometry not null);
insert into t1 values (1);
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values (1.11);
-ERROR HY000: Illegal parameter data types geometry and decimal for operation 'SET'
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (ST_pointfromtext('point(1,1)'));
diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result
index a976bbccaa9..0aa379df487 100644
--- a/mysql-test/suite/innodb_gis/r/gis.result
+++ b/mysql-test/suite/innodb_gis/r/gis.result
@@ -661,9 +661,9 @@ object_id ST_geometrytype(geo) ST_ISSIMPLE(GEO) ST_ASTEXT(ST_centroid(geo))
drop table t1;
create table t1 (fl geometry not null);
insert into t1 values (1);
-ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values (1.11);
-ERROR HY000: Illegal parameter data types geometry and decimal for operation 'SET'
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (ST_pointfromtext('point(1,1)'));