Hi,
I have a segmentation fault when running an SQL query against a specific table.
I can execute queries like
“select count(*) from <TABLE>”
but the server crashes when I do
“select * from <TABLE> where businessdate = ‘2013-12-18’ limit 100”.
MonetDB version:
MonetDB Database Server Toolkit v1.1 (Feb2013-SP5)
Stack trace:
#0 0x00007f7cf2987eb1 in GDKfilepath (path=0x7f6e44f0db5d "", dir=0x7f7ceb4c51d4 "bat", name=0x0, ext=0x0) at gdk_storage.c:51
#1 0x00007f7ceb3fbbd3 in BATlocation (fnme=0x7f6e44f0fbe0, bid=<value optimized out>) at sql_optimizer.c:77
#2 0x00007f7ceb3fc59a in SQLgetStatistics (c=0x7f7cebed6308) at sql_optimizer.c:160
#3 addQueryToCache (c=0x7f7cebed6308) at sql_optimizer.c:295
#4 0x00007f7ceb3fb7ed in backend_dumpproc (be=0x7f6e3809d5f0, c=0x7f7cebed6308, cq=0x7f6e383d4090, s=0x7f6e3837bd20) at sql_gencode.c:2431
#5 0x00007f7ceb3e2067 in SQLparser (c=0x7f7cebed6308) at sql_scenario.c:1755
#6 0x00007f7cf2f35b63 in runPhase (c=0x7f7cebed6308) at mal_scenario.c:522
#7 runScenarioBody (c=0x7f7cebed6308) at mal_scenario.c:558
#8 0x00007f7cf2f35caf in runScenario (c=0x7f7cebed6308) at mal_scenario.c:586
#9 0x00007f7cf2f36508 in MSserveClient (dummy=0x7f7cebed6308) at mal_session.c:446
#10 0x0000003ee9a07851 in start_thread () from /lib64/libpthread.so.0
#11 0x0000003ee92e890d in clone () from /lib64/libc.so.6
The problem is that it tries to de-reference null pointer ‘name’.
The pointer is calculated in BATLocation as (b->T->heap.filename ? b->T->heap.filename: b->H->heap.filename).
The column in question has type real so as far as I understand there is no heap file for it.
I don’t know if heap.filename should contain NULL or something else.
Regards,
Alex Shestakov.