MCPcopy Create free account
hub / github.com/Percona-Lab/mysql_random_data_load / GetVersion

Function GetVersion

testutils/testutils.go:79–92  ·  view source on GitHub ↗
(tb testing.TB, db *sql.DB)

Source from the content-addressed store, hash-verified

77}
78
79func GetVersion(tb testing.TB, db *sql.DB) *version.Version {
80 var vs string
81 err := db.QueryRow("SELECT VERSION()").Scan(&vs)
82 if err != nil {
83 fmt.Printf("%s cannot get MySQL version: %s\n\n", caller(), err)
84 tb.FailNow()
85 }
86 v, err := version.NewVersion(vs)
87 if err != nil {
88 fmt.Printf("%s cannot get MySQL version: %s\n\n", caller(), err)
89 tb.FailNow()
90 }
91 return v
92}
93
94func GetMinorVersion(tb testing.TB, db *sql.DB) *version.Version {
95 var vs string

Callers

nothing calls this directly

Calls 2

callerFunction · 0.85
ScanMethod · 0.80

Tested by

no test coverage detected