Skip to content

Buffer overflow when using too many parameters #201

@jaekwon

Description

@jaekwon

I had some very long queries that were panic'ing on array out-of-bounds on the following line:

        // value of each parameter [n bytes]
        paramValues := data[pos:pos]

The query basically had some 2100+ placeholders like Select * from myTable where id in (?,?,?,?,....?).

The following change seems to have fixed it:
jaekwon@25a9fdb

It's hacky though so perhaps a refactoring is in order.

Is there a better way to pass in many id's in a SELECT-IN query?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions