Merge pull request #191 from github/sql-mode-strict

DML write sets sql_mode to STRICT ALL TABLES
This commit is contained in:
Shlomi Noach 2016-08-25 08:23:44 +02:00 committed by GitHub
commit 2a00abfc99

View File

@ -871,7 +871,10 @@ func (this *Applier) ApplyDMLEventQuery(dmlEvent *binlog.BinlogDMLEvent) error {
if err != nil {
return err
}
if _, err := tx.Exec("SET SESSION time_zone = '+00:00'"); err != nil {
if _, err := tx.Exec(`SET
SESSION time_zone = '+00:00',
sql_mode = CONCAT(@@session.sql_mode, ',STRICT_ALL_TABLES')
`); err != nil {
return err
}
if _, err := tx.Exec(query, args...); err != nil {