bustub
bustub copied to clipboard
How to insert zero at the beggining?
Since project 2 requires unique key, and all pages are initialized to zero. If 0 is inserted right after the database is created, the database will mistakenly assume that a 0 has been inserted before, and reject the insertion. Is this a bug? Or is there something deep int this that I don't understand?Please correct me if I was wrong.
In my opinion, whether a location is inserted or not is determined by reading the array——readable_[index], so when inserting key = 000 at index=1, we should judge whether the readable_[1]=1 to determine whether key=000 is insert , not the key itself