1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-19819 ALTER from POINT to LINESTRING erroneously preserves POINT values

This commit is contained in:
Alexander Barkov
2019-06-21 15:23:58 +04:00
parent 8b576616b4
commit e9a692fe1e
5 changed files with 56 additions and 11 deletions

View File

@ -3094,6 +3094,25 @@ SELECT (1,0) IN ((POINT(1,1),0),(0,0));
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT (1,(0,0)) IN ((1,(POINT(1,1),0)),(0,(0,0)));
--echo #
--echo # MDEV-19819 ALTER from POINT to LINESTRING erroneously preserves POINT values
--echo #
CREATE TABLE t1 (a POINT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (Point(0,0));
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
ALTER TABLE t1 MODIFY a LINESTRING;
DROP TABLE t1;
CREATE TABLE t1 (a LINESTRING);
CREATE TABLE t2 (a POINT);
INSERT INTO t2 VALUES (POINT(0,0));
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
INSERT INTO t1 SELECT * FROM t2;
SELECT AsText(a) FROM t1;
DROP TABLE t1, t2;
--echo #
--echo # End of 10.4 tests
--echo #