mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-05 00:34:09 +09:00
Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16849)
* Upgrade xorm to v1.2.2 (#16663) Backport #16663 Fix #16683 * Upgrade xorm to v1.2.2 * Change the Engine interface to match xorm v1.2.2 * Add test to ensure that dumping of login sources remains correct (#16847) #16831 has occurred because of a missed regression. This PR adds a simple test to try to prevent this occuring again. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
9
vendor/github.com/mattn/go-sqlite3/sqlite3.go
generated
vendored
9
vendor/github.com/mattn/go-sqlite3/sqlite3.go
generated
vendored
@@ -1676,7 +1676,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
|
||||
//
|
||||
// Because default is NORMAL this statement is always executed
|
||||
if err := exec(fmt.Sprintf("PRAGMA synchronous = %s;", synchronousMode)); err != nil {
|
||||
C.sqlite3_close_v2(db)
|
||||
conn.Close()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -2007,6 +2007,13 @@ func (s *SQLiteStmt) execSync(args []namedValue) (driver.Result, error) {
|
||||
return &SQLiteResult{id: int64(rowid), changes: int64(changes)}, nil
|
||||
}
|
||||
|
||||
// Readonly reports if this statement is considered readonly by SQLite.
|
||||
//
|
||||
// See: https://sqlite.org/c3ref/stmt_readonly.html
|
||||
func (s *SQLiteStmt) Readonly() bool {
|
||||
return C.sqlite3_stmt_readonly(s.s) == 1
|
||||
}
|
||||
|
||||
// Close the rows.
|
||||
func (rc *SQLiteRows) Close() error {
|
||||
rc.s.mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user