chore(upgradeSQLCipher): Scanning NULL BLOB value should return nil
Fixing failing tests: TestSyncDeviceSuite/TestPairingSyncDeviceClientAsReceiver; TestSyncDeviceSuite/TestPairingSyncDeviceClientAsSender Considering the following configuration: 1. Table with BLOB column has 1 NULL value 2. Query the value 3. Rows.Scan(&dest sql.NullString) Expected: dest.Valid == false; dest.String == nil Actual: dest.Valid == true; dest.String == ""
This commit is contained in:
parent
17828ba1d9
commit
2d907f4ca4
|
@ -4,6 +4,7 @@
|
|||
// Use of this source code is governed by an MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build cgo
|
||||
// +build cgo
|
||||
|
||||
package sqlite3
|
||||
|
@ -2092,7 +2093,7 @@ func (rc *SQLiteRows) nextSyncLocked(dest []driver.Value) error {
|
|||
case C.SQLITE_BLOB:
|
||||
p := C.sqlite3_column_blob(rc.s.s, C.int(i))
|
||||
if p == nil {
|
||||
dest[i] = []byte{}
|
||||
dest[i] = nil
|
||||
continue
|
||||
}
|
||||
n := C.sqlite3_column_bytes(rc.s.s, C.int(i))
|
||||
|
|
Loading…
Reference in New Issue