error on ?NNN binding
Open
Nobody has claimed this yet.
bug
research
- Dominant language
- C
- Stars
- 9.2k
- Forks
- 1.2k
- Avg merge
- 19m
- Merged PRs (30d)
- 4
Description
This one work:
if _, err := db.Exec(`
UPDATE tempstorage SET value = ?, expired = ? WHERE key = ?;
INSERT INTO tempstorage(key, value, expired) SELECT ?, ?, ? WHERE changes() = 0;
`, value, expiredOnMilis, key, key, value, expiredOnMilis); err != nil {
panic(err)
}
but this one doesn't:
if _, err := db.Exec(`
UPDATE tempstorage SET value = ?2, expired = ?3 WHERE key = ?1;
INSERT INTO tempstorage(key, value, expired) SELECT ?1, ?2, ?3 WHERE changes() = 0;
`, key, value, expiredOnMilis); err != nil {
panic(err)
}
I don't know if this error is from upstream, please investigate.
Thanks
Contributor guide
No contributing guide indexed for this repository
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 running the two db.Exec examples from the issue and capture the error from the numbered-parameter form. Trace the driver entry point used by db.Exec and compare its handling with SQLite's parameter binding behavior. Done means identifying whether the problem is in go-sqlite3 or upstream SQLite and recording a reproducible conclusion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100