Changeset: 914313189a7e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=914313189a7e
Added Files:
        sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql
        sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.err
        sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out
Modified Files:
        sql/server/sql_parser.y
        sql/test/BugTracker-2015/Tests/All
Branch: Oct2014
Log Message:

added some more (non)-reserved keywords in the exception list. This
solves bug 3613.


diffs (truncated from 2106 to 300 lines):

diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y
--- a/sql/server/sql_parser.y
+++ b/sql/server/sql_parser.y
@@ -4840,6 +4840,13 @@ non_reserved_word:
 | VALUE                { $$ = sa_strdup(SA, "value"); }        /* sloppy: 
officially reserved */
 | ZONE         { $$ = sa_strdup(SA, "zone"); }         /* sloppy: officially 
reserved */
 
+| ACTION       { $$ = sa_strdup(SA, "action"); }       /* sloppy: officially 
reserved */
+| DEFAULT      { $$ = sa_strdup(SA, "default"); }      /* sloppy: officially 
reserved */
+| SCHEMA       { $$ = sa_strdup(SA, "schema"); }       /* sloppy: officially 
reserved */
+| START                { $$ = sa_strdup(SA, "start"); }        /* sloppy: 
officially reserved */
+| STATEMENT    { $$ = sa_strdup(SA, "statement"); }    /* sloppy: officially 
reserved */
+| USER         { $$ = sa_strdup(SA, "user"); } /* sloppy: officially reserved 
*/
+
 |  CACHE       { $$ = sa_strdup(SA, "cache"); }
 |  DATA        { $$ = sa_strdup(SA, "data"); }
 |  DIAGNOSTICS         { $$ = sa_strdup(SA, "diagnostics"); }
diff --git a/sql/test/BugTracker-2015/Tests/All 
b/sql/test/BugTracker-2015/Tests/All
--- a/sql/test/BugTracker-2015/Tests/All
+++ b/sql/test/BugTracker-2015/Tests/All
@@ -11,3 +11,4 @@ string-to-inet.Bug-3666
 negative_oid_crash.Bug-3667
 ukey_check_unaligned.Bug-3669
 inet-funcs.Bug-3645
+reserved_keywords.Bug-3613
diff --git a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql 
b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql
@@ -0,0 +1,44 @@
+SELECT tbl.action FROM sys.keys tbl;
+SELECT tbl.action FROM tmp.keys tbl;
+
+SELECT tbl.default FROM sys._columns tbl;
+SELECT tbl.default FROM sys.columns tbl;
+SELECT tbl.default FROM tmp._columns tbl;
+
+SELECT tbl.schema FROM sys.statistics tbl;
+SELECT tbl.schema FROM sys.storage tbl;
+SELECT tbl.schema FROM sys.storagemodel tbl;
+SELECT tbl.schema FROM sys.storagemodelinput tbl;
+SELECT tbl.schema FROM sys.tablestoragemodel tbl;
+
+SELECT tbl.start FROM sys.querylog_calls tbl;
+SELECT tbl.start FROM sys.querylog_history tbl;
+SELECT tbl.start FROM sys.sequences tbl;
+
+SELECT tbl.statement FROM sys.triggers tbl;
+SELECT tbl.statement FROM tmp.triggers tbl;
+
+SELECT tbl.user FROM sys.connections tbl;
+SELECT tbl.user FROM sys.queue tbl;
+SELECT tbl.user FROM sys.sessions tbl;
+SELECT tbl.user FROM sys.tracelog tbl;
+
+SELECT action FROM sys.keys;
+SELECT action FROM tmp.keys;
+
+SELECT default FROM sys._columns;
+SELECT default FROM sys.columns;
+SELECT default FROM tmp._columns;
+
+SELECT schema FROM sys.statistics;
+SELECT schema FROM sys.storage;
+SELECT schema FROM sys.storagemodel;
+SELECT schema FROM sys.storagemodelinput;
+SELECT schema FROM sys.tablestoragemodel;
+
+SELECT start FROM sys.querylog_calls;
+SELECT start FROM sys.querylog_history;
+SELECT start FROM sys.sequences;
+
+SELECT statement FROM sys.triggers;
+SELECT statement FROM tmp.triggers;
diff --git 
a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.err 
b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.err
@@ -0,0 +1,43 @@
+stderr of test 'reserved_keywords.Bug-3613` in directory 
'sql/test/BugTracker-2015` itself:
+
+
+# 18:58:09 >  
+# 18:58:09 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=39106" "--set" 
"mapi_usock=/var/tmp/mtest-21543/.s.monetdb.39106" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2015"
 "--set" "mal_listing=0" "--set" "embedded_r=yes"
+# 18:58:09 >  
+
+# 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 = 39106
+# cmdline opt  mapi_usock = /var/tmp/mtest-21543/.s.monetdb.39106
+# 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-2015
+# cmdline opt  mal_listing = 0
+# cmdline opt  embedded_r = yes
+# cmdline opt  gdk_debug = 536870922
+## HASHnew(tpe=12,size=256,mask=1024): width = 2 ##
+## HASHnew(tpe=12,size=256,mask=1024): width = 2 ##
+## HASHnew(tpe=12,size=256,mask=1024): width = 2 ##
+## HASHnew(tpe=5,size=256,mask=1024): width = 2 ##
+## HASHnew(tpe=6,size=256,mask=1024): width = 2 ##
+## HASHnew(tpe=6,size=256,mask=1024): width = 2 ##
+
+# 18:58:09 >  
+# 18:58:09 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-21543" "--port=39106"
+# 18:58:09 >  
+
+
+# 18:58:09 >  
+# 18:58:09 >  "Done."
+# 18:58:09 >  
+
diff --git 
a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out 
b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out
@@ -0,0 +1,1979 @@
+stdout of test 'reserved_keywords.Bug-3613` in directory 
'sql/test/BugTracker-2015` itself:
+
+
+# 18:58:09 >  
+# 18:58:09 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=39106" "--set" 
"mapi_usock=/var/tmp/mtest-21543/.s.monetdb.39106" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2015"
 "--set" "mal_listing=0" "--set" "embedded_r=yes"
+# 18:58:09 >  
+
+# MonetDB 5 server v11.19.8
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2015', 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-2015 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://localhost.nes.nl:39106/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-21543/.s.monetdb.39106
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB/R   module loaded
+
+Ready.
+#WARNING To speedup user.columnsize a bulk operator implementation is needed
+#WARNING To speedup user.heapsize a bulk operator implementation is needed
+#WARNING To speedup user.hashsize a bulk operator implementation is needed
+#WARNING To speedup user.imprintsize a bulk operator implementation is needed
+
+# 18:58:09 >  
+# 18:58:09 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-21543" "--port=39106"
+# 18:58:09 >  
+
+#SELECT tbl.action FROM sys.keys tbl;
+% sys.tbl # table_name
+% action # name
+% int # type
+% 3 # length
+[ -1   ]
+[ -1   ]
+[ 514  ]
+[ -1   ]
+[ 514  ]
+[ -1   ]
+[ 514  ]
+#SELECT tbl.action FROM tmp.keys tbl;
+% tmp.tbl # table_name
+% action # name
+% int # type
+% 1 # length
+#SELECT tbl.default FROM sys._columns tbl;
+% sys.tbl # table_name
+% default # name
+% varchar # type
+% 0 # length
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to