-
Notifications
You must be signed in to change notification settings - Fork 266
Description
Bug description: When a Btree index is created on a (primary key) column that is not sorted, the final level of nodes (leaf nodes) point to wrong records of the main file.
Examples:
Note: The only changes made to the original project to identify the bug were:
-
to change the type of the ID field of the instructor table from string to int in smallRelationsInsertFile.sql
create table instructor (ID int primary key, name str, dept_name str, salary int); -
to add to line 301 (_select_where_with_btree function) of the table.py file the printing of the index.
bt.show()
Case 1: the initial inserts in the instructor table are ordered by the ID field

We create the index and then SELECT.

The pointers are correct as well as the results of the SELECT query

Case 2) the initial inserts in the instructor table are not ordered by the ID field
We follow the same process as before,
we create the index and then SELECT.

The pointers are incorrect as well as the results of the SELECT query








