@@ -388,16 +388,16 @@ func TestCRUD(t *testing.T) {
388388func TestNumbersToAny (t * testing.T ) {
389389 runTestsParallel (t , dsn , func (dbt * DBTest , tbl string ) {
390390 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 )" )
393393
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 )
396396 if ! rows .Next () {
397397 dbt .Fatal ("no data" )
398398 }
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 )
401401 if err != nil {
402402 dbt .Fatal (err )
403403 }
@@ -422,6 +422,9 @@ func TestNumbersToAny(t *testing.T) {
422422 if f64 .(float64 ) != 2.5 {
423423 dbt .Errorf ("f64 != 2.5" )
424424 }
425+ if iu32 .(int64 ) != 4294967295 {
426+ dbt .Errorf ("iu32 != 4294967295" )
427+ }
425428 })
426429}
427430
0 commit comments