1
0
Fork 0

CHANGELOG

master
Philip O'Toole 8 months ago
parent 0e4533f1bf
commit 874b8bffda

@ -4,6 +4,7 @@
- [PR #1647](https://github.com/rqlite/rqlite/pull/1647): More CHECKPOINT test coverage.
- [PR #1649](https://github.com/rqlite/rqlite/pull/1649): Check Leader when handling `/db/request` with _None_ read consistency. Fixes issue [#1648](https://github.com/rqlite/rqlite/issues/1648).
- [PR #1653](https://github.com/rqlite/rqlite/pull/1653): Fix `busy_timeout` stat for read-only DB. Thanks @mauri870
- [PR #1654](https://github.com/rqlite/rqlite/pull/1654): Memoize SQLite compilation options.
## 8.18.4 (January 30th 2024)
### Implementation changes and bug fixes

@ -496,8 +496,13 @@ func (db *DB) WALPath() string {
return db.walPath
}
var compileOptions []string // Memoized compile options
// CompileOptions returns the SQLite compilation options.
func (db *DB) CompileOptions() ([]string, error) {
if compileOptions != nil {
return compileOptions, nil
}
res, err := db.QueryStringStmt("PRAGMA compile_options")
if err != nil {
return nil, err
@ -506,14 +511,14 @@ func (db *DB) CompileOptions() ([]string, error) {
return nil, fmt.Errorf("compile options result wrong size (%d)", len(res))
}
copts := make([]string, len(res[0].Values))
for i := range copts {
compileOptions = make([]string, len(res[0].Values))
for i := range compileOptions {
if len(res[0].Values[i].Parameters) != 1 {
return nil, fmt.Errorf("compile options values wrong size (%d)", len(res))
}
copts[i] = res[0].Values[i].Parameters[0].GetS()
compileOptions[i] = res[0].Values[i].Parameters[0].GetS()
}
return copts, nil
return compileOptions, nil
}
// ConnectionPoolStats returns database pool statistics

Loading…
Cancel
Save