@@ -2368,6 +2368,11 @@ func TestSimpleCommandOK(t *testing.T) {
2368
2368
// Verify that Ping()/Reset() clears both fields.
2369
2369
for range 2 {
2370
2370
if err := test .funcToCall (ctx , c ); err != nil {
2371
+ // Skip Reset on servers lacking COM_RESET_CONNECTION support.
2372
+ if test .query == "Reset" {
2373
+ maybeSkip (t , err , 1047 ) // ER_UNKNOWN_COM_ERROR
2374
+ maybeSkip (t , err , 1235 ) // ER_NOT_SUPPORTED_YET
2375
+ }
2371
2376
dbt .fail (test .method , test .query , err )
2372
2377
}
2373
2378
if got , want := c .result .affectedRows , []int64 (nil ); ! reflect .DeepEqual (got , want ) {
@@ -2406,7 +2411,7 @@ func TestReset(t *testing.T) {
2406
2411
if err != nil {
2407
2412
dbt .fail ("Conn" , "QueryContext" , err )
2408
2413
}
2409
- result := []driver.Value {0 }
2414
+ result := []driver.Value {nil }
2410
2415
err = rows .Next (result )
2411
2416
if err != nil {
2412
2417
dbt .fail ("Rows" , "Next" , err )
@@ -2415,12 +2420,16 @@ func TestReset(t *testing.T) {
2415
2420
if err != nil {
2416
2421
dbt .fail ("Rows" , "Close" , err )
2417
2422
}
2418
- if ! reflect .DeepEqual ([]driver.Value {int64 (1 )}, result ) {
2419
- dbt .Fatalf ("failed to set @a to 1 with SET: got %v, want=%v" , result , []driver.Value {int64 (1 )})
2423
+ if ! (reflect .DeepEqual ([]driver.Value {int64 (1 )}, result ) ||
2424
+ reflect .DeepEqual ([]driver.Value {[]byte ("1" )}, result )) {
2425
+ dbt .Fatalf ("failed to set @a to 1 with SET: got %v, want int64(1) or []byte(\" 1\" )" , result )
2420
2426
}
2421
2427
2422
2428
err = c .Reset (ctx )
2423
2429
if err != nil {
2430
+ // Allow skipping on unsupported COM_RESET_CONNECTION
2431
+ maybeSkip (t , err , 1047 ) // ER_UNKNOWN_COM_ERROR
2432
+ maybeSkip (t , err , 1235 ) // ER_NOT_SUPPORTED_YET
2424
2433
dbt .fail ("Conn" , "Reset" , err )
2425
2434
}
2426
2435
0 commit comments