@@ -388,16 +388,16 @@ func TestCRUD(t *testing.T) {
388
388
func TestNumbersToAny (t * testing.T ) {
389
389
runTestsParallel (t , dsn , func (dbt * DBTest , tbl string ) {
390
390
dbt .mustExec ("CREATE TABLE " + tbl + " (id INT PRIMARY KEY, b BOOL, i8 TINYINT, " +
391
- "i16 SMALLINT, i32 INT, i64 BIGINT, f32 FLOAT, f64 DOUBLE)" )
392
- dbt .mustExec ("INSERT INTO " + tbl + " VALUES (1, true, 127, 32767, 2147483647, 9223372036854775807, 1.25, 2.5)" )
391
+ "i16 SMALLINT, i32 INT, i64 BIGINT, f32 FLOAT, f64 DOUBLE, iu32 INT UNSIGNED )" )
392
+ dbt .mustExec ("INSERT INTO " + tbl + " VALUES (1, true, 127, 32767, 2147483647, 9223372036854775807, 1.25, 2.5, 4294967295 )" )
393
393
394
- // Use binaryRows for intarpolateParams =false and textRows for intarpolateParams =true.
395
- rows := dbt .mustQuery ("SELECT b, i8, i16, i32, i64, f32, f64 FROM " + tbl + " WHERE id=?" , 1 )
394
+ // Use binaryRows for interpolateParams =false and textRows for interpolateParams =true.
395
+ rows := dbt .mustQuery ("SELECT b, i8, i16, i32, i64, f32, f64, iu32 FROM " + tbl + " WHERE id=?" , 1 )
396
396
if ! rows .Next () {
397
397
dbt .Fatal ("no data" )
398
398
}
399
- var b , i8 , i16 , i32 , i64 , f32 , f64 any
400
- err := rows .Scan (& b , & i8 , & i16 , & i32 , & i64 , & f32 , & f64 )
399
+ var b , i8 , i16 , i32 , i64 , f32 , f64 , iu32 any
400
+ err := rows .Scan (& b , & i8 , & i16 , & i32 , & i64 , & f32 , & f64 , & iu32 )
401
401
if err != nil {
402
402
dbt .Fatal (err )
403
403
}
@@ -422,6 +422,9 @@ func TestNumbersToAny(t *testing.T) {
422
422
if f64 .(float64 ) != 2.5 {
423
423
dbt .Errorf ("f64 != 2.5" )
424
424
}
425
+ if iu32 .(int64 ) != 4294967295 {
426
+ dbt .Errorf ("iu32 != 4294967295" )
427
+ }
425
428
})
426
429
}
427
430
0 commit comments