(t *testing.T)
| 1455 | } |
| 1456 | |
| 1457 | func TestFoundRows2(t *testing.T) { |
| 1458 | runTestsParallel(t, dsn+"&clientFoundRows=true", func(dbt *DBTest, tbl string) { |
| 1459 | dbt.mustExec("CREATE TABLE " + tbl + " (id INT NOT NULL ,data INT NOT NULL)") |
| 1460 | dbt.mustExec("INSERT INTO " + tbl + " (id, data) VALUES (0, 0),(0, 0),(1, 0),(1, 0),(1, 1)") |
| 1461 | |
| 1462 | res := dbt.mustExec("UPDATE " + tbl + " SET data = 1 WHERE id = 0") |
| 1463 | count, err := res.RowsAffected() |
| 1464 | if err != nil { |
| 1465 | dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error()) |
| 1466 | } |
| 1467 | if count != 2 { |
| 1468 | dbt.Fatalf("Expected 2 matched rows, got %d", count) |
| 1469 | } |
| 1470 | res = dbt.mustExec("UPDATE " + tbl + " SET data = 1 WHERE id = 1") |
| 1471 | count, err = res.RowsAffected() |
| 1472 | if err != nil { |
| 1473 | dbt.Fatalf("res.RowsAffected() returned error: %s", err.Error()) |
| 1474 | } |
| 1475 | if count != 3 { |
| 1476 | dbt.Fatalf("Expected 3 matched rows, got %d", count) |
| 1477 | } |
| 1478 | }) |
| 1479 | } |
| 1480 | |
| 1481 | func TestTLS(t *testing.T) { |
| 1482 | tlsTestReq := func(dbt *DBTest) { |
nothing calls this directly
no test coverage detected