Skip to content

Commit 8b76d0e

Browse files
author
Shlomi Noach
committed
DML write sets sql_mode to STRICT ALL TABLES
1 parent 1021a83 commit 8b76d0e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

go/logic/applier.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,10 @@ func (this *Applier) ApplyDMLEventQuery(dmlEvent *binlog.BinlogDMLEvent) error {
870870
if err != nil {
871871
return err
872872
}
873-
if _, err := tx.Exec("SET SESSION time_zone = '+00:00'"); err != nil {
873+
if _, err := tx.Exec(`SET
874+
SESSION time_zone = '+00:00',
875+
sql_mode = CONCAT(@@session.sql_mode, ',STRICT_ALL_TABLES')
876+
`); err != nil {
874877
return err
875878
}
876879
if _, err := tx.Exec(query, args...); err != nil {

0 commit comments

Comments
 (0)