X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/6aef50b3527d53caf1e701c665676deb8c2d79e0..cf2546e250d7c96705793934cf1c3f7e64888148:/emufs/b_plus_test.c?ds=sidebyside diff --git a/emufs/b_plus_test.c b/emufs/b_plus_test.c index bf7a075..003216f 100644 --- a/emufs/b_plus_test.c +++ b/emufs/b_plus_test.c @@ -5,8 +5,8 @@ int main(int argc, char* argv[]) { /* Locals */ INDEX_DAT querydata; -/*NODO_B_PLUS *memnodo; -int num_node, i; */ +/*NODO_B_PLUS *memnodo;*/ +int i; /* Creamos un handler EMUFS, luego un Indice B+ y testing... */ INDEXSPECS indice; indice.tam_bloque = SIZE_B_PLUS_HEADER + sizeof(int)*5 + sizeof(int)*6; @@ -16,10 +16,15 @@ indice.filename = "idxbplus_primary.idx"; printf("\nTam Nodo: %i Size Claves: %i Size_Hijos: %i\n",indice.tam_bloque,indice.size_claves,indice.size_hijos); emufs_b_plus_crear(&indice); -querydata.num_bloque = 9; -querydata.clave.i_clave = 8; + +for (i=1;i<16;++i) +{ +querydata.num_bloque = i; +querydata.clave.i_clave = i; b_plus_insertar(&indice,&querydata); - +} + +/* querydata.num_bloque = 2; querydata.clave.i_clave = 7; b_plus_insertar(&indice,&querydata); @@ -46,7 +51,7 @@ memnodo = b_plus_leer_nodo(&indice, num_node); for (i = 0; i < indice.size_hijos/sizeof(int); ++i) printf(" %i",memnodo->hijos[i]); printf("\nEnd Dump\n"); free(memnodo);*/ - + /* querydata.num_bloque = 54; querydata.clave.i_clave = 1; b_plus_insertar(&indice, &querydata);