Changeset: 461699c362de for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=461699c362de
Modified Files:
configure.ag
monetdb5/mal/mal_interpreter.mx
sql/jdbc/tests/Tests/Test_PSlargeamount.SQL.bat
sql/jdbc/tests/Tests/Test_PSlargeamount.SQL.sh
sql/jdbc/tests/Tests/Test_PSlargeamount.stable.err
sql/jdbc/tests/Tests/Test_PSlargeamount.stable.out
sql/jdbc/tests/Tests/Test_PSlargeamount.timeout
sql/server/rel_subquery.c
sql/server/rel_subquery.h
sql/server/sql_psm.c
sql/server/sql_psm.h
sql/server/sql_schema.c
sql/server/sql_schema.h
sql/test/BugTracker-2010/Tests/error-truncated.Bug-2615.stable.err.Solaris.src
Branch: jacqueline
Log Message:
Merged from default
diffs (truncated from 14985 to 300 lines):
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -703,9 +703,6 @@
/* Define if you don't want to expand the bte type */
/* #undef NOEXPAND_BTE */
-/* Define if you don't want to expand the chr type */
-/* #undef NOEXPAND_CHR */
-
/* Define if you don't want to expand the dbl type */
/* #undef NOEXPAND_DBL */
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
@@ -5301,6 +5301,7 @@ str ZORDsql_slice_int(int *r, int *xb, i
str ZORDsql_slice_int(int *r, int *xb, int *yb, int *xt, int *yt){ int
slice_ret;
void _initTrace(void);
str activateCounter(str name);
+str addOptimizerPipe(Client cntxt, MalBlkPtr mb, str name);
str addPipeDefinition(str name, str pipe);
str addRegWrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pc);
DCYcatalog *addRegist(str sch, str tab, str col, int acc, int part, int f_bun,
int l_bun);
@@ -5386,17 +5387,17 @@ int canBeJoinselectProp;
str catalogRef;
str catchKernelException(Client cntxt, str ret);
str centipedeRef;
-void chkDeclarations(MalBlkPtr mb);
-void chkFlow(MalBlkPtr mb);
-void chkInstruction(Module s, MalBlkPtr mb, InstrPtr p);
-void chkProgram(Module s, MalBlkPtr mb);
-void chkTypes(Module s, MalBlkPtr mb, int silent);
+void chkDeclarations(stream *out, MalBlkPtr mb);
+void chkFlow(stream *out, MalBlkPtr mb);
+void chkInstruction(stream *out, Module s, MalBlkPtr mb, InstrPtr p);
+void chkProgram(stream *out, Module s, MalBlkPtr mb);
+void chkTypes(stream *out, Module s, MalBlkPtr mb, int silent);
str cleanupProfiler(void);
void clearStack(MalStkPtr s);
void clearTrace(void);
void clearVariable(MalBlkPtr mb, int varid);
str clear_tableRef;
-Symbol cloneFunction(Module scope, Symbol proc, MalBlkPtr mb, InstrPtr p);
+Symbol cloneFunction(stream *out, Module scope, Symbol proc, MalBlkPtr mb,
InstrPtr p);
int cloneVariable(MalBlkPtr dst, MalBlkPtr src, int varid);
int closeBox(str name, int flag);
str closeProfilerStream(void);
@@ -5482,7 +5483,6 @@ void dumpManualOverview(stream *f, Modul
void dumpManualSection(stream *f, Module v);
void dumpNamespaceStatistics(stream *f, int details);
void dumpSearchTable(stream *f, str text);
-InstrPtr dynamicTypeChecker(Module scope, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p);
void echoInput(Client cntxt);
str escape_str(str *retval, str s);
str evalFile(Client c, str fname, int listing);
@@ -5495,7 +5495,7 @@ void expandMalBlk(MalBlkPtr mb, int line
str expandRef;
str exportOperationRef;
int factoryHasFreeSpace(void);
-int fcnBinder(Module scope, MalBlkPtr mb, InstrPtr p);
+int fcnBinder(stream *out, Module scope, MalBlkPtr mb, InstrPtr p);
str fcnDefinition(MalBlkPtr mb, InstrPtr p, str s, int flg, str base, size_t
len);
int fileProp;
Box findBox(str name);
@@ -5530,7 +5530,7 @@ str fstrcmp_impl(dbl *ret, str *string1,
str function2str(MalBlkPtr mb, int flg);
void garbageCollector(Client cntxt, MalBlkPtr mb, MalStkPtr stk, int flag);
void garbageElement(Client cntxt, ValPtr v);
-MALfcn getAddress(str filename, str modnme, str fcnname, int silent);
+MALfcn getAddress(stream *out, str filename, str modnme, str fcnname, int
silent);
str getArgDefault(MalBlkPtr mb, InstrPtr p, int idx);
ptr getArgReference(MalStkPtr stk, InstrPtr pci, int k);
int getBarrierEnvelop(MalBlkPtr mb);
@@ -5554,7 +5554,7 @@ MalBlkPtr getMalBlkHistory(MalBlkPtr mb,
MalBlkPtr getMalBlkMarker(MalBlkPtr mb, str marker);
str getName(str nme, size_t len);
int getPC(MalBlkPtr mb, InstrPtr p);
-str getPipeCatalog(int *nme, int *def);
+str getPipeCatalog(int *nme, int *def, int *stat);
str getPipeDefinition(str name);
stream *getProfilerStream(void);
str getRef;
@@ -5632,6 +5632,7 @@ int isMapOp(InstrPtr q);
int isMatJoinOp(InstrPtr q);
int isModuleDefined(Module scope, str name);
int isOptimizerEnabled(MalBlkPtr mb, str opt);
+int isOptimizerPipe(str name);
int isOrderby(InstrPtr q);
int isPreloaded(str nme);
int isProcedure(MalBlkPtr mb, InstrPtr p);
@@ -5691,9 +5692,10 @@ int logger_exit_wrap(logger *L);
int logger_find_bat_wrap(int *bid, logger *L, str nme);
int logger_restart_wrap(logger *L);
str lookupRef;
+str mal2str(MalBlkPtr mb, int flg, int first, int last);
malType malAnyBatType(malType t1, malType t2);
int malAtomArray(int tpe, int idx);
-void malAtomDefinition(str name, int tpe);
+void malAtomDefinition(stream *out, str name, int tpe);
int malAtomFixed(int size, int align, char *name);
int malAtomProperty(MalBlkPtr mb, InstrPtr pci);
int malAtomSize(int size, int align, char *name);
@@ -5743,6 +5745,7 @@ aggrFun minAggr;
str minRef;
str min_no_nilRef;
str mirrorRef;
+str mitosisRef;
str mkeyRef;
str mmathRef;
int mnstr_close_stream(Stream *S);
@@ -5995,17 +5998,17 @@ void showAllScenarios(stream *f);
void showAtoms(stream *fd);
void showCurrentScenario(void);
void showErrors(Client cntxt);
-void showException(enum malexception, const char *, _In_z_
_Printf_format_string_ const char *, ...) __attribute__((__format__(__printf__,
3, 4)));
+void showException(stream *out, enum malexception, const char *, _In_z_
_Printf_format_string_ const char *, ...) __attribute__((__format__(__printf__,
4, 5)));
void showFlowGraph(MalBlkPtr mb, MalStkPtr stk, str fname);
void showHelp(Module m, str txt, stream *fs);
-void showMalBlkHistory(MalBlkPtr mb);
+void showMalBlkHistory(stream *out, MalBlkPtr mb);
void showModuleStatistics(stream *f, Module s);
void showModules(stream *f, Module v);
void showOptimizerHistory(void);
void showOptimizerStep(str fnme, int i, int flg);
void showScenario(stream *f, Scenario s);
void showScenarioByName(stream *f, str s);
-void showScriptException(MalBlkPtr, int, enum malexception, _In_z_
_Printf_format_string_ const char *, ...) __attribute__((__format__(__printf__,
4, 5)));
+void showScriptException(stream *out, MalBlkPtr, int, enum malexception,
_In_z_ _Printf_format_string_ const char *, ...)
__attribute__((__format__(__printf__, 5, 6)));
str shtFromintImpl(sht *res, int *val);
str shtFromlngImpl(sht *res, lng *val);
str shutdownFactory(Client cntxt, MalBlkPtr mb);
@@ -6083,7 +6086,7 @@ void trimMalVariables(MalBlkPtr mb);
void trimMalVariables_(MalBlkPtr mb, bit *used, MalStkPtr glb);
int tubProp;
str tuniqueRef;
-void typeChecker(Module scope, MalBlkPtr mb, InstrPtr p, int silent);
+void typeChecker(stream *out, Module scope, MalBlkPtr mb, InstrPtr p, int
silent);
int tzone_fromstr(str buf, int *len, tzone **d);
int tzone_fromstr(str buf, int *len, tzone **d);
tzone tzone_local;
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -1014,6 +1014,8 @@ SQLdebugRendering(MapiHdl hdl)
mnstr_printf(toConsole, "%s\n", reply);
if (strncmp(reply, "mdb>#EOD", 8) == 0) {
cnt = 0;
+ while ((reply = fetch_line(hdl)))
+ mnstr_printf(toConsole, "%s\n", reply);
break;
}
}
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -45,12 +45,6 @@
# endif
#endif
-enum modes {
- MAL,
- SQL
-};
-static enum modes mode = SQL;
-
#define COUNTERSDEFAULT "ISTest"
static struct {
@@ -325,7 +319,6 @@ main(int argc, char **argv)
char *dbname = NULL;
char *user = NULL;
char *password = NULL;
- char *language = NULL;
/* some .monetdb properties are used by mclient, perhaps we need them
as well later */
struct stat statb;
@@ -390,22 +383,6 @@ main(int argc, char **argv)
user = strdup(q); /* leak */
} else if (strcmp(buf, "password") == 0 || strcmp(buf,
"passwd") == 0) {
password = strdup(q); /* leak */
- } else if (strcmp(buf, "language") == 0) {
- language = strdup(q); /* leak */
- if (strcmp(language, "sql") == 0) {
- mode = SQL;
- } else if (strcmp(language, "mal") == 0) {
- mode = MAL;
- } else {
- /* make sure we don't set garbage */
- fprintf(stderr,
- "%s:%d: unsupported "
- "language: %s\n",
- mnstr_name(config),
- line, q);
- free(language);
- language = NULL;
- }
}
}
mnstr_destroy(config);
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -897,12 +897,12 @@ AC_ARG_ENABLE(instrument,
dnl check whether no (explictly chosen) mutual exclusive combinations
dnl were made, compatability matrix:
-dnl deb ass opt war pro ins
-dnl debug \ C X C C C
-dnl assert C \ C C C C
-dnl optimize X C \ C X X
-dnl profile C C X C \ C
-dnl instrument C C X C C \
+dnl deb ass opt pro ins
+dnl debug \ C X C C
+dnl assert C \ C C C
+dnl optimize X C \ X X
+dnl profile C C X \ C
+dnl instrument C C X C \
case "x$enable_debug.$enable_optim.$enable_prof.$enable_instrument" in
# find conflicts
diff --git a/geom/monetdb5/geom.mx b/geom/monetdb5/geom.mx
--- a/geom/monetdb5/geom.mx
+++ b/geom/monetdb5/geom.mx
@@ -689,7 +689,7 @@ wkbFromText(wkb **w, str *wkt, int *tpe)
*w = NULL;
if (wkbFROMSTR(*wkt, &len, w) &&
(wkb_isnil(*w) || *tpe == wkbGeometryCollection ||
- (te = (((*w)->data[1]) & 0x0f)) == *tpe))
+ (te = *((*w)->data + 1) & 0x0f) == *tpe))
return MAL_SUCCEED;
if (!(*w))
*w = (wkb *) GDKmalloc(sizeof(wkb));
@@ -721,7 +721,7 @@ wkbHASH(wkb *w)
BUN h = 0;
for (i = 0; i < (w->len - 1); i += 2) {
- int a = w->data[i], b = w->data[i + 1];
+ int a = *(w->data + i), b = *(w->data + i + 1);
h = (h << 3) ^ (h >> 11) ^ (h >> 17) ^ (b << 8) ^ a;
}
return h;
diff --git a/java/ChangeLog.Dec2011 b/java/ChangeLog.Dec2011
--- a/java/ChangeLog.Dec2011
+++ b/java/ChangeLog.Dec2011
@@ -1,6 +1,10 @@
# ChangeLog file for java
# This file is updated with Maddlog
+* Mon Feb 20 2012 Fabian Groffen <[email protected]>
+- Fixed bug in DatabaseMetaData.getSchemas() method that caused an SQL
+ error when called with catalog and schema argument.
+
* Tue Feb 14 2012 Fabian Groffen <[email protected]>
- Resolved a bug where JDBC and Control connections could terminate
abruptly with 'Connection closed' messages
diff --git a/java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
b/java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
--- a/java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
+++ b/java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
@@ -1551,7 +1551,7 @@ public class MonetDatabaseMetaData exten
if (catalog != null)
query += "AND LOWER('" + cat + "') LIKE '" +
escapeQuotes(catalog).toLowerCase() + "' ";
if (schemaPattern != null)
- query += "AND LOWER(\"TABLE_SCHEM\") LIKE '" +
escapeQuotes(schemaPattern).toLowerCase() + "' ";
+ query += "AND LOWER(\"name\") LIKE '" +
escapeQuotes(schemaPattern).toLowerCase() + "' ";
query += "ORDER BY \"TABLE_SCHEM\"";
return(getStmt().executeQuery(query));
diff --git a/java/tests/Test_Dobjects.java b/java/tests/Test_Dobjects.java
--- a/java/tests/Test_Dobjects.java
+++ b/java/tests/Test_Dobjects.java
@@ -47,6 +47,7 @@ public class Test_Dobjects {
// inspect the catalog by use of dbmd functions
dumpResultSet(dbmd.getCatalogs());
dumpResultSet(dbmd.getSchemas());
+ dumpResultSet(dbmd.getSchemas(null, "sys"));
dumpResultSet(dbmd.getTables(null, null, null, null));
} catch (SQLException e) {
System.out.println("FAILED :( "+ e.getMessage());
diff --git a/java/tests/Test_PSsomeamount.java
b/java/tests/Test_PSsomeamount.java
new file mode 100644
--- /dev/null
+++ b/java/tests/Test_PSsomeamount.java
@@ -0,0 +1,56 @@
+/*
+ * The contents of this file are subject to the MonetDB Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.monetdb.org/Legal/MonetDBLicense
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is the MonetDB Database System.
+ *
+ * The Initial Developer of the Original Code is CWI.
+ * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list