Changeset: 2ab8a887b280 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ab8a887b280
Modified Files:
clients/mapilib/mapi.c
debian/rules
libversions
sql/ChangeLog.Apr2012
sql/backends/monet5/sql_scenario.c
sql/storage/store.c
tools/merovingian/ChangeLog.Apr2012
tools/merovingian/daemon/forkmserver.c
Branch: default
Log Message:
Merge with Apr2012 branch.
diffs (129 lines):
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -1036,6 +1036,7 @@ static int mapi_slice_row(struct MapiRes
static void mapi_store_bind(struct MapiResultSet *result, int cr);
static void parse_uri_query(Mapi mid, char *uri);
static void set_uri(Mapi mid);
+static MapiMsg connect_to_server(Mapi mid);
static int mapi_initialized = 0;
@@ -2047,10 +2048,11 @@ mapi_mapi(const char *host, int port, co
tmid = mapi_mapi("/tmp",
socks[i], "mero", "mero",
lang, dbname);
tmid->redirmax = 0;
- if (mapi_reconnect(tmid) == MOK
||
-
*tmid->redirects != NULL ||
- (tmid->errorstr
!= NULL &&
-
strstr(tmid->errorstr, "under maintenance") != NULL))
+ if (connect_to_server(tmid) ==
MOK &&
+
(mapi_start_talking(tmid) == MOK ||
+
*tmid->redirects != NULL ||
+
(tmid->errorstr != NULL &&
+
strstr(tmid->errorstr, "under maintenance") != NULL)))
{
host = buf;
port = socks[i];
@@ -2070,10 +2072,11 @@ mapi_mapi(const char *host, int port, co
tmid = mapi_mapi("/tmp",
socks[i], "mero", "mero",
lang, dbname);
tmid->redirmax = 0;
- if (mapi_reconnect(tmid) == MOK
||
-
*tmid->redirects != NULL ||
- (tmid->errorstr
!= NULL &&
-
strstr(tmid->errorstr, "under maintenance") != NULL))
+ if (connect_to_server(tmid) ==
MOK &&
+
(mapi_start_talking(tmid) == MOK ||
+
*tmid->redirects != NULL ||
+
(tmid->errorstr != NULL &&
+
strstr(tmid->errorstr, "under maintenance") != NULL)))
{
host = buf;
port = socks[i];
diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -42,3 +42,5 @@ DEB_CONFIGURE_EXTRA_FLAGS := \
--with-sphinxclient=no \
--with-unixodbc=yes \
--with-valgrind=no
+
+DEB_BUILD_PARALLEL=1
diff --git a/libversions b/libversions
--- a/libversions
+++ b/libversions
@@ -34,7 +34,7 @@
# the numbers are: <CURRENT>:<REVISION>:<AGE>
# version of the GDK library (subdirectory gdk; also includes
-# common/options and common/mutils)
+# common/options and common/utils)
GDK_VERSION=5:1:0
# version of the MAPI library (subdirectory clients/mapilib)
diff --git a/sql/ChangeLog.Apr2012 b/sql/ChangeLog.Apr2012
--- a/sql/ChangeLog.Apr2012
+++ b/sql/ChangeLog.Apr2012
@@ -1,3 +1,7 @@
# ChangeLog file for sql
# This file is updated with Maddlog
+* Tue May 15 2012 Sjoerd Mullender <[email protected]>
+- Databases that were upgraded from the Aug2011 release have an error
+ in the catalog for SQL procedures. This is now fixed.
+
diff --git a/sql/backends/monet5/sql_scenario.c
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -444,6 +444,7 @@ sql_update_apr2012_sp1(Client c)
size_t bufsize = 2048, pos = 0;
/* changes in createdb/25_debug.sql */
+ pos += snprintf(buf+pos, bufsize-pos, "update sys.functions set type =
%d, side_effect = false where type = %d and id not in (select func_id from
sys.args where number = 0 and name = 'result');\n", F_PROC, F_FUNC);
pos += snprintf(buf+pos, bufsize-pos, "drop function sys.storage;\n");
pos += snprintf(buf+pos, bufsize-pos, "create function sys.storage()
returns table (\"schema\" string, \"table\" string, \"column\" string, location
string, \"count\" bigint, capacity bigint, width int, size bigint, hashsize
bigint, sorted boolean) external name sql.storage;\n");
pos += snprintf(buf+pos, bufsize-pos, "create function sys.optimizers()
returns table (name string, def string, status string) external name
sql.optimizers;\n");
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -752,6 +752,8 @@ load_func(sql_trans *tr, sql_schema *s,
t -> res = a->type;
} else {
list_append(t->ops, a);
+ if (t->type == F_FUNC)
+ t->type = F_PROC;
}
} else {
list_append(t->ops, a);
diff --git a/tools/merovingian/ChangeLog.Apr2012
b/tools/merovingian/ChangeLog.Apr2012
--- a/tools/merovingian/ChangeLog.Apr2012
+++ b/tools/merovingian/ChangeLog.Apr2012
@@ -1,3 +1,7 @@
# ChangeLog file for sql/src/backends/monet5/merovingian
# This file is updated with mchangelog
+* Tue May 15 2012 Fabian Groffen <[email protected]>
+- Fixed a bug where connecting to a stopped multiplex-funnel would result
+ in a 'there are no available connections' error.
+
diff --git a/tools/merovingian/daemon/forkmserver.c
b/tools/merovingian/daemon/forkmserver.c
--- a/tools/merovingian/daemon/forkmserver.c
+++ b/tools/merovingian/daemon/forkmserver.c
@@ -187,6 +187,16 @@ forkMserver(char *database, sabdb** stat
return(er);
}
+ /* refresh stats, now we will have a connection registered */
+ msab_freeStatus(stats);
+ er = msab_getStatus(stats, database);
+ if (er != NULL) {
+ /* since the client mserver lives its own life anyway,
+ * it's not really a problem we exit here */
+ err e = newErr("%s", er);
+ free(er);
+ return(e);
+ }
return(NO_ERR);
}
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list