Changeset: 7e2e2bcb9f88 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e2e2bcb9f88 Added Files: clients/mapiclient/dotfile.py sql/test/BugTracker-2016/Tests/crash.Bug-6081.sql sql/test/BugTracker-2016/Tests/crash.Bug-6081.stable.err sql/test/BugTracker-2016/Tests/crash.Bug-6081.stable.out Modified Files: clients/ChangeLog clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/SQL-dump.stable.out clients/Tests/SQL-dump.stable.out.int128 clients/Tests/exports.stable.out monetdb5/ChangeLog monetdb5/ChangeLog.Dec2016 monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out monetdb5/mal/mal_instruction.c monetdb5/mal/mal_instruction.h monetdb5/mal/mal_listing.c monetdb5/mal/mal_profiler.c monetdb5/mal/mal_profiler.h monetdb5/mal/mal_runtime.c monetdb5/mal/mal_type.c monetdb5/mal/mal_type.h monetdb5/modules/mal/Tests/inspect00.stable.out monetdb5/modules/mal/profiler.c monetdb5/modules/mal/profiler.h monetdb5/modules/mal/profiler.mal monetdb5/optimizer/opt_support.c sql/ChangeLog sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_gencode.h sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_upgrades.c sql/common/sql_mem.c sql/scripts/46_profiler.sql sql/server/rel_optimizer.c sql/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.stable.out sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.stable.out sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.stable.out sql/test/BugTracker-2010/Tests/group-by_ordered_column.Bug-2564.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 sql/test/BugTracker-2011/Tests/func_iter_vs_bulk.Bug-2826.stable.out sql/test/BugTracker-2012/Tests/aggregate_incorrect_precision_scale.Bug-3182.stable.out sql/test/BugTracker-2012/Tests/aggregate_incorrect_precision_scale.Bug-3182.stable.out.int128 sql/test/BugTracker-2012/Tests/aggregate_vs_positional_column_crash.Bug-3085.stable.out sql/test/BugTracker-2012/Tests/algebra_find.Bug-2728.stable.out sql/test/BugTracker-2012/Tests/any_null.Bug-2594.stable.out sql/test/BugTracker-2012/Tests/boolean_coersion.Bug-3012.stable.out sql/test/BugTracker-2012/Tests/case_evaluated_too_early.Bug-3186.stable.out sql/test/BugTracker-2012/Tests/cast-tinyint-Bug-3137.stable.out sql/test/BugTracker-2012/Tests/cast_varchar_to_double.Bug-3071.stable.out sql/test/BugTracker-2012/Tests/correlated_groupby_in_selection.Bug-3011.stable.out sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out sql/test/BugTracker-2012/Tests/date_script_test.Bug-2973.stable.out sql/test/BugTracker-2012/Tests/day-of-month-localization.Bug-2962.stable.out sql/test/BugTracker-2012/Tests/fixed_limit_for_prepare.Bug-3208.stable.out sql/test/BugTracker-2012/Tests/float-mod.Bug-3086.stable.out sql/test/BugTracker-2012/Tests/incorrect_cast_from_double_to_int.Bug-2579.stable.out sql/test/BugTracker-2012/Tests/large-number-operation-strange-results.Bug-2929.stable.out.int128 sql/test/BugTracker-2012/Tests/many-columns-truncated.Bug-3161.stable.out sql/test/BugTracker-2012/Tests/not-equal-Bug.3139.stable.out sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.stable.out sql/test/BugTracker-2012/Tests/null_except_null.Bug-3040.stable.out sql/test/BugTracker-2012/Tests/order_by_on_column_exp.Bug-3193.stable.out sql/test/BugTracker-2012/Tests/power_priority.Bug-2291.stable.out sql/test/BugTracker-2012/Tests/power_priority.Bug-2291.stable.out.int128 sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out sql/test/BugTracker-2012/Tests/round-type-inference.Bug-2987.stable.out sql/test/BugTracker-2012/Tests/row_number_does_not_work_in_complex_query.Bug-2805.stable.out sql/test/BugTracker-2012/Tests/scalar_subquery_with_alias.Bug-3093.stable.out sql/test/BugTracker-2012/Tests/server-crash.Bug-3046.stable.out sql/test/BugTracker-2012/Tests/set_operation.Bug-3059.stable.out sql/test/BugTracker-2012/Tests/simple_select.Bug-2988.stable.out sql/test/BugTracker-2012/Tests/sticky-precision.Bug-2969.stable.out sql/test/BugTracker-2012/Tests/timestamp-diff.Bug-3190.stable.out sql/test/BugTracker-2012/Tests/tuples_INTERSECT_vs_count_intersect_differs.Bug-2659.stable.out sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out sql/test/BugTracker-2012/Tests/user_defined_decimal_function.Bug-2992.stable.out sql/test/BugTracker-2012/Tests/with_and_exists.Bug-3099.stable.out sql/test/BugTracker-2012/Tests/with_in_derived_table.Bug-3043.stable.out sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out.int128 sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single sql/test/BugTracker-2014/Tests/queueError.Bug-3604.stable.out sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.stable.out sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out sql/test/BugTracker-2016/Tests/All sql/test/BugTracker-2016/Tests/CREATE_INDEX_breaks_table_queries.Bug-4053.stable.out sql/test/BugTracker-2016/Tests/DISTINCT_with_correlated_scalar_subquery_crashes_mserver.Bug-3920.stable.out sql/test/BugTracker-2016/Tests/assert-on-project.Bug-6078.stable.out sql/test/BugTracker-2016/Tests/assert-on-push-project-up.Bug-6077.stable.out sql/test/BugTracker-2016/Tests/assert-on-table-producing-function.Bug-6076.stable.out sql/test/BugTracker-2016/Tests/case-with-string-Bug.3932.stable.out sql/test/BugTracker-2016/Tests/cast_and_floor.Bug-6071.stable.out sql/test/BugTracker-2016/Tests/catalog_name_qualifier.Bug-3948.stable.out sql/test/BugTracker-2016/Tests/column_alias_in_where_clause.Bug-3947.stable.out sql/test/BugTracker-2016/Tests/column_alias_in_where_clause.Bug-3947.stable.out.int128 sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.stable.out sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.out sql/test/BugTracker-2016/Tests/date_calculation_and_comparison_wrong_results.Bug-3940.stable.out sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out sql/test/BugTracker-2016/Tests/epoch.Bug-3979.stable.out sql/test/BugTracker-2016/Tests/fk-smaller-pk.Bug-3983.stable.out sql/test/BugTracker-2016/Tests/group_distinct_quantile.Bug-3927.stable.out sql/test/BugTracker-2016/Tests/ifthenelse-void.Bug-6075.stable.out sql/test/BugTracker-2016/Tests/isaUUID_function.Bug-3997.stable.out sql/test/BugTracker-2016/Tests/like_in_non_sys_schema.Bug-4062.stable.out sql/test/BugTracker-2016/Tests/min-max-uuid-column-wrong-results.Bug-3953.stable.out sql/test/BugTracker-2016/Tests/name_conflict_in_union.Bug-6065.stable.out sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.stable.out sql/test/BugTracker-2016/Tests/null_in_null.Bug-3900.stable.out sql/test/BugTracker-2016/Tests/outer_constant_predicate.Bug-4070.stable.out sql/test/BugTracker-2016/Tests/storagemodel.stable.out sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit sql/test/BugTracker-2016/Tests/storagemodel.stable.out.int128 sql/test/BugTracker-2016/Tests/string-length.Bug-3999.stable.out sql/test/BugTracker-2016/Tests/subcorr-missing.Bug-3978.stable.out sql/test/BugTracker-2016/Tests/union.Bug-6069.stable.out sql/test/BugTracker-2016/Tests/wrong-nonil-property-with-copy-binary-into.Bug-3937.stable.out sql/test/BugTracker/Tests/bug_in_selection.SF-1892413.stable.err sql/test/BugTracker/Tests/explain.SF-1739353.stable.out sql/test/BugTracker/Tests/groupby_orderby_nonselected.SF-1723863.stable.err sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/BugTracker/Tests/subquery_orderby.SF-1688915.stable.err sql/test/Tests/systemfunctions.stable.out sql/test/Tests/systemfunctions.stable.out.int128 sql/test/emptydb/Tests/check.stable.out sql/test/emptydb/Tests/check.stable.out.32bit sql/test/emptydb/Tests/check.stable.out.int128 sql/test/leaks/Tests/check1.stable.out.int128 sql/test/leaks/Tests/check2.stable.out.int128 sql/test/leaks/Tests/check3.stable.out.int128 sql/test/leaks/Tests/check4.stable.out.int128 sql/test/leaks/Tests/check5.stable.out.int128 sql/test/mapi/Tests/sql_int128.stable.out sql/test/mergetables/Tests/mergequery.stable.out sql/test/remote/Tests/partition_elim.stable.out sql/test/remote/Tests/ssbm.stable.out sql/test/remote/Tests/ssbm.stable.out.int128 Branch: malupgrade Log Message:
Merge with default branch. diffs (truncated from 8591 to 300 lines): diff --git a/clients/ChangeLog b/clients/ChangeLog --- a/clients/ChangeLog +++ b/clients/ChangeLog @@ -2,5 +2,5 @@ # This file is updated with Maddlog * Sun Oct 30 2016 Martin Kersten <m...@cwi.nl> -- Added an more elaborate \help command for SQL expressions. +- Added a more elaborate \help command for SQL expressions. diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -8211,9 +8211,11 @@ Ready. [ "profiler", "getSystemTime", "command profiler.getSystemTime():lng ", "CMDgetSystemTime;", "Obtain the user timing information." ] [ "profiler", "getTrace", "command profiler.getTrace(e:str):bat[:any_1] ", "CMDgetTrace;", "Get the trace details of a specific event" ] [ "profiler", "getUserTime", "command profiler.getUserTime():lng ", "CMDgetUserTime;", "Obtain the user timing information." ] +[ "profiler", "getlimit", "command profiler.getlimit():int ", "CMDgetprofilerlimit;", "Avoid floading of events" ] [ "profiler", "noop", "command profiler.noop():void ", "CMDnoopProfiler;", "Fetch any pending performance events" ] [ "profiler", "openstream", "pattern profiler.openstream(mode:int):void ", "CMDopenProfilerStream;", "Start profiling the events, sent to output stream" ] [ "profiler", "setheartbeat", "command profiler.setheartbeat(b:int):void ", "CMDsetHeartbeat;", "Set heart beat performance tracing" ] +[ "profiler", "setlimit", "command profiler.setlimit(i:int):void ", "CMDsetprofilerlimit;", "Change the profiler event limit counter" ] [ "profiler", "start", "pattern profiler.start():void ", "CMDstartProfiler;", "Start offline performance profiling" ] [ "profiler", "starttrace", "command profiler.starttrace():void ", "CMDstartTrace;", "Start collecting trace information" ] [ "profiler", "starttrace", "command profiler.starttrace(path:str):void ", "CMDstartTracePath;", "Start collecting trace information and keep around in 'path' directory" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -10573,9 +10573,11 @@ Ready. [ "profiler", "getSystemTime", "command profiler.getSystemTime():lng ", "CMDgetSystemTime;", "Obtain the user timing information." ] [ "profiler", "getTrace", "command profiler.getTrace(e:str):bat[:any_1] ", "CMDgetTrace;", "Get the trace details of a specific event" ] [ "profiler", "getUserTime", "command profiler.getUserTime():lng ", "CMDgetUserTime;", "Obtain the user timing information." ] +[ "profiler", "getlimit", "command profiler.getlimit():int ", "CMDgetprofilerlimit;", "Avoid floading of events" ] [ "profiler", "noop", "command profiler.noop():void ", "CMDnoopProfiler;", "Fetch any pending performance events" ] [ "profiler", "openstream", "pattern profiler.openstream(mode:int):void ", "CMDopenProfilerStream;", "Start profiling the events, sent to output stream" ] [ "profiler", "setheartbeat", "command profiler.setheartbeat(b:int):void ", "CMDsetHeartbeat;", "Set heart beat performance tracing" ] +[ "profiler", "setlimit", "command profiler.setlimit(i:int):void ", "CMDsetprofilerlimit;", "Change the profiler event limit counter" ] [ "profiler", "start", "pattern profiler.start():void ", "CMDstartProfiler;", "Start offline performance profiling" ] [ "profiler", "starttrace", "command profiler.starttrace():void ", "CMDstartTrace;", "Start collecting trace information" ] [ "profiler", "starttrace", "command profiler.starttrace(path:str):void ", "CMDstartTracePath;", "Start collecting trace information and keep around in 'path' directory" ] diff --git a/clients/Tests/SQL-dump.stable.out b/clients/Tests/SQL-dump.stable.out --- a/clients/Tests/SQL-dump.stable.out +++ b/clients/Tests/SQL-dump.stable.out @@ -1774,7 +1774,9 @@ drop function pcre_replace(string, strin [ "json", "tojsonarray", "create aggregate json.tojsonarray(x double) returns string external name aggr.jsonaggr;", "aggr", 1, 3, false, false, false ] [ "json", "tojsonarray", "create aggregate json.tojsonarray(x string) returns string external name aggr.jsonaggr;", "aggr", 1, 3, false, false, false ] [ "json", "valuearray", "create function json.valuearray(js json) returns json external name json.valuearray;", "json", 1, 1, false, false, false ] +[ "profiler", "getlimit", "create function profiler.getlimit() returns integer external name profiler.getlimit;", "profiler", 1, 1, false, false, false ] [ "profiler", "setheartbeat", "create procedure profiler.setheartbeat(beat int) external name profiler.setheartbeat;", "profiler", 1, 2, true, false, false ] +[ "profiler", "setlimit", "create procedure profiler.setlimit(lim integer) external name profiler.setlimit;", "profiler", 1, 2, true, false, false ] [ "profiler", "setpoolsize", "create procedure profiler.setpoolsize(poolsize int) external name profiler.setpoolsize;", "profiler", 1, 2, true, false, false ] [ "profiler", "setstream", "create procedure profiler.setstream(host string, port int) external name profiler.setstream;", "profiler", 1, 2, true, false, false ] [ "profiler", "start", "create procedure profiler.start() external name profiler.\"start\";", "profiler", 1, 2, true, false, false ] @@ -3321,7 +3323,9 @@ drop function pcre_replace(string, strin [ "json", "tojsonarray", "x", "clob", 0, 0, 1, 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 ] [ "json", "tojsonarray", "x", "double", 53, 0, 1, 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 ] [ "json", "valuearray", "js", "json", 0, 0, 1, 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 ] +[ "profiler", "getlimit", 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 ] [ "profiler", "setheartbeat", 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 ] +[ "profiler", "setlimit", 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 ] [ "profiler", "setpoolsize", 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 ] [ "profiler", "setstream", "port", "int", 32, 0, 1, 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 ] [ "profiler", "start", 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 ] @@ -5883,6 +5887,7 @@ drop function pcre_replace(string, strin [ "getextension" ] [ "getfile" ] [ "gethost" ] +[ "getlimit" ] [ "getport" ] [ "getproj4" ] [ "getprotocol" ] @@ -6710,6 +6715,7 @@ drop function pcre_replace(string, strin [ "seq_length" ] [ "sessions" ] [ "setheartbeat" ] +[ "setlimit" ] [ "setmasklen" ] [ "setpoolsize" ] [ "setsession" ] diff --git a/clients/Tests/SQL-dump.stable.out.int128 b/clients/Tests/SQL-dump.stable.out.int128 --- a/clients/Tests/SQL-dump.stable.out.int128 +++ b/clients/Tests/SQL-dump.stable.out.int128 @@ -1781,7 +1781,9 @@ drop function pcre_replace(string, strin [ "json", "tojsonarray", "create aggregate json.tojsonarray(x double) returns string external name aggr.jsonaggr;", "aggr", 1, 3, false, false, false ] [ "json", "tojsonarray", "create aggregate json.tojsonarray(x string) returns string external name aggr.jsonaggr;", "aggr", 1, 3, false, false, false ] [ "json", "valuearray", "create function json.valuearray(js json) returns json external name json.valuearray;", "json", 1, 1, false, false, false ] +[ "profiler", "getlimit", "create function profiler.getlimit() returns integer external name profiler.getlimit;", "profiler", 1, 1, false, false, false ] [ "profiler", "setheartbeat", "create procedure profiler.setheartbeat(beat int) external name profiler.setheartbeat;", "profiler", 1, 2, true, false, false ] +[ "profiler", "setlimit", "create procedure profiler.setlimit(lim integer) external name profiler.setlimit;", "profiler", 1, 2, true, false, false ] [ "profiler", "setpoolsize", "create procedure profiler.setpoolsize(poolsize int) external name profiler.setpoolsize;", "profiler", 1, 2, true, false, false ] [ "profiler", "setstream", "create procedure profiler.setstream(host string, port int) external name profiler.setstream;", "profiler", 1, 2, true, false, false ] [ "profiler", "start", "create procedure profiler.start() external name profiler.\"start\";", "profiler", 1, 2, true, false, false ] @@ -3509,7 +3511,9 @@ drop function pcre_replace(string, strin [ "json", "tojsonarray", "x", "clob", 0, 0, 1, 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 ] [ "json", "tojsonarray", "x", "double", 53, 0, 1, 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 ] [ "json", "valuearray", "js", "json", 0, 0, 1, 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 ] +[ "profiler", "getlimit", 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 ] [ "profiler", "setheartbeat", 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 ] +[ "profiler", "setlimit", 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 ] [ "profiler", "setpoolsize", 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 ] [ "profiler", "setstream", "port", "int", 32, 0, 1, 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 ] [ "profiler", "start", 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 ] @@ -6276,6 +6280,7 @@ drop function pcre_replace(string, strin [ "getextension" ] [ "getfile" ] [ "gethost" ] +[ "getlimit" ] [ "getport" ] [ "getproj4" ] [ "getprotocol" ] @@ -7210,6 +7215,7 @@ drop function pcre_replace(string, strin [ "seq_length" ] [ "sessions" ] [ "setheartbeat" ] +[ "setlimit" ] [ "setmasklen" ] [ "setpoolsize" ] [ "setsession" ] diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -1027,6 +1027,7 @@ str CMDgetPageSize(int *ret); str CMDgetSystemTime(lng *ret); str CMDgetTrace(bat *res, str *ev); str CMDgetUserTime(lng *ret); +str CMDgetprofilerlimit(int *res); str CMDifthen(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); str CMDmodules(bat *bid); str CMDnoopProfiler(void *res); @@ -1082,6 +1083,7 @@ str CMDscience_cst_bat_pow_flt(bat *ret, str CMDsetHeartbeat(void *res, int *ev); str CMDsetName(str *rname, const bat *b, str *name); str CMDsetoid(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); +str CMDsetprofilerlimit(void *res, int *lim); str CMDstartProfiler(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); str CMDstartTrace(void *res); str CMDstartTracePath(void *res, str *path); @@ -2061,7 +2063,7 @@ str generatorRef; MALfcn getAddress(stream *out, str filename, str fcnname, int silent); str getArgDefault(MalBlkPtr mb, InstrPtr p, int idx); ptr getArgReference(MalStkPtr stk, InstrPtr pci, int k); -int getAtomIndex(str nme, int len, int deftpe); +int getAtomIndex(const char *nme, int len, int deftpe); lng getBatSpace(BAT *b); int getBitConstant(MalBlkPtr mb, bit val); int getBlockBegin(MalBlkPtr mb, int pc); @@ -2102,6 +2104,7 @@ str getTypeIdentifier(malType tpe); str getTypeName(malType tpe); lng getUserTime(void); lng getVolume(MalStkPtr stk, InstrPtr pci, int rd); +int getprofilerlimit(void); str grabRef; str groupRef; str groupbyRef; @@ -2338,7 +2341,7 @@ str projectionRef; str projectionpathRef; void promptInstruction(stream *fd, MalBlkPtr mb, MalStkPtr stk, InstrPtr p, int flg); InstrPtr pushArgument(MalBlkPtr mb, InstrPtr p, int varid); -InstrPtr pushArgumentId(MalBlkPtr mb, InstrPtr p, str name); +InstrPtr pushArgumentId(MalBlkPtr mb, InstrPtr p, const char *name); InstrPtr pushBit(MalBlkPtr mb, InstrPtr q, bit val); InstrPtr pushBte(MalBlkPtr mb, InstrPtr q, bte val); InstrPtr pushDbl(MalBlkPtr mb, InstrPtr q, dbl val); @@ -2419,6 +2422,7 @@ void setVarName(MalBlkPtr mb, int i, str str setVariableRef; void setVariableScope(MalBlkPtr mb); str setWriteModeRef; +void setprofilerlimit(int limit); str setprofilerpoolsize(int size); str shortStmtRendering(MalBlkPtr mb, MalStkPtr stl, InstrPtr p); void showAllScenarios(stream *f); diff --git a/clients/mapiclient/dotfile.py b/clients/mapiclient/dotfile.py new file mode 100644 --- /dev/null +++ b/clients/mapiclient/dotfile.py @@ -0,0 +1,79 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. + +''' +The output of the Stethoscope can be saved in JSON format using the -j flag. +This program converts such a Stethoscope output file into a .dot file +Finalize the dot picture using: +dot <basename.dot> -Tpdf -o <basename.pdf> +''' +import os +import argparse +import json + +parser = argparse.ArgumentParser(description="Generate a .dot file from a Stethoscope MAL trace") +parser.add_argument('--statement', action='store_true', default= False, help="show the complete MAL instruction") +parser.add_argument('--usec', action='store_true', default= False, help="show the execution time in microseconds") +parser.add_argument('--time', action='store_true', default= False, help="show the execution start time") +parser.add_argument('--pc', action='store_true', default= True, help="show the program counter") +parser.add_argument('inputfiles', type = str, nargs= '*') + +args = parser.parse_args() + +def showFlowNode(event): + dotfile.write('n'+ str(event['pc']) ) + dotfile.write('[fontsize=8,') + if args.statement : + stmt = event['short'].replace('\\\\','').replace('\\"','"').replace('\"','"').replace('"','\\"') + shape ='shape=box,' + lab =stmt + if args.pc: + shape = 'shape=circle,' + lab= str(event['pc']) + if args.usec: + shape = 'shape=circle,' + lab= str(event['usec']) + if args.time: + shape = 'shape=box,' + lab= str(event['ctime']) + dotfile.write(shape + 'label="'+ lab + '"]\n'); + +def showFlowInput(event): + for pc in event['prereq']: + dotfile.write('n' + str(pc) +' -> n'+ str(event['pc']) + '\n') + +# Get the input file, which should be a JSON array object +for name in args.inputfiles: + try: + print('Process file:'+name) + f = open(name,'r') + except IOerror as e: + print('Can not access input file') + exit + + (basename,ext) = os.path.splitext(name) + print(basename,ext) + try: + dotfile = open(basename +'.dot','w') + except IOerror as e: + print('Can not create .dot file') + exit + + src = f.read() + events= json.loads(src) + + # initialize the dot file + dotfile.write('digraph '+ basename + '{\n') + for e in events: + if e['state'] == 'done': + showFlowNode(e) + for e in events: + if e['state'] == 'done': + showFlowInput(e) + dotfile.write('}\n') + + print("Finalize the dot picture using:\ndot " + basename + ".dot -Tpdf -o "+basename+ ".pdf") + diff --git a/monetdb5/ChangeLog b/monetdb5/ChangeLog --- a/monetdb5/ChangeLog +++ b/monetdb5/ChangeLog @@ -1,3 +1,7 @@ # ChangeLog file for MonetDB5 # This file is updated with Maddlog +* Tue Nov 8 2016 Martin Kersten <m...@cwi.nl> +- The allocation schemes for MAL blocks and Variables has been turned + into block-based. This reduces the number of malloc()/free() calls. + diff --git a/monetdb5/ChangeLog.Dec2016 b/monetdb5/ChangeLog.Dec2016 --- a/monetdb5/ChangeLog.Dec2016 +++ b/monetdb5/ChangeLog.Dec2016 @@ -22,7 +22,7 @@ where "wrd" was used. * Wed Apr 6 2016 Martin Kersten <m...@cwi.nl> -- Keep a collection of full traces Each time the SQL user applies +- Keep a collection of full traces. Each time the SQL user applies the TRACE option, the full json trace is retained within the <dbpath>/<dbname>/sql_traces diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out --- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out +++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out @@ -63,14 +63,14 @@ Ready. % clob # type % 126 # length function user.s8_1():void; - X_38:void := querylog.define("explain copy into ttt from \\'/tmp/xyz\\';","default_pipe",10); - X_0 := sql.mvc(); - (X_21:bat[:int],X_22:bat[:int],X_23:bat[:int]) := sql.copy_from(nil,"|","\\n",nil:str,"null","/tmp/xyz",-1,0,0,0,nil:str); - X_25 := sql.append(X_0,"sys","ttt","a",X_21); - X_30 := sql.append(X_25,"sys","ttt","b",X_22); - X_33 := sql.append(X_30,"sys","ttt","c",X_23); - X_35 := aggr.count(X_23); - sql.affectedRows(X_33,X_35); + X_41:void := querylog.define("explain copy into ttt from \\'/tmp/xyz\\';","default_pipe",11); + X_3 := sql.mvc(); + (X_24:bat[:int],X_25:bat[:int],X_26:bat[:int]) := sql.copy_from(nil,"|","\\n",nil:str,"null","/tmp/xyz",-1,0,0,0,nil:str); + X_28 := sql.append(X_3,"sys","ttt","a",X_24); + X_33 := sql.append(X_28,"sys","ttt","b",X_25); + X_36 := sql.append(X_33,"sys","ttt","c",X_26); + X_38 := aggr.count(X_26); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list