@@ -1018,7 +1018,7 @@ func TestFoundRows(t *testing.T) {
1018
1018
1019
1019
func TestStrict (t * testing.T ) {
1020
1020
// 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' "
1022
1022
// make sure the MySQL version is recent enough with a separate connection
1023
1023
// before running the test
1024
1024
conn , err := MySQLDriver {}.Open (relaxedDsn )
@@ -1643,7 +1643,7 @@ func TestSqlInjection(t *testing.T) {
1643
1643
1644
1644
dsns := []string {
1645
1645
dsn ,
1646
- dsn + "&sql_mode=NO_BACKSLASH_ESCAPES" ,
1646
+ dsn + "&sql_mode=' NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER' " ,
1647
1647
}
1648
1648
for _ , testdsn := range dsns {
1649
1649
runTests (t , testdsn , createTest ("1 OR 1=1" ))
@@ -1673,7 +1673,7 @@ func TestInsertRetrieveEscapedData(t *testing.T) {
1673
1673
1674
1674
dsns := []string {
1675
1675
dsn ,
1676
- dsn + "&sql_mode=NO_BACKSLASH_ESCAPES" ,
1676
+ dsn + "&sql_mode=' NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER' " ,
1677
1677
}
1678
1678
for _ , testdsn := range dsns {
1679
1679
runTests (t , testdsn , testData )
0 commit comments