db_tutorial
db_tutorial copied to clipboard
Test error in Part 10
Hello,
Thanks for your tutorial, it's very awesome. However, when I practiced the part 10, I found some error about test-cases below:
And I also found that this sentence, "Need to implement searching an internal node.", does not exist so far. Are there any steps the tutorial misses?
Hi @gagachang. Have you found how to resolve this? I have the test problem on my mac for part 10. If I insert 14 elements to a table by myself, then the program finishes with a segmentation fault.
Hi @gagachang. Have you found how to resolve this? I have the test problem on my mac for part 10. If I insert 14 elements to a table by myself, then the program finishes with a segmentation fault. Hi,I also encountered this problem. debugging found that the loop variable was out of bounds. when you write code like:
for (int32_t i = LEAF_NODE_MAX_CELLS; i >= 0; i--)
due to the intelligent prompt of IDE,it might becomesfor (size_t i = LEAF_NODE_MAX_CELLS; i >= 0; i--)
, size_t is an unsigned type. When it reaches 0, minus one, it is out of bounds and become super big,so the program finishes with a segmentation fault.
i encountered the same problem,after some debugging,i found some problems in my code: it should be void *destination = leaf_node_cell(destination_node, index_within_node); rather than void *destination = leaf_node_cell(destination, index_within_node);