Changeset: 7ad1ee2a65a7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ad1ee2a65a7
Added Files:
        sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.sql
        sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.stable.err
        sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.stable.out
Branch: Oct2014
Log Message:

added test for inet parsing bug 3624


diffs (136 lines):

diff --git a/sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.sql 
b/sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.sql
@@ -0,0 +1,12 @@
+CREATE TABLE INET_TBL (ip inet);
+INSERT INTO INET_TBL VALUES ('192.168.1');
+INSERT INTO INET_TBL VALUES ('192.168.2.');
+INSERT INTO INET_TBL VALUES ('193');
+INSERT INTO INET_TBL VALUES ('193.169');
+INSERT INTO INET_TBL VALUES ('193.169.13');
+INSERT INTO INET_TBL VALUES ('193.169.13.4');
+INSERT INTO INET_TBL VALUES ('193.169.13.4/80');
+INSERT INTO INET_TBL VALUES ('193.169.13.4/32');
+INSERT INTO INET_TBL VALUES ('193.169.13.8/24');
+SELECT * FROM INET_TBL;
+DROP TABLE INET_TBL;
diff --git 
a/sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.stable.err 
b/sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.stable.err
@@ -0,0 +1,61 @@
+stderr of test 'inet_error_handling.Bug-3624` in directory 
'sql/test/BugTracker-2014` itself:
+
+
+# 10:46:21 >  
+# 10:46:21 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=30088" "--set" 
"mapi_usock=/var/tmp/mtest-29407/.s.monetdb.30088" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2014"
 "--set" "mal_listing=0" "--set" "embedded_r=yes"
+# 10:46:21 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/rc-clean/Linux-x86_64/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30088
+# cmdline opt  mapi_usock = /var/tmp/mtest-29407/.s.monetdb.30088
+# cmdline opt  monet_prompt = 
+# cmdline opt  mal_listing = 2
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2014
+# cmdline opt  mal_listing = 0
+# cmdline opt  embedded_r = yes
+# cmdline opt  gdk_debug = 536870922
+
+# 10:46:21 >  
+# 10:46:21 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-29407" "--port=30088"
+# 10:46:21 >  
+
+MAPI  = (monetdb) /var/tmp/mtest-29407/.s.monetdb.30088
+QUERY = INSERT INTO INET_TBL VALUES ('192.168.1');
+ERROR = !GDKerror:!ERROR: Error while parsing, unexpected string ''
+        !
+MAPI  = (monetdb) /var/tmp/mtest-29407/.s.monetdb.30088
+QUERY = INSERT INTO INET_TBL VALUES ('192.168.2.');
+ERROR = !GDKerror:!ERROR: Error while parsing, unexpected string ''
+        !
+MAPI  = (monetdb) /var/tmp/mtest-29407/.s.monetdb.30088
+QUERY = INSERT INTO INET_TBL VALUES ('193');
+ERROR = !GDKerror:!ERROR: Error while parsing, unexpected string ''
+        !
+MAPI  = (monetdb) /var/tmp/mtest-29407/.s.monetdb.30088
+QUERY = INSERT INTO INET_TBL VALUES ('193.169');
+ERROR = !GDKerror:!ERROR: Error while parsing, unexpected string ''
+        !
+MAPI  = (monetdb) /var/tmp/mtest-29407/.s.monetdb.30088
+QUERY = INSERT INTO INET_TBL VALUES ('193.169.13');
+ERROR = !GDKerror:!ERROR: Error while parsing, unexpected string ''
+        !
+MAPI  = (monetdb) /var/tmp/mtest-29407/.s.monetdb.30088
+QUERY = INSERT INTO INET_TBL VALUES ('193.169.13.4/80');
+ERROR = !GDKerror:!ERROR: Illegal mask value: 80
+        !
+
+# 10:46:21 >  
+# 10:46:21 >  "Done."
+# 10:46:21 >  
+
diff --git 
a/sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.stable.out 
b/sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2014/Tests/inet_error_handling.Bug-3624.stable.out
@@ -0,0 +1,48 @@
+stdout of test 'inet_error_handling.Bug-3624` in directory 
'sql/test/BugTracker-2014` itself:
+
+
+# 10:46:21 >  
+# 10:46:21 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=30088" "--set" 
"mapi_usock=/var/tmp/mtest-29407/.s.monetdb.30088" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2014"
 "--set" "mal_listing=0" "--set" "embedded_r=yes"
+# 10:46:21 >  
+
+# MonetDB 5 server v11.19.4
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2014', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
+# Found 7.333 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://localhost.nes.nl:30088/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-29407/.s.monetdb.30088
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB/R   module loaded
+
+Ready.
+
+# 10:46:21 >  
+# 10:46:21 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-29407" "--port=30088"
+# 10:46:21 >  
+
+#CREATE TABLE INET_TBL (ip inet);
+#INSERT INTO INET_TBL VALUES ('193.169.13.4');
+[ 1    ]
+#INSERT INTO INET_TBL VALUES ('193.169.13.4/32');
+[ 1    ]
+#INSERT INTO INET_TBL VALUES ('193.169.13.8/24');
+[ 1    ]
+#SELECT * FROM INET_TBL;
+% sys.inet_tbl # table_name
+% ip # name
+% inet # type
+% 0 # length
+[ 193.169.13.4 ]
+[ 193.169.13.4 ]
+[ 193.169.13.8/24      ]
+#DROP TABLE INET_TBL;
+
+# 10:46:21 >  
+# 10:46:21 >  "Done."
+# 10:46:21 >  
+
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to