Changeset: 4751ff65d8e8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4751ff65d8e8
Modified Files:
sql/backends/monet5/sql_scenario.c
Branch: Aug2011
Log Message:
Execute initialization code when sys.systemfunctions does not exist.
This fixes bug 2875.
diffs (19 lines):
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
@@ -428,6 +428,15 @@ SQLinitClient(Client c)
initSQLreferences();
/* initialize the database with predefined SQL functions */
+ if (SQLnewcatalog == 0) {
+ /* check whether table sys.systemfunctions exists: if
+ * it doesn't, this is probably a restart of the
+ * server after an incomplete initialization */
+ sql_schema *s = mvc_bind_schema(m, "sys");
+ sql_table *t = s ? mvc_bind_table(m, s, "systemfunctions") :
NULL;
+ if (t == NULL)
+ SQLnewcatalog = 1;
+ }
if (SQLnewcatalog > 0) {
char path[PATHLENGTH];
str fullname;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list