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
Current Behavior
When attempting to delete a row from the
dbmem_contenttable using a query like:the row is not deleted, and no error is returned.
The query executes successfully, but affects zero rows even though a row with that
hashvalue exists in the table.Expected Behavior
The row with the specified
hashvalue 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
WHEREclause 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: