database/sql — validation proof

Go’s own database/sql test suite, converted to C# by go2cs, built against the converted standard library, run under the Go-semantics test host, and compared verdict for verdict against a clean go test -json baseline of the same sources. This page is generated by the converter from that comparison — it is the evidence behind the database/sql row in Validated Test Packages.

Validated 2026-08-25 · converter e2182a59e

138 matched · 2 disclosed — Go 1.23.12, windows/amd64, converted package src/core/database/sql.

Verdicts

Test go test go2cs
TestBadDriver pass pass
TestBogusPreboundParameters pass pass
TestCloseConnBeforeStmts pass pass
TestCloseStmtBeforeRows pass pass
TestConcurrency pass pass
TestConcurrency/Exec pass pass
TestConcurrency/Query pass pass
TestConcurrency/Random pass pass
TestConcurrency/StmtExec pass pass
TestConcurrency/StmtQuery pass pass
TestConcurrency/TxExec pass pass
TestConcurrency/TxQuery pass pass
TestConcurrency/TxStmtExec pass pass
TestConcurrency/TxStmtQuery pass pass
TestConnExpiresFreshOutOfPool pass pass
TestConnExpiresFreshOutOfPool/expired=false,badReset=false pass pass
TestConnExpiresFreshOutOfPool/expired=false,badReset=true pass pass
TestConnExpiresFreshOutOfPool/expired=true,badReset=false pass pass
TestConnIsValid pass pass
TestConnMaxLifetime pass pass
TestConnQuery pass pass
TestConnRaw pass pass
TestConnRequestSet pass pass
TestConnRequestSet/add-delete pass pass
TestConnRequestSet/close-delete pass pass
TestConnRequestSet/get-take-many pass pass
TestConnRequestSet/take-before-delete pass pass
TestConnTx pass pass
TestConnectionLeak pass pass
TestContextCancelBetweenNextAndErr pass pass
TestContextCancelDuringRawBytesScan pass pass
TestContextCancelDuringRawBytesScan/bottom pass pass
TestContextCancelDuringRawBytesScan/go pass pass
TestContextCancelDuringRawBytesScan/nocancel pass pass
TestContextCancelDuringRawBytesScan/top pass pass
TestContextCancelDuringScan pass pass
TestConversions pass pass
TestCursorFake pass pass
TestDecimal pass pass
TestDecimal/bad-form pass pass
TestDecimal/diff pass pass
TestDecimal/same pass pass
TestDriverArgs pass pass
TestDriverArgsWrapsErrors pass pass
TestDriverArgsWrapsErrors/exec pass pass
TestDriverArgsWrapsErrors/query pass pass
TestDriverPanic pass pass
TestDrivers pass pass
TestErrBadConnReconnect pass pass
TestExec pass pass
TestGenericNullStringParam pass pass
TestGrabConnAllocs pass fail (disclosed)
TestInvalidNilValues pass pass
TestInvalidNilValues/int pass pass
TestInvalidNilValues/time.Time pass pass
TestIssue18429 pass pass
TestIssue18719 pass pass
TestIssue20160 pass pass
TestIssue20575 pass pass
TestIssue20622 pass pass
TestIssue20647 pass pass
TestIssue2542Deadlock pass pass
TestIssue4902 pass pass
TestIssue6081 pass pass
TestIssue6651 pass pass
TestManyErrBadConn pass pass
TestMaxIdleConns pass pass
TestMaxIdleTime pass pass
TestMaxIdleTime/1h0m0s pass pass
TestMaxIdleTime/1ms pass pass
TestMaxIdleTime/1ms#01 pass pass
TestMaxOpenConns pass pass
TestMaxOpenConnsOnBusy pass pass
TestMultiResultSetQuery pass pass
TestNamedValueChecker pass pass
TestNamedValueCheckerSkip pass pass
TestNilErrorAfterClose pass pass
TestNullBoolParam pass pass
TestNullByteParam pass pass
TestNullByteSlice pass pass
TestNullFloat64Param pass pass
TestNullInt16Param pass pass
TestNullInt32Param pass pass
TestNullInt64Param pass pass
TestNullString pass pass
TestNullStringParam pass pass
TestNullTimeParam pass pass
TestOpenConnector pass pass
TestOpenDB pass pass
TestParentStmtOutlivesTxStmt pass pass
TestPendingConnsAfterErr pass pass
TestPing pass pass
TestPointerParamsAndScans pass pass
TestPoolExhaustOnCancel pass pass
TestQuery pass pass
TestQueryContext pass pass
TestQueryContextWait pass pass
TestQueryExecContextOnly pass pass
TestQueryNamedArg pass pass
TestQueryRow pass pass
TestQueryRowClosingStmt pass pass
TestQueryRowNilScanDest pass pass
TestRawBytesAllocs pass fail (disclosed)
TestRawBytesReuse pass pass
TestRowErr pass pass
TestRowsCloseError pass pass
TestRowsCloseOrder pass pass
TestRowsColumnTypes pass pass
TestRowsColumns pass pass
TestRowsImplicitClose pass pass
TestRowsScanProperlyWrapsErrors pass pass
TestSimultaneousQueries pass pass
TestSingleOpenConn pass pass
TestStatementClose pass pass
TestStatementErrorAfterClose pass pass
TestStatementQueryRow pass pass
TestStatementQueryRowConcurrent pass pass
TestStats pass pass
TestStatsMaxIdleClosedTen pass pass
TestStatsMaxIdleClosedZero pass pass
TestStmtCloseDeps pass pass
TestStmtCloseOrder pass pass
TestTxCannotCommitAfterRollback pass pass
TestTxContextWait pass pass
TestTxContextWaitNoDiscard pass pass
TestTxEndBadConn pass pass
TestTxErrBadConn pass pass
TestTxPrepare pass pass
TestTxQuery pass pass
TestTxQueryInvalid pass pass
TestTxRollbackCommitErr pass pass
TestTxStmt pass pass
TestTxStmtClosedRePrepares pass pass
TestTxStmtDeadlock pass pass
TestTxStmtFromTxStmtRePrepares pass pass
TestTxStmtPreparedOnce pass pass
TestTypedString pass pass
TestUnsupportedOptions pass pass
TestUserDefinedBytes pass pass
TestValueConverters pass pass

Disclosed divergences

A disclosed divergence is a specific Go assertion the managed CLR provably cannot satisfy — not a skipped test and not a tolerance. Each one is pinned by exact failure signature in the package’s hand-owned go2cs_test_disclosures.json; a disclosed test that fails any other way is still a hard mismatch.

Test Class Pinned reason
TestGrabConnAllocs alloc-profile want-zero AllocsPerRun assert: four golib-counted objects per run where Go allocates none — the interior field pointers the emission mints to reach c.done, c.releaseConnOnce and c.closemu (Go’s &c.field is an address, not an allocation) plus the display class the sync.Once closure needs on every call, even though the cached releaseConnCache method value it installs is built once
TestRawBytesAllocs alloc-profile want-zero AllocsPerRun assert: fifteen golib-counted objects per run where Go allocates none — each convertAssign round materializes the managed backing for the formatted value and boxes the any-typed source, where Go’s escape analysis proves the temporaries non-escaping and appends into the pre-sized RawBytes in place

Excluded declarations

Declarations filtered from both sides of the comparison, and therefore not claimed above: Benchmark, Fuzz and Example declarations the converted host does not execute, plus any test requiring a capability the managed runtime does not provide — a testing member the host has not implemented, or a platform behavior it provably cannot reproduce. Each is named with the capability it needs.