tursodatabase / tursodatabase/libsql
Prepared statement in a specific database kinda fails
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.2k
- Forks
- 531
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 1
Description
Hi! I've been using libsql and I've run into this problem when asking for a entry in this database (written using atlas HCL) what happens is that every two requests I get a blank one, so that's one with data and one without using this query:
"select name, data from documents where hash = ? and user_id = ?;"
Now, this only happens when using prepared statements and not direct execution (in that case the data is retrieved correctly). I am using a local database.
Let me know if I can give you more details to debug this problem, have a wonderful day!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the alternating-result behavior with the linked database definition and the prepared query, then compare it with direct execution. Trace the prepared-statement entry point involved in local database queries; done means repeated requests return the same correct row as direct execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100