58
// Inserts and Replaces are applied identically, but in sequence.
59
if len(tc.ReplaceRows) > 0 {
61
>
s.NoError(err)
62
>
affected, err := res.RowsAffected()
63
>
s.NoError(err)
64
>
65
>
// We set clientFoundRows to true in our MySQL session, which makes the result count
66
>
// for updates not useful for comparison here, as rows that have been updated
67
>
// are double-counted in `INSERT ... ON DUPLICATE KEY UPDATE` statements:
68
>
//
69
>
// https://dev.mysql.com/doc/refman/8.4/en/information-functions.html#function_row-count
70
>
//
71
>
// See common/persistence/sql/sqlplugin/mysql/session/session.go
72
>
if !strings.Contains(strings.ToLower(s.T().Name()), "mysql") {
73
s.Equal(int64(len(tc.ReplaceRows)), affected)
74
}