summaryrefslogtreecommitdiff
path: root/mysql-test/t/csv.test
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2007-01-04 11:41:17 -0800
committerunknown <brian@zim.(none)>2007-01-04 11:41:17 -0800
commit8bd11441fd5d78d31869cbfbfea4795577c37c35 (patch)
tree16c9a94b608d1c28f7cf79bc07dd463759cdf1c8 /mysql-test/t/csv.test
parent20f0c7a65faf52136f47e809f855e5d500ad9a5b (diff)
downloadmariadb-git-8bd11441fd5d78d31869cbfbfea4795577c37c35.tar.gz
The CSV format has always relied on numbers being quoted, which doesn't always happen. This fixes that so that numbers can now be unquoted (and the output does this as well so that the log takes up less space).
mysql-test/r/csv.result: Fixed test case for format change. Added new test for floating point numbers. mysql-test/t/csv.test: Fixed test for format change. Added test case for floating point numbers. storage/csv/ha_tina.cc: Updated code to handle numbers as raw unquotes types in CSV
Diffstat (limited to 'mysql-test/t/csv.test')
-rw-r--r--mysql-test/t/csv.test16
1 files changed, 15 insertions, 1 deletions
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index 60d38394fc0..135969fe644 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1595,7 +1595,7 @@ insert into bug22080_1 values(2,'string');
insert into bug22080_1 values(3,'string');
# Currupt the file as described in the bug report
---exec sed -e 's/"2"/2"/' $MYSQLTEST_VARDIR/master-data/test/bug22080_1.CSV > $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV
+--exec sed -e 's/2/2"/' $MYSQLTEST_VARDIR/master-data/test/bug22080_1.CSV > $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV
--exec sed -e 's/2","/2",/' $MYSQLTEST_VARDIR/master-data/test/bug22080_1.CSV > $MYSQLTEST_VARDIR/master-data/test/bug22080_3.CSV
--exec cat $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV
@@ -1605,3 +1605,17 @@ check table bug22080_2;
check table bug22080_3;
drop tables bug22080_1,bug22080_2,bug22080_3;
+
+#
+# Testing float type
+#
+create table float_test (id float,string varchar(64)) Engine=CSV;
+insert into float_test values(1.0,'string');
+insert into float_test values(2.23,'serg.g');
+insert into float_test values(0.03,'string');
+insert into float_test values(0.19,'string');
+insert into float_test values(.67,'string');
+insert into float_test values(9.67,'string');
+select * from float_test;
+
+drop table float_test;