Changeset: de7be1b4fd9a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=de7be1b4fd9a
Added Files:
clients/python2/test/run.cmd
clients/python3/test/run.cmd
monetdb5/mal/Tests/tst275.mal
monetdb5/mal/Tests/tst275.stable.err
monetdb5/mal/Tests/tst275.stable.out
monetdb5/modules/mal/Tests/pqueue.mal
monetdb5/modules/mal/Tests/pqueue.stable.err
monetdb5/modules/mal/Tests/pqueue.stable.out
sql/test/BugTracker-2013/Tests/aggregates-typing-issues.Bug-3277.sql
sql/test/BugTracker-2013/Tests/aggregates-typing-issues.Bug-3277.stable.err
sql/test/BugTracker-2013/Tests/aggregates-typing-issues.Bug-3277.stable.out
sql/test/BugTracker-2013/Tests/copy-into-decimal.Bug-3265.sql
sql/test/BugTracker-2013/Tests/copy-into-decimal.Bug-3265.stable.err
sql/test/BugTracker-2013/Tests/copy-into-decimal.Bug-3265.stable.out
sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.py
sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.err
sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.out
sql/test/BugTracker-2013/Tests/empty-strings.Bug-3261.SQL.py
sql/test/BugTracker-2013/Tests/empty-strings.Bug-3261.stable.err
sql/test/BugTracker-2013/Tests/empty-strings.Bug-3261.stable.out
sql/test/BugTracker-2013/Tests/median-null.Bug-3280.sql
sql/test/BugTracker-2013/Tests/median-null.Bug-3280.stable.err
sql/test/BugTracker-2013/Tests/median-null.Bug-3280.stable.out
sql/test/BugTracker-2013/Tests/numeric-column-alias.Bug-3279.sql
sql/test/BugTracker-2013/Tests/numeric-column-alias.Bug-3279.stable.err
sql/test/BugTracker-2013/Tests/numeric-column-alias.Bug-3279.stable.out
sql/test/BugTracker-2013/Tests/numeric-column-orderby.Bug-3278.sql
sql/test/BugTracker-2013/Tests/numeric-column-orderby.Bug-3278.stable.err
sql/test/BugTracker-2013/Tests/numeric-column-orderby.Bug-3278.stable.out
sql/test/centipede/Tests/All
sql/test/centipede/Tests/olap.sql
Modified Files:
.hgtags
MonetDB.spec
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
NT/monetdb_config.h.in
NT/rules.msc
clients/Tests/exports.stable.out
clients/mapiclient/Tests/tomograph--help.stable.err
clients/mapiclient/tomograph.c
clients/mapilib/mapi.c
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
clients/php/doc/generate_doc.sh
clients/php/examples/query.php
clients/python2/monetdb/sql/pythonize.py
clients/python2/monetdb/sql/types.py
clients/python2/setup.py
clients/python2/test/capabilities.py
clients/python3/monetdb/sql/pythonize.py
clients/python3/monetdb/sql/types.py
clients/python3/setup.py
clients/python3/test/capabilities.py
clients/python3/test/run.sh
clients/ruby/lib/MonetDBExceptions.rb
common/stream/stream.c
common/stream/stream.h
configure.ag
debian/changelog
debian/rules
gdk/ChangeLog.Feb2013
gdk/gdk.h
gdk/gdk_atoms.c
gdk/gdk_bat.c
gdk/gdk_bbp.c
gdk/gdk_join.c
gdk/gdk_logger.c
gdk/gdk_posix.c
gdk/gdk_storage.c
gdk/gdk_utils.c
gdk/libbat.rc
geom/monetdb5/geom.c
libversions
monetdb5/mal/Tests/All
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_client.h
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_instruction.h
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_profiler.h
monetdb5/mal/mal_recycle.c
monetdb5/mal/mal_runtime.c
monetdb5/mal/mal_stack.h
monetdb5/modules/atoms/blob.c
monetdb5/modules/atoms/url.c
monetdb5/modules/kernel/aggr.c
monetdb5/modules/mal/Tests/All
monetdb5/modules/mal/batExtensions.c
monetdb5/modules/mal/pqueue.c
monetdb5/modules/mal/profiler.c
monetdb5/modules/mal/profiler.mal
monetdb5/modules/mal/recycle.c
monetdb5/modules/mal/remote.c
monetdb5/optimizer/Tests/cst01.mal
monetdb5/optimizer/Tests/cst01.stable.out
monetdb5/optimizer/opt_centipede.c
monetdb5/optimizer/opt_evaluate.c
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_pushselect.c
monetdb5/tools/libmonetdb5.rc
sql/ChangeLog-Archive
sql/ChangeLog.Feb2013
sql/backends/monet5/datacell/actuator.c
sql/backends/monet5/datacell/receptor.c
sql/backends/monet5/sql.mx
sql/backends/monet5/sql_gencode.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/vaults/mseed.c
sql/common/sql_types.c
sql/scripts/39_analytics.sql
sql/storage/bat/bat_storage.c
sql/storage/bat/bat_utils.c
sql/test/BugDay_2005-10-06_2.9.3/Tests/last_line_without_newline.SF-922390_s02.sql
sql/test/BugTracker-2009/Tests/union_leak.SF-2540169.3.sql
sql/test/BugTracker-2011/Tests/perl-table_info.Bug-2885.pl
sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.out
sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out
sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out
sql/test/BugTracker-2013/Tests/All
sql/test/BugTracker-2013/Tests/php-size-limit-bug.php
sql/test/BugTracker/Tests/explain.SF-1739353.stable.out
sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
sql/test/Tests/systemfunctions.stable.out
sql/test/Tests/systemfunctions_nogeom.stable.out
sql/test/bugs/union_all_where_1=1-bug-sf-936386.sql
sql/test/leaks/Tests/check0.stable.out
sql/test/leaks/Tests/check0_nogeom.stable.out
sql/test/leaks/Tests/check1.stable.out
sql/test/leaks/Tests/check1_nogeom.stable.out
sql/test/leaks/Tests/check2.stable.out
sql/test/leaks/Tests/check2_nogeom.stable.out
sql/test/leaks/Tests/check3.stable.out
sql/test/leaks/Tests/check3_nogeom.stable.out
sql/test/leaks/Tests/check4.stable.out
sql/test/leaks/Tests/check4_nogeom.stable.out
sql/test/leaks/Tests/check5.stable.out
sql/test/leaks/Tests/check5_nogeom.stable.out
sql/test/mapi/Tests/php_monetdb.stable.out
sql/test/mapi/Tests/php_monetdb_nogeom.stable.out
sql/test/mapi/Tests/python2_test_monetdb_sql.stable.err
sql/test/mapi/Tests/python3_test_monetdb_sql.stable.err
sql/test/mserver5-sql-readonly/Tests/mserver5-sql-readonly-table.stable.err
sql/test/pg_regress/sql/update.sql
sql/test/ssqq/Tests/All
sql/test/ssqq/Tests/insert_query.sql.src
sql/test/ssqq/Tests/insert_queue.sql.src
sql/test/ssqq/Tests/insert_quser.sql.src
sql/test/ssqq/Tests/ssqq.sql.src
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out
testing/Mtest.py.in
vertoo.data
Branch: sciql
Log Message:
Merge with tag before_new_JOIN_implementation (changeset 47636:334140294fb2) of
default branch.
diffs (truncated from 10474 to 300 lines):
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -521,3 +521,6 @@ 0ee398b5025f7bc3c0320d70eb5c0a3707b69c67
7daa66a6db1c0404dbf7ed935437b59b7bf54d4b Feb2013_5
df2cbb7845660d94dc484bab860b6893344be92a Feb2013_SP2_release
2438b3891aa44e356350434e41706c6bdaf70b4d SciQLdemo_latest_Crete
+cb55e859a50e0d06a50cc9e4f6e377ddea7cc3aa Feb2013_7
+df2cbb7845660d94dc484bab860b6893344be92a Feb2013_SP2_release
+e0139450d66e4fc02c7f5d1d9e6f92fc22d862df Feb2013_SP2_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -725,6 +725,13 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libmonet
rm -fr $RPM_BUILD_ROOT
%changelog
+* Fri Apr 26 2013 Sjoerd Mullender <[email protected]> - 11.15.7-20130426
+- Rebuilt.
+
+* Sat Apr 13 2013 Niels Nes <[email protected]> - 11.15.7-20130426
+- sql: Added TEMPORARY to the non-reserved keywords, ie no need for double
+ quotes when used as identifier.
+
* Fri Apr 12 2013 Sjoerd Mullender <[email protected]> - 11.15.5-20130412
- Rebuilt.
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
@@ -196,6 +196,7 @@ BAT *BATsort_rev(BAT *b);
BAT *BATssort(BAT *b);
BAT *BATssort_rev(BAT *b);
gdk_return BATsubjoin(BAT **r1p, BAT **r2p, BAT *l, BAT *r, BAT *sl, BAT *sr,
BUN estimate);
+gdk_return BATsubleftfetchjoin(BAT **r1p, BAT **r2p, BAT *l, BAT *r, BAT *sl,
BAT *sr, BUN estimate);
gdk_return BATsubleftjoin(BAT **r1p, BAT **r2p, BAT *l, BAT *r, BAT *sl, BAT
*sr, BUN estimate);
gdk_return BATsubouterjoin(BAT **r1p, BAT **r2p, BAT *l, BAT *r, BAT *sl, BAT
*sr, BUN estimate);
BAT *BATsubselect(BAT *b, BAT *s, const void *tl, const void *th, int li, int
hi, int anti);
@@ -2616,6 +2617,7 @@ str getName(str nme, size_t len);
int getPC(MalBlkPtr mb, InstrPtr p);
str getPipeCatalog(int *nme, int *def, int *stat);
str getPipeDefinition(str name);
+int getProfileCounter(int idx);
stream *getProfilerStream(void);
str getRef;
str getRefName(MalBlkPtr mb, int i);
@@ -2813,6 +2815,7 @@ str mergecandRef;
aggrFun minAggr;
str minRef;
str min_no_nilRef;
+str minusRef;
str mirrorRef;
str mitosisRef;
str mkeyRef;
@@ -3010,7 +3013,7 @@ void removeInstruction(MalBlkPtr mb, Ins
void removeInstructionBlock(MalBlkPtr mb, int pc, int cnt);
int removeProp;
void removeVariable(MalBlkPtr mb, int varid);
-void renameVariable(MalBlkPtr mb, int i, str name);
+void renameVariable(MalBlkPtr mb, int i, str pattern, int newid);
str replaceRef;
str replicatorRef;
void resetMalBlk(MalBlkPtr mb, int stop);
@@ -3104,7 +3107,6 @@ str sqlRef;
int sqlblob_fromstr(char *instr, int *l, blob **val);
int sqlblob_tostr(str *tostr, int *l, blob *p);
int sqlfunctionProp;
-str sqlplusRef;
str srvpoolRef;
int stableProp;
str startProfiling(void);
diff --git a/clients/mapiclient/Tests/tomograph--help.stable.err
b/clients/mapiclient/Tests/tomograph--help.stable.err
--- a/clients/mapiclient/Tests/tomograph--help.stable.err
+++ b/clients/mapiclient/Tests/tomograph--help.stable.err
@@ -20,6 +20,7 @@ tomograph [options]
-s | --sql=<single sql expression>
-t | --trace=<tomograph trace filename>
-r | --range=<starttime>-<endtime>[ms,s]
+ -i | --input=<profiler event file >
-o | --output=<file prefix > (default 'tomograph'
-b | --beat=<delay> in milliseconds (default 50)
-B | --batch=<number> of combined queries
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -139,6 +139,7 @@ static char hostname[128];
static char *filename = "tomograph";
static char *tracefile = 0;
static lng startrange = 0, endrange = 0;
+static char *inputfile = NULL;
static char *title = 0;
static int debug = 0;
static int colormap = 0;
@@ -164,6 +165,7 @@ usage(void)
fprintf(stderr, " -s | --sql=<single sql expression>\n");
fprintf(stderr, " -t | --trace=<tomograph trace filename>\n");
fprintf(stderr, " -r | --range=<starttime>-<endtime>[ms,s] \n");
+ fprintf(stderr, " -i | --input=<profiler event file > \n");
fprintf(stderr, " -o | --output=<file prefix > (default
'tomograph'\n");
fprintf(stderr, " -b | --beat=<delay> in milliseconds (default 50)\n");
fprintf(stderr, " -B | --batch=<number> of combined queries\n");
@@ -1563,7 +1565,12 @@ static void createTomogram(void)
* that the tomograph start can appear while the
* system is already processing. This leads to
* receiving 'done' events without matching 'start'
+ *
+ * A secondary issue is to properly count the functions
+ * being monitored.
*/
+char *currentfunction= 0;
+
static void update(int state, int thread, lng clkticks, lng ticks, lng memory,
lng footprint, lng reads, lng writes, char *fcn, char *stmt)
{
int idx;
@@ -1574,19 +1581,30 @@ static void update(int state, int thread
if (fcn && strncmp(fcn, "end ", 4) == 0)
return;
if (starttime == 0) {
- /* ignore all instructions up to the first function call */
- if (state >= PING || fcn == 0 || strncmp(fcn, "function", 8) !=
0)
+ /* ignore all instructions up to the first function call,
unless input comes from a file */
+ if ( inputfile == NULL && (state >= PING || fcn == 0 ||
strncmp(fcn, "function", 8) != 0))
return;
assert(clkticks >= 0);
starttime = clkticks;
+ }
+
+ /* monitor top level function brackets */
+ if (state == START && fcn && strncmp(fcn, "function", 8) == 0 ){
+ if ( currentfunction == 0) {
+ currentfunction = strdup(fcn+9);
+ if (debug)
+ fprintf(stderr, "Enter function %s batch %d\n",
currentfunction, batch);
+ }
return;
}
-
- if (state == DONE && fcn && (strncmp(fcn, "function", 8) == 0 ||
strncmp(fcn, "profiler.tomograph", 18) == 0)) {
- if (debug)
- fprintf(stderr, "Batch %d\n", batch);
- if (strncmp(fcn, "function", 8) == 0 && batch-- > 1)
- return;
+ if (state == DONE && fcn && strncmp(fcn, "function", 8) == 0 ){
+ if ( currentfunction && strcmp(currentfunction, fcn+9) == 0){
+ if (debug)
+ fprintf(stderr, "Leave function %s batch %d\n",
currentfunction, batch);
+ free(currentfunction);
+ currentfunction = 0;
+ } else return;
+ if ( batch -- > 1) return;
deactivateBeat();
createTomogram();
totalclkticks = 0; /* number of clock ticks reported */
@@ -1596,6 +1614,16 @@ static void update(int state, int thread
return;
}
+ if (state == DONE && strncmp(fcn, "profiler.tomograph", 18) == 0) {
+ if (debug)
+ fprintf(stderr, "Profiler.tomograph ends %d\n", batch);
+ deactivateBeat();
+ createTomogram();
+ totalclkticks = 0; /* number of clock ticks reported */
+ totalexecticks = 0; /* number of ticks reported for processing
*/
+ return;
+ }
+
assert(clkticks >= 0);
clkticks -= starttime;
if (clkticks < 0) {
@@ -1721,6 +1749,8 @@ static int parser(char *row)
} else {
state = 0;
c = strchr(c + 1, (int) '"');
+ if ( c == 0)
+ return -2;
}
c = strchr(c + 1, (int) '"');
@@ -1815,6 +1845,43 @@ wrapup:
return 0;
}
+static void processFile(char *fname)
+{
+ size_t len;
+ ssize_t n;
+ int i;
+ char buf[BUFSIZ + 1];
+ char *e, *response;
+ stream *s;
+
+ s = open_rstream(fname);
+ if ( s == NULL || mnstr_errnr(s)){
+ fprintf(stderr,"ERROR Can not access '%s'\n",fname);
+ return;
+ }
+ len = 0;
+ while (s && (n = mnstr_read(s, buf, 1, BUFSIZ - len)) > 0) {
+ buf[n] = 0;
+ response = buf;
+ while ((e = strchr(response, '\n')) != NULL) {
+ *e = 0;
+ i = parser(response);
+ if (debug )
+ fprintf(stderr, "ERROR %d:%s\n", i, response);
+ response = e + 1;
+ }
+ /* handle last line in buffer */
+ if (*response) {
+ if (debug)
+ printf("LASTLINE:%s", response);
+ len = strlen(response);
+ strncpy(buf, response, len + 1);
+ } else
+ len = 0;
+ }
+ mnstr_close(s);
+}
+
static void
format_result(Mapi mid, MapiHdl hdl)
{
@@ -2062,7 +2129,7 @@ main(int argc, char **argv)
{
int a = 1;
int k = 0;
- char *host = NULL;
+ char *host = "localhost";
int portnr = 0;
char *dbname = NULL;
char *uri = NULL;
@@ -2073,13 +2140,14 @@ main(int argc, char **argv)
wthread *walk;
- static struct option long_options[16] = {
+ static struct option long_options[17] = {
{ "dbname", 1, 0, 'd' },
{ "user", 1, 0, 'u' },
{ "port", 1, 0, 'p' },
{ "host", 1, 0, 'h' },
{ "help", 0, 0, '?' },
{ "title", 1, 0, 'T' },
+ { "input", 1, 0, 'i' },
{ "trace", 1, 0, 't' },
{ "range", 1, 0, 'r' },
{ "output", 1, 0, 'o' },
@@ -2098,7 +2166,7 @@ main(int argc, char **argv)
while (1) {
int option_index = 0;
- int c = getopt_long(argc, argv, "d:u:p:h:?T:t:r:o:Db:B:s:m:a",
+ int c = getopt_long(argc, argv, "d:u:p:h:?T:i:t:r:o:Db:B:s:m:a",
long_options, &option_index);
if (c == -1)
break;
@@ -2118,6 +2186,9 @@ main(int argc, char **argv)
case 'd':
dbname = optarg;
break;
+ case 'i':
+ inputfile = optarg;
+ break;
case 'u':
if (user)
free(user);
@@ -2224,6 +2295,11 @@ main(int argc, char **argv)
} else
k = setCounter(COUNTERSDEFAULT);
+ if (inputfile){
+ processFile(inputfile);
+ createTomogram();
+ exit(0);
+ }
if (tracefile) {
/* reload existing tomogram */
scandata(tracefile);
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -1036,8 +1036,8 @@ static int mapi_initialized = 0;
do { \
if ((s) == NULL || mnstr_errnr(s)) { \
mapi_log_record(mid,msg); \
- mapi_log_record(mid,f); \
- close_connection(mid); \
+ mapi_log_record(mid,f); \
+ close_connection(mid); \
mapi_setError((mid), (msg), (f), MTIMEOUT); \
return (e); \
} \
@@ -3290,12 +3290,12 @@ read_line(Mapi mid)
if (mid->trace == MAPI_TRACE)
printf("fetch next block: start at:%d\n", mid->blk.end);
len = mnstr_read(mid->from, mid->blk.buf + mid->blk.end, 1,
BLOCK);
+ check_stream(mid, mid->from, "Connection terminated",
"read_line", (mid->blk.eos = 1, (char *) 0));
if (mid->tracelog) {
mapi_log_header(mid, "R");
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list