Skip to content

Enumerating all rows causes an ArgumentOutOfRangeException #17

@Genbox

Description

@Genbox

While enumerating all rows in a table, If the B+ tree contains either a InteriorIndexBtreePage or LeafIndexBtreePage, it throws an ArgumentOutOfRangeException.

using FileStream fs = File.OpenRead(file);
using Sqlite3Database db = new Sqlite3Database(fs);
Sqlite3Table tbl = db.GetTable("Scans");

 foreach (Sqlite3Row row in tbl.EnumerateRows())
{
     // do something with row
}

It fails on this line.

Notes:

  • It should probably have been a NotSupportedException
  • It is my understanding that these pages don't contain data, so they shouldn't be enumerated anyway

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions