Update of /cvsroot/monetdb/sql/src/test/copy/Tests
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11663/copy/Tests
Modified Files:
int_parse.sql int_parse.stable.err int_parse.stable.out
Log Message:
New test added
Index: int_parse.sql
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/copy/Tests/int_parse.sql,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- int_parse.sql 28 Dec 2008 19:05:12 -0000 1.2
+++ int_parse.sql 31 Dec 2009 14:46:59 -0000 1.3
@@ -1,4 +1,25 @@
create table t_int(i int);
+
+-- If a numeric is enclosed as string we have to be careful
+-- It seems that convention is to check for it, turning
+-- the example below into one null value added to the table.
+copy 1 records into t_int from stdin USING DELIMITERS ',','\n','\"' NULL AS '';
+""
+
+select * from t_int;
+
+-- A decimal value entered at a place where we expect an int
+-- should be recognized. It is the residu of dumping an int
+-- as decimal.
+copy 2 records into t_int from stdin USING DELIMITERS ',','\n','\"' NULL AS '';
+3.00
+-4.0000
+
+copy 1 records into t_int from stdin USING DELIMITERS ',','\n','\"' NULL AS '';
+5.1
+
+select * from t_int;
+
copy 4 records into t_int from stdin delimiters ',','\n' NULL as '';
1
nil
Index: int_parse.stable.out
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/copy/Tests/int_parse.stable.out,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- int_parse.stable.out 10 Aug 2009 06:09:48 -0000 1.3
+++ int_parse.stable.out 31 Dec 2009 14:46:59 -0000 1.4
@@ -25,12 +25,29 @@
# 13:54:35 > mclient -lsql -umonetdb -Pmonetdb --host=eir --port=34075
# 13:54:35 >
+[ 1 ]
% sys.t_int # table_name
% i # name
% int # type
% 1 # length
+[ NULL ]
+[ 2 ]
+% sys.t_int # table_name
+% i # name
+% int # type
+% 2 # length
+[ NULL ]
+[ 3 ]
+[ -4 ]
+% sys.t_int # table_name
+% i # name
+% int # type
+% 2 # length
+[ NULL ]
+[ 3 ]
+[ -4 ]
-# 22:56:12 >
-# 22:56:12 > Done.
-# 22:56:12 >
+# 09:41:35 >
+# 09:41:35 > Done.
+# 09:41:35 >
Index: int_parse.stable.err
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/copy/Tests/int_parse.stable.err,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- int_parse.stable.err 8 Nov 2009 23:58:17 -0000 1.5
+++ int_parse.stable.err 31 Dec 2009 14:46:59 -0000 1.6
@@ -79,7 +79,11 @@
# 19:40:24 > mclient -lsql -umonetdb -Pmonetdb --host=eir --port=37659
# 19:40:24 >
-MAPI = mone...@eir:36474
+MAPI = mone...@eir:37128
+QUERY = copy 1 records into t_int from stdin USING DELIMITERS ',','\n','\"'
NULL AS '';
+ERROR = !SQLException:sql:value '5.1' from line 1 field 1 not inserted,
expecting type int
+ !SQLException:importTable:failed to import table
+MAPI = mone...@eir:37128
QUERY = copy 4 records into t_int from stdin delimiters ',','\n' NULL as '';
ERROR = !SQLException:sql:value 'null' from line 3 field 1 not inserted,
expecting type int
!SQLException:importTable:failed to import table
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins