всегда есть предупреждение о bad_alloc, когда я использую fastbit_add_value,
тестовый код:
------------------------------------ тестовый код --------- -------------------------------------
#include "capi.h"
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#define DEBUG 1
int main(int argc, char* argv[]) {
int num = 100;
int total = 1;
int *a_vals, *b_vals, i;
a_vals = (int*)malloc(sizeof(int)*num);
b_vals = (int*)malloc(sizeof(int)*num);
fastbit_init("./ibis.rc");
fastbit_set_verbose_level(7);
if(a_vals && b_vals) {
for (i = 0; i < num; i++)
a_vals[i] = i, b_vals[i] = i;
}
fastbit_add_values("a", "int", a_vals, num, 0);
fastbit_add_values("b", "int", b_vals, num, 0);
fastbit_flush_buffer("fbnew");
return(0);
}
------------------------------------ ibis.rc -------- --------------------------------------
ibis.rc
fileManager.maxBytes=300Mb
--------------------------------- вывод программы ------------ -------------------------------------
вывод программы
FastBit 2.0.3
Log started on Tue Sep 18 15:57:11 2018
Warning -- fileManager::storage::ctor failed to find 28 bytes of space in memory, totalBytes = 0, maxBytes = 0 -- fileManager.cpp:1894
Warning -- fastbit_add_values failed to add values to a to an in-memory data partition due to exception: storage::ctor(memory):loc1 failed -- fileManager.cpp:1896
Warning -- fileManager::storage::ctor failed to find 28 bytes of space in memory, totalBytes = 0, maxBytes = 0 -- fileManager.cpp:1894
Warning -- fastbit_add_values failed to add values to b to an in-memory data partition due to exception: storage::ctor(memory):loc1 failed -- fileManager.cpp:1896
fileManager initialization complete -- maxBytes=314572800, maxOpenFiles=768
Constructed (empty) part fbnew
activeDir = "fbnew"
clearing data partition fbnew
tafel::writeData starting to write 100 rows and 2 columns to fbnew as data partition fbnew
tafel::normalize - setting number of rows to 100, adjusting all in-memory data to reflect this change
tafel::writeData opened file fbnew/a to write data for column a
Warning -- failed to read the content of fbnew/a.msk, fileManager::getFile returned -101
part::writeColumn wrote 400 bytes of i for 100 elements starting from 0
Overall bit mask:
This bitvector stores 93 bits of a 100-bit (0 set) sequence in a 1-word array and 7 bits in the active word
0 1 1 2 2 3
0123456789012345678901234567890
-------------------------------
0 80000003 93*0
00000000 0000000
tafel::writeData opened file fbnew/b to write data for column b
Warning -- failed to read the content of fbnew/b.msk, fileManager::getFile returned -101
part::writeColumn wrote 400 bytes of i for 100 elements starting from 0
Overall bit mask:
This bitvector stores 93 bits of a 100-bit (0 set) sequence in a 1-word array and 7 bits in the active word
0 1 1 2 2 3
0123456789012345678901234567890
-------------------------------
0 80000003 93*0
00000000 0000000
fileManager::flushDir -- removing records of all files in fbnew
fileManager::flushDir -- removed 0 file from fbnew
tafel::writeData outputted 2 columns and 100 rows (total 100) to fbnew using 0.009728 sec(CPU), 0.00983433 sec(elapsed)
tafel::write complete writing 100 rows as partition 0 in fbnew
tafel::write completed writing partition '' () with 2 columns and 100 rows to fbnew using 0.010088 sec(CPU), 0.010201 sec(elapsed)
clearing content of ibis::tafel 0x37e47e0
clearing tafel::column a
clearing tafel::column b
fileManager::clear has nothing to do
fileManager decommissioned
однако, когда я использую ibis запросить базу данных, я не могу запросить правильно, кто-нибудь знает почему? ТНХ.
.. / ibis -d fbnew -q "выберите где"
FROM T-fbnew WHERE 1=1 produced 0 hit
-- the result table (0 x 0) for "SELECT a where FROM T-fbnew WHERE 1=1"