#CE0 Tests pass with `database page count - 1`

Hello,

I’d just like to point out that tests for the stage " Print number of TABLES #CE0" pass if we print database PAGE count - 1 which is easy to fetch from the DB header. This happens with multiple different test DBs in the test suite. But, they shouldn’t pass in general case. The minus one is for the sqlite_schema table itself.

So, all test DBs have the same number of tables as database page count - 1, but this is not the general case.

The solution should be (much) more complex than this - to traverse all pages.

Hi @ivanbgd, thanks highlighting the issue! I’ll consult with the team to discuss how we can improve the test cases.

1 Like

@ivanbgd thanks for highlighting this! We should be able to fix this in the tester by intentionally creating tables which span multiple pages.

The expected solution here doesn’t involve traversing all pages though, we only expect that you read the first page (the one that contains the sqlite_schema table).

1 Like

Hi @rohitpaulk ,

Yes, that would probably be a good enough improvement.