Changeset: 1cd4760ffc27 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1cd4760ffc27
Modified Files:
monetdb5/mal/mal_errors.h
monetdb5/mal/mal_exception.c
monetdb5/mal/mal_function.c
sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err
sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out
Branch: default
Log Message:
Minor text issues.
diffs (92 lines):
diff --git a/monetdb5/mal/mal_errors.h b/monetdb5/mal/mal_errors.h
--- a/monetdb5/mal/mal_errors.h
+++ b/monetdb5/mal/mal_errors.h
@@ -60,7 +60,7 @@
#define INTERNAL_OBJ_CREATE "Can not create object"
#define INTERNAL_AUTHORIZATION "authorization BATs not empty"
-#define MAL_MALLOC_FAIL "could not allocate space for"
+#define MAL_MALLOC_FAIL "could not allocate space"
#define MAL_STACK_FAIL "Running out of stack space."
#define MAL_CALLDEPTH_FAIL "Recursive call limit reached."
diff --git a/monetdb5/mal/mal_exception.c b/monetdb5/mal/mal_exception.c
--- a/monetdb5/mal/mal_exception.c
+++ b/monetdb5/mal/mal_exception.c
@@ -43,7 +43,7 @@ isExceptionVariable(str nme){
return 0;
}
-static char *M5OutOfMemory = "Memory allocation failed.";
+static char *M5OutOfMemory = "Out of memory. Memory allocation failed.";
/**
* Internal helper function for createException and
diff --git a/monetdb5/mal/mal_function.c b/monetdb5/mal/mal_function.c
--- a/monetdb5/mal/mal_function.c
+++ b/monetdb5/mal/mal_function.c
@@ -21,10 +21,18 @@
Symbol newFunction(str mod, str nme,int kind){
Symbol s;
InstrPtr p;
+ int varid;
s = newSymbol(nme,kind);
if (s == NULL)
return NULL;
+
+ varid = newVariable(s->def,nme,strlen(nme),TYPE_any);
+ if( varid < 0){
+ freeSymbol(s);
+ return NULL;
+ }
+
p = newInstruction(NULL,kind);
if (p == NULL) {
freeSymbol(s);
@@ -32,7 +40,7 @@ Symbol newFunction(str mod, str nme,int
}
setModuleId(p, mod);
setFunctionId(p, nme);
- setDestVar(p, newVariable(s->def,nme,strlen(nme),TYPE_any));
+ setDestVar(p, varid);
pushInstruction(s->def,p);
return s;
}
diff --git a/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err
b/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err
--- a/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err
+++ b/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.err
@@ -27,12 +27,6 @@ stderr of test 'setmemorylimit-fail` in
# 15:41:50 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-56431" "--port=38119"
# 15:41:50 >
-MAPI = (monetdb) /var/tmp/mtest-56431/.s.monetdb.38119
-QUERY = create procedure setmemorylimit(nbytes BIGINT) external name
"io"."setmemorylimit";
-ERROR = !CREATE PROCEDURE: name 'setmemorylimit' (bigint(64)) already in use
-MAPI = (monetdb) /var/tmp/mtest-56431/.s.monetdb.38119
-QUERY = select name from tables where 1=0;
-ERROR = !Could not create SQL allocator
# 15:41:50 >
# 15:41:50 > "Done."
diff --git a/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out
b/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out
--- a/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out
+++ b/sql/test/malloc_fail/Tests/setmemorylimit-fail.stable.out
@@ -19,12 +19,16 @@ stdout of test 'setmemorylimit-fail` in
# MonetDB/SQL module loaded
Ready.
-!Memory allocation failed.
# 15:41:50 >
# 15:41:50 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-56431" "--port=38119"
# 15:41:50 >
+#select name from tables where 1=0;
+% .tables # table_name
+% name # name
+% varchar # type
+% 0 # length
# 15:41:50 >
# 15:41:50 > "Done."
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list