DML write sets sql_mode to STRICT ALL TABLES

This commit is contained in:
Shlomi Noach 2016-08-23 11:58:52 +02:00
parent 1021a83ac0
commit 8b76d0e75b

View File

@ -870,7 +870,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 {