julea
julea copied to clipboard
Fix DB benchmark for MySQL/MariaDB
In db/common.c schema_create
and schema_delete
are called, passing an error, while in db/schema.c there are notes that the user should not pass an error to these functions.
Currently, it seems to work (maybe out of luck) when running SQLite server on the same host as the benchmark. However, when MariaDB is used (with Singularity), it fails.
/db/entry/insert: **
JULEA:ERROR:../benchmark/db/common.c:131:_benchmark_db_prepare_scheme: 'ret' should be TRUE
Bail out! JULEA:ERROR:../benchmark/db/common.c:131:_benchmark_db_prepare_scheme: 'ret' should be TRUE
I assume this may be because the MariaDB server tries to access the address passed in the error pointer in its own address space. After all, the MariaDB server should not be able to access anything outside the container, right?
Passing NULL instead of the error pointer, seems to fix the problem.
This seems to be #130 and will probably require extensive changes in the db client to be fixed properly. Let's keep this open as a workaround for now.