Merge pull request #191 from github/sql-mode-strict
DML write sets sql_mode to STRICT ALL TABLES
This commit is contained in:
commit
2a00abfc99
@ -871,7 +871,10 @@ func (this *Applier) ApplyDMLEventQuery(dmlEvent *binlog.BinlogDMLEvent) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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
|
return err
|
||||||
}
|
}
|
||||||
if _, err := tx.Exec(query, args...); err != nil {
|
if _, err := tx.Exec(query, args...); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user