Skip to content

DELETE query fails silently when filtering by large integer hash values #263

@TizianoT

Description

@TizianoT

Current Behavior

When attempting to delete a row from the dbmem_content table using a query like:

USE DATABASE "agents.sqlite";
DELETE FROM "dbmem_content" WHERE "hash" = -4333218339814908000;

the row is not deleted, and no error is returned.

The query executes successfully, but affects zero rows even though a row with that hash value exists in the table.


Expected Behavior

The row with the specified hash value should be correctly matched and deleted.


Steps to Reproduce the Problem

Test on the agents.sqlite database attached in the slack chat


Additional Context

A possible cause is incorrect handling of very large integers.

As suggested by @marcobambini , large integers (especially outside the safe integer range in JavaScript) may be getting rounded or altered internally. This would result in the WHERE clause comparing against a different value than expected, causing the query to match zero rows without raising any error.

This should be verified, but it would explain why:

  • No error is thrown
  • The row is not found despite appearing to match exactly

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions