Changeset: 5b332f266c5a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5b332f266c5a
Modified Files:
sql/backends/monet5/sql.c
sql/test/sysmon/Tests/test_vacuum.SQL.py
Branch: strheapvacuum
Log Message:
fix arguments resolution
diffs (57 lines):
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -5131,7 +5131,12 @@ str_column_vacuum_callback(int argc, voi
TRC_ERROR((component_t) SQL, "[str_column_vacuum_callback] --
%s", msg);
res = GDK_FAIL;
}
- sql_trans_destroy(tr);
+
+ if (sql_trans_commit(tr) != SQL_OK) {
+ TRC_ERROR((component_t) SQL, "[str_column_vacuum_callback] --
Failed to commit transaction!");
+ res = GDK_FAIL;
+ }
+ // sql_trans_destroy(tr);
return res;
}
@@ -5175,10 +5180,12 @@ SQLstr_column_auto_vacuum(Client cntxt,
if (!(*callback->argv = GDKmalloc(sizeof(char *[3]))))
return createException(SQL, "sql.str_column_auto_vacuum",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
callback->argv[0] = m; // mvc
- callback->argv[0] = sname;
- callback->argv[1] = tname;
- callback->argv[2] = cname;
+ callback->argv[1] = sname;
+ callback->argv[2] = tname;
+ callback->argv[3] = cname;
gdk_add_callback(callback);
+ // TODO REMOVE test the callback
+ callback->func(callback->argc, callback->argv);
return MAL_SUCCEED;
}
diff --git a/sql/test/sysmon/Tests/test_vacuum.SQL.py
b/sql/test/sysmon/Tests/test_vacuum.SQL.py
--- a/sql/test/sysmon/Tests/test_vacuum.SQL.py
+++ b/sql/test/sysmon/Tests/test_vacuum.SQL.py
@@ -1,6 +1,7 @@
import sys
from uuid import uuid4
from MonetDBtesting.sqltest import SQLTestCase
+from time import sleep
with SQLTestCase() as tc:
tc.execute('drop table if exists foo;')
@@ -13,9 +14,11 @@ with SQLTestCase() as tc:
res = tc.execute("select heapsize from sys.storage('sys', 'foo',
'a');").assertSucceeded()
heap_large = int(res.data[0][0])
assert(heap_large > heap_init)
- tc.execute("call sys.vacuum('sys', 'foo', 'a');").assertSucceeded()
+ tc.execute("call sys.vacuum('sys', 'foo', 'a', 3);").assertSucceeded()
res = tc.execute("select heapsize from sys.storage('sys', 'foo',
'a');").assertSucceeded()
heap_small = int(res.data[0][0])
+ print(f'{heap_init}', file=sys.stderr)
+ print(f'{heap_small} < {heap_large}', file=sys.stderr)
assert(heap_small < heap_large)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list