Skip to content

[Bug]: Invalid json selector does not return an error but omits rows #4113

@phispi

Description

@phispi

What did you do?

I used an SQL query on a big database that was - according to the sqlitebrowser - executed successfully. However, it did return less rows than expected. I nailed down the problem and found out that the rows were missing that contained an invalid JSON selector.

To make it short: I execute

select json_extract('[3]', '$[-1]');

What did you expect to see?

I expect the error message bad JSON path: '$[-1]' as e.g. Heidi SQL gives when I use the very same statement.

What did you see instead?

I get an empty result and a success message:

Execution finished without errors.
Result: 0 rows returned in 13ms
At line 1:
select json_extract('[3]', '$[-1]');

DB4S Version

3.13.1

What OS are you seeing the problem on?

Windows

OS version

Windows 11 10.0.26100 Build 26100

Relevant log output

Prevention against duplicate issues

  • I have searched for similar issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugs or reports that are very likely to be bugs.sqlite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions