Skip to content

fetching a query with more than 250 columns triggers an assertion #276

Closed
@schveiguy

Description

@schveiguy

An old assertion seems to be incorrect. Simple test case:

auto conn = new Connection(...);
auto sql = format("SELECT 1 as `%-(%s`, 1 as `%)`",
		iota(26*26).map!(i => [cast(char)(i / 26 + 'A'), cast(char)(i % 26 + 'A')]));
auto result = con.query(sql);

Assertion is here:

assert(packet.front >= 1 && packet.front <= 250); // Result set packet header should have this value

This number is the field count, and is a length encoded integer, which is fine to be greater than 250 (it can be all the way up to 2^64 theoretically). I believe it's not OK to be 0 though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions