_, err:=dbt.db.Exec("CREATE TABLE test (id INT NOT NULL ,data INT NOT NULL)")
1369
-
// Error 1193: Unknown system variable 'resultset_metadata' => skip test,
1370
-
// MySQL server version is too old
1371
-
maybeSkip(t, err, 1193)
1372
+
iferr==ErrNoOptionalResultSet {
1373
+
t.Skip("server does not support resultset metadata")
1374
+
} elseiferr!=nil {
1375
+
dbt.Fatal(err)
1376
+
}
1372
1377
dbt.mustExec("INSERT INTO test (id, data) VALUES (0, 0),(0, 0),(1, 0),(1, 0),(1, 1)")
1373
1378
1374
1379
row:=dbt.db.QueryRow("SELECT id, data FROM test WHERE id = 1")
Original file line number
Diff line number
Diff line change
@@ -17,19 +17,20 @@ import (
17
17
18
18
// Various errors the driver might return. Can change between driver versions.
19
19
var (
20
-
ErrInvalidConn=errors.New("invalid connection")
21
-
ErrMalformPkt=errors.New("malformed packet")
22
-
ErrNoTLS=errors.New("TLS requested but server does not support TLS")
23
-
ErrCleartextPassword=errors.New("this user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN")
24
-
ErrNativePassword=errors.New("this user requires mysql native password authentication")
25
-
ErrOldPassword=errors.New("this user requires old password authentication. If you still want to use it, please add 'allowOldPasswords=1' to your DSN. See also https://.com/go-sql-driver/mysql/wiki/old_passwords")
26
-
ErrUnknownPlugin=errors.New("this authentication plugin is not supported")
27
-
ErrOldProtocol=errors.New("MySQL server does not support required protocol 41+")
28
-
ErrPktSync=errors.New("commands out of sync. You can't run this command now")
29
-
ErrPktSyncMul=errors.New("commands out of sync. Did you run multiple statements at once?")
30
-
ErrPktTooLarge=errors.New("packet for query is too large. Try adjusting the 'max_allowed_packet' variable on the server")
ErrNoTLS=errors.New("TLS requested but server does not support TLS")
23
+
ErrCleartextPassword=errors.New("this user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN")
24
+
ErrNativePassword=errors.New("this user requires mysql native password authentication")
25
+
ErrOldPassword=errors.New("this user requires old password authentication. If you still want to use it, please add 'allowOldPasswords=1' to your DSN. See also https://.com/go-sql-driver/mysql/wiki/old_passwords")
26
+
ErrUnknownPlugin=errors.New("this authentication plugin is not supported")
27
+
ErrOldProtocol=errors.New("MySQL server does not support required protocol 41+")
28
+
ErrPktSync=errors.New("commands out of sync. You can't run this command now")
29
+
ErrPktSyncMul=errors.New("commands out of sync. Did you run multiple statements at once?")
30
+
ErrPktTooLarge=errors.New("packet for query is too large. Try adjusting the 'max_allowed_packet' variable on the server")
31
+
ErrBusyBuffer=errors.New("busy buffer")
32
+
ErrNoOptionalResultSet=errors.New("requested optional resultset metadata but server does not support")
0 commit comments