Skip to content

Commit bb006fd

Browse files
committed
Merge pull request mysqljs#380 from refl/master
Fix tests with MySQL 5.7.9
2 parents d512f20 + 7ec062f commit bb006fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

driver_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ func TestFoundRows(t *testing.T) {
10181018

10191019
func TestStrict(t *testing.T) {
10201020
// ALLOW_INVALID_DATES to get rid of stricter modes - we want to test for warnings, not errors
1021-
relaxedDsn := dsn + "&sql_mode=ALLOW_INVALID_DATES"
1021+
relaxedDsn := dsn + "&sql_mode='ALLOW_INVALID_DATES,NO_AUTO_CREATE_USER'"
10221022
// make sure the MySQL version is recent enough with a separate connection
10231023
// before running the test
10241024
conn, err := MySQLDriver{}.Open(relaxedDsn)
@@ -1643,7 +1643,7 @@ func TestSqlInjection(t *testing.T) {
16431643

16441644
dsns := []string{
16451645
dsn,
1646-
dsn + "&sql_mode=NO_BACKSLASH_ESCAPES",
1646+
dsn + "&sql_mode='NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER'",
16471647
}
16481648
for _, testdsn := range dsns {
16491649
runTests(t, testdsn, createTest("1 OR 1=1"))
@@ -1673,7 +1673,7 @@ func TestInsertRetrieveEscapedData(t *testing.T) {
16731673

16741674
dsns := []string{
16751675
dsn,
1676-
dsn + "&sql_mode=NO_BACKSLASH_ESCAPES",
1676+
dsn + "&sql_mode='NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER'",
16771677
}
16781678
for _, testdsn := range dsns {
16791679
runTests(t, testdsn, testData)

0 commit comments

Comments
 (0)