diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-01-11 17:20:16 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2016-01-11 17:20:16 +0400 |
commit | 454589b67f9609a78f00e521fe2ef0994eed4f3f (patch) | |
tree | 1d17569e30a61865cc6af35e025fb4e03952efbf /mysql-test/r/type_enum.result | |
parent | 250ab81200bf62d02c25144e3da38f7a9d3ced19 (diff) | |
download | mariadb-git-454589b67f9609a78f00e521fe2ef0994eed4f3f.tar.gz |
MDEV-9393 Split Copy_field::get_copy_func() into virtual methods in Field
Also fixes:
MDEV-9391 InnoDB does not produce warnings when doing WHERE int_column=varchar_column
MDEV-9337 ALTER from DECIMAL and INT to DATETIME returns a wrong result
MDEV-9340 Copying from INT/DOUBLE to ENUM is inconsistent
MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
Diffstat (limited to 'mysql-test/r/type_enum.result')
-rw-r--r-- | mysql-test/r/type_enum.result | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index d901434fd6e..f0152d08c32 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -2134,3 +2134,84 @@ DROP TABLE t1; # # End of 10.1 tests # +# +# MDEV-9340 Copying from INT/DOUBLE to ENUM is inconsistent +# +CREATE TABLE t1 (a ENUM('9e200','9e100')); +CREATE TABLE t2 (a DOUBLE); +INSERT INTO t2 VALUES ('9e100'); +INSERT INTO t1 SELECT * FROM t2; +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a + +DROP TABLE t1,t2; +CREATE TABLE t1 (a DOUBLE); +INSERT INTO t1 VALUES (9e100); +ALTER TABLE t1 MODIFY a ENUM('9e200','9e100'); +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '9e100' +Warning 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a + +DROP TABLE t1; +CREATE TABLE t1 (a ENUM('200','100')); +CREATE TABLE t2 (a DOUBLE); +INSERT INTO t2 VALUES ('100'); +INSERT INTO t1 SELECT * FROM t2; +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a + +DROP TABLE t1,t2; +CREATE TABLE t1 (a ENUM('200','100')); +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES ('100'); +INSERT INTO t1 SELECT * FROM t2; +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a + +DROP TABLE t1,t2; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES ('200'); +ALTER TABLE t1 MODIFY a ENUM('200','100'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SELECT *FROM t1; +a + +DROP TABLE t1; +CREATE TABLE t1 (a ENUM('200','100')); +CREATE TABLE t2 (a INT); +INSERT INTO t2 VALUES ('100'); +INSERT INTO t1 SELECT * FROM t2; +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a + +DROP TABLE t1,t2; +CREATE TABLE t1 (a ENUM('2001','2002')); +CREATE TABLE t2 (a YEAR); +INSERT INTO t2 VALUES ('2001'); +INSERT INTO t1 SELECT * FROM t2; +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a + +DROP TABLE t1,t2; +CREATE TABLE t1 (a YEAR); +INSERT INTO t1 VALUES ('2001'); +ALTER TABLE t1 MODIFY a ENUM('2001','2002'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a + +DROP TABLE t1; |