MCPcopy
hub / github.com/go-sql-driver/mysql / TestMultiResultSetNoSelect

Function TestMultiResultSetNoSelect

driver_test.go:2568–2585  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2566}
2567
2568func TestMultiResultSetNoSelect(t *testing.T) {
2569 runTestsWithMultiStatement(t, dsn, func(dbt *DBTest) {
2570 rows := dbt.mustQuery("DO 1; DO 2;")
2571 defer rows.Close()
2572
2573 if rows.Next() {
2574 dbt.Error("unexpected row")
2575 }
2576
2577 if rows.NextResultSet() {
2578 dbt.Error("unexpected next result set")
2579 }
2580
2581 if err := rows.Err(); err != nil {
2582 dbt.Error("expected nil; got ", err)
2583 }
2584 })
2585}
2586
2587func TestExecMultipleResults(t *testing.T) {
2588 ctx := context.Background()

Callers

nothing calls this directly

Calls 6

mustQueryMethod · 0.80
CloseMethod · 0.45
NextMethod · 0.45
ErrorMethod · 0.45
NextResultSetMethod · 0.45

Tested by

no test coverage detected