diff options
author | vva@eagle.mysql.r18.ru <> | 2004-04-05 23:18:16 +0500 |
---|---|---|
committer | vva@eagle.mysql.r18.ru <> | 2004-04-05 23:18:16 +0500 |
commit | 7b68b266239f1de612c50044064c0cd1cba5fb5d (patch) | |
tree | 0fd6f412bcb8636e776d8fd6a514ddbdf4caf764 /mysql-test/t/mysqldump.test | |
parent | 23a5fc55588a2acea2d529ae4d7c8696c6f8522c (diff) | |
download | mariadb-git-7b68b266239f1de612c50044064c0cd1cba5fb5d.tar.gz |
fixed Bug #3361 "mysqldump quotes DECIMAL values"
Diffstat (limited to 'mysql-test/t/mysqldump.test')
-rw-r--r-- | mysql-test/t/mysqldump.test | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index bc63dc37d96..d1394e40a49 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -30,3 +30,31 @@ INSERT INTO t1 VALUES (-9e999999); --replace_result (-1.79769313486232e+308) (RES) (NULL) (RES) --exec $MYSQL_DUMP --skip-comments test t1 DROP TABLE t1; + +# +# Bug #3361 mysqldum quotes DECIMAL values +# + +CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT); + +# check at first how mysql work with quoted decimal + +INSERT INTO t1 VALUES (1.2345, 2.3456); +INSERT INTO t1 VALUES ('1.2345', 2.3456); +INSERT INTO t1 VALUES ("1.2345", 2.3456); + +# The code below should be uncommented in mysql-4.1 to fix +# behaviour of quoting DECIMAL fields with different +# values of sql_mode +######## +#SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI_QUOTES'; +#INSERT INTO t1 VALUES (1.2345, 2.3456); +#INSERT INTO t1 VALUES ('1.2345', 2.3456); +#--error 1054 +#INSERT INTO t1 VALUES ("1.2345", 2.3456); +#SET SQL_MODE=@OLD_SQL_MODE; +######## + +# check how mysqldump make quoting +--exec $MYSQL_DUMP --skip-comments test t1 +DROP TABLE t1; |