Bump c/storage v1.58.0, c/image v5.35.0, c/common v0.63.0

Bump:
c/storage v1.58.0
c/image v5.35.0
c/common v0.63.0

In preparation for Podman v5.5.0

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
tomsweeneyredhat
2025-04-17 11:04:58 -04:00
parent 51c4df1316
commit be937a4e20
135 changed files with 2943 additions and 2364 deletions

View File

@ -381,7 +381,7 @@ type SQLiteStmt struct {
s *C.sqlite3_stmt
t string
closed bool
cls bool
cls bool // True if the statement was created by SQLiteConn.Query
}
// SQLiteResult implements sql.Result.
@ -393,12 +393,12 @@ type SQLiteResult struct {
// SQLiteRows implements driver.Rows.
type SQLiteRows struct {
s *SQLiteStmt
nc int
nc int32 // Number of columns
cls bool // True if we need to close the parent statement in Close
cols []string
decltype []string
cls bool
closed bool
ctx context.Context // no better alternative to pass context into Next() method
closemu sync.Mutex
}
type functionInfo struct {
@ -929,6 +929,7 @@ func (c *SQLiteConn) query(ctx context.Context, query string, args []driver.Name
s.(*SQLiteStmt).cls = true
na := s.NumInput()
if len(args)-start < na {
s.Close()
return nil, fmt.Errorf("not enough args to execute query: want %d got %d", na, len(args)-start)
}
// consume the number of arguments used in the current
@ -2007,14 +2008,12 @@ func (s *SQLiteStmt) query(ctx context.Context, args []driver.NamedValue) (drive
rows := &SQLiteRows{
s: s,
nc: int(C.sqlite3_column_count(s.s)),
nc: int32(C.sqlite3_column_count(s.s)),
cls: s.cls,
cols: nil,
decltype: nil,
cls: s.cls,
closed: false,
ctx: ctx,
}
runtime.SetFinalizer(rows, (*SQLiteRows).Close)
return rows, nil
}
@ -2111,24 +2110,28 @@ func (s *SQLiteStmt) Readonly() bool {
// Close the rows.
func (rc *SQLiteRows) Close() error {
rc.s.mu.Lock()
if rc.s.closed || rc.closed {
rc.s.mu.Unlock()
rc.closemu.Lock()
defer rc.closemu.Unlock()
s := rc.s
if s == nil {
return nil
}
rc.s = nil // remove reference to SQLiteStmt
s.mu.Lock()
if s.closed {
s.mu.Unlock()
return nil
}
rc.closed = true
if rc.cls {
rc.s.mu.Unlock()
return rc.s.Close()
s.mu.Unlock()
return s.Close()
}
rv := C.sqlite3_reset(rc.s.s)
rv := C.sqlite3_reset(s.s)
if rv != C.SQLITE_OK {
rc.s.mu.Unlock()
return rc.s.c.lastError()
s.mu.Unlock()
return s.c.lastError()
}
rc.s.mu.Unlock()
rc.s = nil
runtime.SetFinalizer(rc, nil)
s.mu.Unlock()
return nil
}
@ -2136,9 +2139,9 @@ func (rc *SQLiteRows) Close() error {
func (rc *SQLiteRows) Columns() []string {
rc.s.mu.Lock()
defer rc.s.mu.Unlock()
if rc.s.s != nil && rc.nc != len(rc.cols) {
if rc.s.s != nil && int(rc.nc) != len(rc.cols) {
rc.cols = make([]string, rc.nc)
for i := 0; i < rc.nc; i++ {
for i := 0; i < int(rc.nc); i++ {
rc.cols[i] = C.GoString(C.sqlite3_column_name(rc.s.s, C.int(i)))
}
}
@ -2148,7 +2151,7 @@ func (rc *SQLiteRows) Columns() []string {
func (rc *SQLiteRows) declTypes() []string {
if rc.s.s != nil && rc.decltype == nil {
rc.decltype = make([]string, rc.nc)
for i := 0; i < rc.nc; i++ {
for i := 0; i < int(rc.nc); i++ {
rc.decltype[i] = strings.ToLower(C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i))))
}
}