Changeset: 8add83d764f0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8add83d764f0
Added Files:
sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py
Removed Files:
sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py
Modified Files:
sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris
sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql
sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out
Branch: default
Log Message:
Merge with Oct2014 branch.
diffs (truncated from 586 to 300 lines):
diff --git
a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris
b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris
--- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris
+++ b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris
@@ -67,7 +67,7 @@ stderr of test 'overflow.SF-2853458` in
# 22:26:13 > mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35561
# 22:26:13 >
-MAPI = (monetdb) /var/tmp/mtest-9389/.s.monetdb.34946
+MAPI = (monetdb) /var/tmp/mtest-3249/.s.monetdb.34957
QUERY = select cast(power(2,64) as bigint);
ERROR = !overflow in conversion of 1.8446744073709552e+19 to lng.
diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py
b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py
rename from sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py
rename to sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py
--- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py
+++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py
@@ -4,31 +4,16 @@ try:
except ImportError:
import process
-def server_start():
- sys.stderr.write('#mserver\n')
- sys.stderr.flush()
- srv = process.server(stdin = process.PIPE,
- stdout = process.PIPE, stderr = process.PIPE)
- return srv
-
-def client(lang, user = 'monetdb', passwd = 'monetdb'):
+def main():
sys.stderr.write('#client\n')
sys.stderr.flush()
- clt = process.client(lang, user = user, passwd = passwd,
+ clt = process.client('sql', user = 'monetdb', passwd = 'monetdb',
stdin = process.PIPE,
stdout = process.PIPE, stderr = process.PIPE)
currenttime = time.strftime('%H:%M:%S', time.localtime(time.time()))
#SQL command for checking the localtime
- sqlcommand = "select (localtime() - time '%s' < time '00:00:20') and (time
'%s' - localtime() < time '00:00:20');" % (currenttime, currenttime)
- return clt.communicate(sqlcommand)
-
-def main():
- srv = server_start()
- out, err = client('sql')
-
- sys.stdout.write(out)
- sys.stderr.write(err)
- out, err = srv.communicate()
+ sqlcommand = "select localtime() between (time '%s' - interval '20'
second) and (time '%s' + interval '20' second);" % (currenttime, currenttime)
+ out, err = clt.communicate(sqlcommand)
sys.stdout.write(out)
sys.stderr.write(err)
diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
--- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
+++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
@@ -5,13 +5,7 @@ stdout of test 'currenttime.Bug-2781` in
# 14:00:10 > "/usr/bin/python" "currenttime.Bug-2781.py"
"currenttime.Bug-2781"
# 14:00:10 >
-#select (localtime() - time '14:00:10' < time '00:00:20') and (time '14:00:10'
- localtime() < time '00:00:20');
-% . # table_name
-% sql_sub_localtime # name
-% boolean # type
-% 5 # length
-[ true ]
-# MonetDB 5 server v11.13.6
+# MonetDB 5 server v11.19.10 (hg id: 68ab398acb08)
# This is an unreleased version
# Serving database 'mTests_test_BugTracker-2012', using 8 threads
# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically
linked
@@ -23,6 +17,9 @@ stdout of test 'currenttime.Bug-2781` in
# MonetDB/GIS module loaded
# MonetDB/JAQL module loaded
# MonetDB/SQL module loaded
+# MonetDB/R module loaded
+
+Ready.
# SQL catalog created, loading sql scripts once
# loading sql script: 09_like.sql
# loading sql script: 10_math.sql
@@ -46,7 +43,18 @@ stdout of test 'currenttime.Bug-2781` in
# loading sql script: 80_udf.sql
# loading sql script: 99_system.sql
-# 14:00:10 >
-# 14:00:10 > "Done."
-# 14:00:10 >
+# 09:58:27 >
+# 09:58:27 > "/usr/bin/python2" "currenttime.Bug-2781.SQL.py"
"currenttime.Bug-2781"
+# 09:58:27 >
+#select (localtime() - time '09:58:27' < time '00:00:20') and (time '09:58:27'
- localtime() < time '00:00:20');
+% .L # table_name
+% and_>=_localtime # name
+% boolean # type
+% 5 # length
+[ true ]
+
+# 09:58:28 >
+# 09:58:28 > "Done."
+# 09:58:28 >
+
diff --git a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql
b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql
--- a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql
+++ b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql
@@ -1,35 +1,37 @@
--- next query synthesizes the queries for SQL systems table column names which
are also reserved words except for
--- 'default', 'null', 'unique' and 'user' as those names need to be avoided as
SQL systems table column names at all times.
-SELECT 'SELECT DISTINCT '||C.name||' FROM '||S.name||'.'||T.name||' WHERE
'||C.name||' IS NOT NULL ORDER BY '||C.name||';' as SQL_query
- FROM sys.columns C join sys.tables T on C.table_id = T.id join sys.schemas S
on T.schema_id = S.id
- WHERE lower(C.name) in ('action', 'as', 'authorization', 'column', 'cycle',
'distinct', 'increment', 'maxvalue', 'minvalue', 'plan', 'schema', 'start',
'statement', 'table')
- ORDER BY C.name, S.name, T.name;
+create table keywords (
+ "action" integer,
+ "as" integer,
+ "authorization" integer,
+ "column" integer,
+ "cycle" integer,
+ "distinct" integer,
+ "increment" integer,
+ "maxvalue" integer,
+ "minvalue" integer,
+ "plan" integer,
+ "schema" integer,
+ "start" integer,
+ "statement" integer,
+ "table" integer
+);
+insert into keywords values (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
-SELECT DISTINCT action FROM sys.keys WHERE action IS NOT NULL ORDER BY action;
-SELECT DISTINCT action FROM tmp.keys WHERE action IS NOT NULL ORDER BY action;
-SELECT DISTINCT as FROM bam.sq WHERE as IS NOT NULL ORDER BY as;
-SELECT DISTINCT authorization FROM sys.schemas WHERE authorization IS NOT NULL
ORDER BY authorization;
-SELECT DISTINCT column FROM sys.storage WHERE column IS NOT NULL ORDER BY
column;
-SELECT DISTINCT column FROM sys.storagemodel WHERE column IS NOT NULL ORDER BY
column;
-SELECT DISTINCT column FROM sys.storagemodelinput WHERE column IS NOT NULL
ORDER BY column;
-SELECT DISTINCT cycle FROM sys.sequences WHERE cycle IS NOT NULL ORDER BY
cycle;
-SELECT DISTINCT distinct FROM sys.storagemodelinput WHERE distinct IS NOT NULL
ORDER BY distinct;
-SELECT DISTINCT increment FROM sys.sequences WHERE increment IS NOT NULL ORDER
BY increment;
-SELECT DISTINCT maxvalue FROM sys.sequences WHERE maxvalue IS NOT NULL ORDER
BY maxvalue;
-SELECT DISTINCT minvalue FROM sys.sequences WHERE minvalue IS NOT NULL ORDER
BY minvalue;
-SELECT DISTINCT plan FROM sys.querylog_catalog WHERE plan IS NOT NULL ORDER BY
plan;
-SELECT DISTINCT plan FROM sys.querylog_history WHERE plan IS NOT NULL ORDER BY
plan;
-SELECT DISTINCT schema FROM sys.storage WHERE schema IS NOT NULL ORDER BY
schema;
-SELECT DISTINCT schema FROM sys.storagemodel WHERE schema IS NOT NULL ORDER BY
schema;
-SELECT DISTINCT schema FROM sys.storagemodelinput WHERE schema IS NOT NULL
ORDER BY schema;
-SELECT DISTINCT schema FROM sys.tablestoragemodel WHERE schema IS NOT NULL
ORDER BY schema;
-SELECT DISTINCT start FROM sys.querylog_calls WHERE start IS NOT NULL ORDER BY
start;
-SELECT DISTINCT start FROM sys.querylog_history WHERE start IS NOT NULL ORDER
BY start;
-SELECT DISTINCT start FROM sys.sequences WHERE start IS NOT NULL ORDER BY
start;
-SELECT DISTINCT statement FROM sys.triggers WHERE statement IS NOT NULL ORDER
BY statement;
-SELECT DISTINCT statement FROM tmp.triggers WHERE statement IS NOT NULL ORDER
BY statement;
-SELECT DISTINCT table FROM sys.storage WHERE table IS NOT NULL ORDER BY table;
-SELECT DISTINCT table FROM sys.storagemodel WHERE table IS NOT NULL ORDER BY
table;
-SELECT DISTINCT table FROM sys.storagemodelinput WHERE table IS NOT NULL ORDER
BY table;
-SELECT DISTINCT table FROM sys.tablestoragemodel WHERE table IS NOT NULL ORDER
BY table;
+select distinct action from sys.keywords;
+select distinct as from sys.keywords;
+select distinct authorization from sys.keywords;
+select distinct column from sys.keywords;
+select distinct cycle from sys.keywords;
+select distinct distinct from sys.keywords;
+select distinct increment from sys.keywords;
+select distinct maxvalue from sys.keywords;
+select distinct minvalue from sys.keywords;
+select distinct plan from sys.keywords;
+select distinct schema from sys.keywords;
+select distinct start from sys.keywords;
+select distinct statement from sys.keywords;
+select distinct table from sys.keywords;
+drop table keywords;
+
+
+
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
--- a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out
+++ b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out
@@ -29,335 +29,101 @@ Ready.
# 18:58:09 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-21543" "--port=39106"
# 18:58:09 >
-#SELECT 'SELECT DISTINCT '||C.name||' FROM '||S.name||'.'||T.name||' WHERE
'||C.name||' IS NOT NULL ORDER BY '||C.name||';' as SQL_query
-# FROM sys.columns C join sys.tables T on C.table_id = T.id join sys.schemas
S on T.schema_id = S.id
-# WHERE lower(C.name) in ('action', 'as', 'authorization', 'column', 'cycle',
'distinct', 'increment', 'maxvalue', 'minvalue', 'plan', 'sample', 'schema',
'start', 'statement', 'table')
-# ORDER BY C.name, S.name, T.name;
-% .L # table_name
-% sql_query # name
-% varchar # type
-% 102 # length
-[ "SELECT DISTINCT action FROM sys.keys WHERE action IS NOT NULL ORDER BY
action;" ]
-[ "SELECT DISTINCT action FROM tmp.keys WHERE action IS NOT NULL ORDER BY
action;" ]
-[ "SELECT DISTINCT as FROM bam.sq WHERE as IS NOT NULL ORDER BY as;" ]
-[ "SELECT DISTINCT authorization FROM sys.schemas WHERE authorization IS NOT
NULL ORDER BY authorization;" ]
-[ "SELECT DISTINCT column FROM sys.storage WHERE column IS NOT NULL ORDER BY
column;" ]
-[ "SELECT DISTINCT column FROM sys.storagemodel WHERE column IS NOT NULL ORDER
BY column;" ]
-[ "SELECT DISTINCT column FROM sys.storagemodelinput WHERE column IS NOT NULL
ORDER BY column;" ]
-[ "SELECT DISTINCT cycle FROM sys.sequences WHERE cycle IS NOT NULL ORDER BY
cycle;" ]
-[ "SELECT DISTINCT distinct FROM sys.storagemodelinput WHERE distinct IS NOT
NULL ORDER BY distinct;" ]
-[ "SELECT DISTINCT increment FROM sys.sequences WHERE increment IS NOT NULL
ORDER BY increment;" ]
-[ "SELECT DISTINCT maxvalue FROM sys.sequences WHERE maxvalue IS NOT NULL
ORDER BY maxvalue;" ]
-[ "SELECT DISTINCT minvalue FROM sys.sequences WHERE minvalue IS NOT NULL
ORDER BY minvalue;" ]
-[ "SELECT DISTINCT plan FROM sys.querylog_catalog WHERE plan IS NOT NULL ORDER
BY plan;" ]
-[ "SELECT DISTINCT plan FROM sys.querylog_history WHERE plan IS NOT NULL ORDER
BY plan;" ]
-[ "SELECT DISTINCT schema FROM sys.storage WHERE schema IS NOT NULL ORDER BY
schema;" ]
-[ "SELECT DISTINCT schema FROM sys.storagemodel WHERE schema IS NOT NULL ORDER
BY schema;" ]
-[ "SELECT DISTINCT schema FROM sys.storagemodelinput WHERE schema IS NOT NULL
ORDER BY schema;" ]
-[ "SELECT DISTINCT schema FROM sys.tablestoragemodel WHERE schema IS NOT NULL
ORDER BY schema;" ]
-[ "SELECT DISTINCT start FROM sys.querylog_calls WHERE start IS NOT NULL ORDER
BY start;" ]
-[ "SELECT DISTINCT start FROM sys.querylog_history WHERE start IS NOT NULL
ORDER BY start;" ]
-[ "SELECT DISTINCT start FROM sys.sequences WHERE start IS NOT NULL ORDER BY
start;" ]
-[ "SELECT DISTINCT statement FROM sys.triggers WHERE statement IS NOT NULL
ORDER BY statement;" ]
-[ "SELECT DISTINCT statement FROM tmp.triggers WHERE statement IS NOT NULL
ORDER BY statement;" ]
-[ "SELECT DISTINCT table FROM sys.storage WHERE table IS NOT NULL ORDER BY
table;" ]
-[ "SELECT DISTINCT table FROM sys.storagemodel WHERE table IS NOT NULL ORDER
BY table;" ]
-[ "SELECT DISTINCT table FROM sys.storagemodelinput WHERE table IS NOT NULL
ORDER BY table;" ]
-[ "SELECT DISTINCT table FROM sys.tablestoragemodel WHERE table IS NOT NULL
ORDER BY table;" ]
-#SELECT DISTINCT action FROM sys.keys WHERE action IS NOT NULL ORDER BY action;
-% sys.keys # table_name
-% action # name
-% int # type
-% 3 # length
-[ -1 ]
-[ 514 ]
-#SELECT distinct action FROM tmp.keys;
-% tmp.keys # table_name
+#create table keywords (
+# "action" integer,
+# "default" integer,
+# "schema" integer,
+# "start" integer,
+# "statement" integer,
+# "user" integer
+#);
+#insert into keywords values (1, 2, 3, 4, 5, 6);
+[ 1 ]
+#select distinct action from sys.keywords;
+% sys.keywords # table_name
% action # name
% int # type
% 1 # length
-#SELECT distinct as FROM bam.sq;
-% bam.sq # table_name
+[ 1 ]
+#select distinct as from sys.keywords;
+% sys.keywords # table_name
% as # name
% int # type
% 1 # length
-#SELECT distinct authorization FROM sys.schemas;
-% sys.schemas # table_name
+[ 2 ]
+#select distinct authorization from sys.keywords;
+% sys.keywords # table_name
% authorization # name
% int # type
% 1 # length
-[ 2 ]
[ 3 ]
-#SELECT distinct column FROM sys.storage;
-% .storage # table_name
+#select distinct column from sys.keywords;
+% sys.keywords # table_name
% column # name
-% clob # type
-% 18 # length
-[ "access" ]
-[ "action" ]
-[ "as" ]
-[ "atomwidth" ]
-[ "auth_id" ]
-[ "authorization" ]
-[ "cacheinc" ]
-[ "cigar" ]
-[ "cl" ]
-[ "cn" ]
-[ "column" ]
-[ "column_id" ]
-[ "comments" ]
-[ "commit_action" ]
-[ "condition" ]
-[ "count" ]
-[ "cycle" ]
-[ "db" ]
-[ "db_alias" ]
-[ "dbschema" ]
-[ "default" ]
-[ "default_schema" ]
-[ "depend_id" ]
-[ "depend_type" ]
-[ "digits" ]
-[ "distinct" ]
-[ "ds" ]
-[ "dt" ]
-[ "eclass" ]
-[ "event" ]
-[ "file_id" ]
-[ "file_location" ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list