tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
9.54k stars 252 forks source link

Total changes is accumulated per Hrana stream, not connection which is wrong #1512

Open penberg opened 3 months ago

penberg commented 3 months ago

We currently implement total_changes() incorrectly for Hrana client-side protocol because we accumulate the changes per stream, but should do it per connection. I merged the incorrect solution as an intermediate step to expose the API to users because fixing this is a bit involved. Hrana does pass connection to stream but turns it into something useless because of the generics trickery there.