Changeset: 53c9340f70dc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=53c9340f70dc
Modified Files:
monetdb5/mal/mal_interpreter.c
monetdb5/modules/mal/querylog.c
sql/test/BugTracker-2014/Tests/querylog.Bug-3607.sql
sql/test/BugTracker-2014/Tests/querylog.Bug-3607.stable.out
Branch: default
Log Message:
Extend testing querylog
diffs (128 lines):
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -639,12 +639,14 @@ str runMALsequence(Client cntxt, MalBlkP
if (isaBatType(t)) {
bat bid =
stk->stk[a].val.bval;
+ BAT *_b =
BATdescriptor(bid);
t = getColumnType(t);
assert(stk->stk[a].vtype == TYPE_bat);
assert(bid == 0 ||
bid ==
bat_nil ||
t ==
TYPE_any ||
-
ATOMtype(BBP_cache(bid)->ttype) == ATOMtype(t));
+
ATOMtype(_b->ttype) == ATOMtype(t));
+ if(_b) BBPunfix(bid);
} else {
assert(t ==
stk->stk[a].vtype);
}
diff --git a/monetdb5/modules/mal/querylog.c b/monetdb5/modules/mal/querylog.c
--- a/monetdb5/modules/mal/querylog.c
+++ b/monetdb5/modules/mal/querylog.c
@@ -180,8 +180,8 @@ static void
QLOG_cat_defined = QLOGcreate("cat","defined",TYPE_timestamp);
QLOG_cat_query = QLOGcreate("cat","query",TYPE_str);
QLOG_cat_pipe = QLOGcreate("cat","pipe",TYPE_str);
+ QLOG_cat_plan = QLOGcreate("cat","size",TYPE_str);
QLOG_cat_mal = QLOGcreate("cat","mal",TYPE_int);
- QLOG_cat_plan = QLOGcreate("cat","size",TYPE_str);
QLOG_cat_optimize = QLOGcreate("cat","optimize",TYPE_lng);
QLOG_calls_id = QLOGcreate("calls","id",TYPE_oid);
diff --git a/sql/test/BugTracker-2014/Tests/querylog.Bug-3607.sql
b/sql/test/BugTracker-2014/Tests/querylog.Bug-3607.sql
--- a/sql/test/BugTracker-2014/Tests/querylog.Bug-3607.sql
+++ b/sql/test/BugTracker-2014/Tests/querylog.Bug-3607.sql
@@ -1,5 +1,18 @@
-select * from sys.querylog_catalog;
-call querylog_enable();
-select * from sys.querylog_catalog;
+select * from sys.querylog_history;
select * from sys.querylog_catalog;
select * from sys.querylog_calls;
+
+call querylog_enable();
+
+select 1;
+select * from sys.querylog_catalog;
+select * from sys.querylog_calls;
+select * from sys.querylog_history;
+
+call querylog_disable();
+call sys.querylog_empty();
+
+select * from sys.querylog_history;
+select * from sys.querylog_calls;
+select * from sys.querylog_catalog;
+
diff --git a/sql/test/BugTracker-2014/Tests/querylog.Bug-3607.stable.out
b/sql/test/BugTracker-2014/Tests/querylog.Bug-3607.stable.out
--- a/sql/test/BugTracker-2014/Tests/querylog.Bug-3607.stable.out
+++ b/sql/test/BugTracker-2014/Tests/querylog.Bug-3607.stable.out
@@ -53,16 +53,11 @@ Ready.
# 21:52:29 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-26218" "--port=33559"
# 21:52:29 >
-#select * from sys.querylog_catalog;
-% .querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog # table_name
-% id, owner, defined, query, pipe, plan, mal, optimize # name
-% oid, clob, timestamp, clob, clob, clob, int, bigint # type
-% 3, 0, 26, 0, 0, 0, 1, 1 # length
-#select * from sys.querylog_catalog;
-% .querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog # table_name
-% id, owner, defined, query, pipe, plan, mal, optimize # name
-% oid, clob, timestamp, clob, clob, clob, int, bigint # type
-% 3, 0, 26, 0, 0, 0, 1, 1 # length
+#select * from sys.querylog_history;
+% .querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history # table_name
+% id, owner, defined, query, pipe, plan, mal, optimize,
start, stop, arguments, tuples, run, ship, cpu, io # name
+% oid, clob, timestamp, clob, clob, clob, int, bigint,
timestamp, timestamp, clob, wrd, bigint, bigint, int, int #
type
+% 3, 0, 26, 0, 0, 0, 1, 1, 26, 26,
0, 1, 1, 1, 1, 1 # length
#select * from sys.querylog_catalog;
% .querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog # table_name
% id, owner, defined, query, pipe, plan, mal, optimize # name
@@ -73,6 +68,45 @@ Ready.
% id, start, stop, arguments, tuples, run, ship, cpu, io #
name
% oid, timestamp, timestamp, clob, wrd, bigint, bigint, int,
int # type
% 3, 26, 26, 0, 1, 1, 1, 1, 1 # length
+#select 1;
+% .L # table_name
+% single_value # name
+% tinyint # type
+% 1 # length
+[ 1 ]
+#select * from sys.querylog_catalog;
+% .querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog # table_name
+% id, owner, defined, query, pipe, plan, mal, optimize # name
+% oid, clob, timestamp, clob, clob, clob, int, bigint # type
+% 5, 7, 26, 9, 12, 9, 2, 3 # length
+[ 398@0, "monetdb", 2016-02-21 20:08:01.000000, "select 1;",
"default_pipe", "user.s5_1", 21, 161 ]
+#select * from sys.querylog_calls;
+% .querylog_calls, .querylog_calls, .querylog_calls,
.querylog_calls, .querylog_calls, .querylog_calls,
.querylog_calls, .querylog_calls, .querylog_calls # table_name
+% id, start, stop, arguments, tuples, run, ship, cpu, io #
name
+% oid, timestamp, timestamp, clob, wrd, bigint, bigint, int,
int # type
+% 5, 26, 26, 23, 1, 2, 1, 1, 1 # length
+[ 398@0, 2016-02-21 20:08:01.000000, 2016-02-21 20:08:01.000000,
"user.s5_1(A0:bte):void;", 1, 64, 0, 0, 0 ]
+#select * from sys.querylog_history;
+% .querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history # table_name
+% id, owner, defined, query, pipe, plan, mal, optimize,
start, stop, arguments, tuples, run, ship, cpu, io # name
+% oid, clob, timestamp, clob, clob, clob, int, bigint,
timestamp, timestamp, clob, wrd, bigint, bigint, int, int #
type
+% 5, 7, 26, 9, 12, 9, 2, 3, 26, 26,
23, 1, 2, 1, 1, 1 # length
+[ 398@0, "monetdb", 2016-02-21 20:08:01.000000, "select 1;",
"default_pipe", "user.s5_1", 21, 161, 2016-02-21 20:08:01.000000,
2016-02-21 20:08:01.000000, "user.s5_1(A0:bte):void;", 1, 64,
0, 0, 0 ]
+#select * from sys.querylog_history;
+% .querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history, .querylog_history, .querylog_history,
.querylog_history # table_name
+% id, owner, defined, query, pipe, plan, mal, optimize,
start, stop, arguments, tuples, run, ship, cpu, io # name
+% oid, clob, timestamp, clob, clob, clob, int, bigint,
timestamp, timestamp, clob, wrd, bigint, bigint, int, int #
type
+% 3, 0, 26, 0, 0, 0, 1, 1, 26, 26,
0, 1, 1, 1, 1, 1 # length
+#select * from sys.querylog_calls;
+% .querylog_calls, .querylog_calls, .querylog_calls,
.querylog_calls, .querylog_calls, .querylog_calls,
.querylog_calls, .querylog_calls, .querylog_calls # table_name
+% id, start, stop, arguments, tuples, run, ship, cpu, io #
name
+% oid, timestamp, timestamp, clob, wrd, bigint, bigint, int,
int # type
+% 3, 26, 26, 0, 1, 1, 1, 1, 1 # length
+#select * from sys.querylog_catalog;
+% .querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog, .querylog_catalog,
.querylog_catalog, .querylog_catalog # table_name
+% id, owner, defined, query, pipe, plan, mal, optimize # name
+% oid, clob, timestamp, clob, clob, clob, int, bigint # type
+% 3, 0, 26, 0, 0, 0, 1, 1 # length
# 21:52:29 >
# 21:52:29 > "Done."
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list