Skip to content

Support multiple SQL queries on a single idasql invocation #28

@EZForever

Description

@EZForever

I'm using GPT-5.5 with Codex, and have noticed that it really likes chaining multiple SQL queries in a single idasql invocation, something like idasql -s binary.i64 -q "SELECT * FROM welcome; SELECT COUNT(*) AS funcs FROM funcs; SELECT COUNT(*) AS xrefs FROM xrefs; SELECT COUNT(*) AS strings FROM strings;", instead of separate commands. Since IDASQL does not support this (I think), only the result of first query is output, making the model really confused.

Manual testing also shows this behavior:

C:\>idasql -s binary.i64 -q "SELECT 1;"
Opening: binary.i64...
Database opened successfully.
+---+
| 1 |
+---+
| 1 |
+---+
1 row(s)

C:\>idasql -s binary.i64 -q "SELECT 1; SELECT 2;"
Opening: binary.i64...
Database opened successfully.
+---+
| 1 |
+---+
| 1 |
+---+
1 row(s)

This is, of course, the model's bad, but as GPT-5.5 correctly stated, it's important for the model to keep using the tools effectively, and saving a few tool calls is always good to have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions