You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can an option be exposed in connect() to set the connection capability flag for CLIENT_FOUND_ROWS? Currently, lua-resty-mysql sets the flag by default.
My use case is when I use INSERT INTO... ON DUPLICATE KEY UPDATE... form. Not setting CLIENT_ROWS_FOUND lets me know whether the row was upserted into the DB or no change has happened.
With ON DUPLICATE KEY UPDATE, the affected-rows value per row is 1 if the row is inserted as a new row, 2 if an existing row is updated, and 0 if an existing row is set to its current values. If you specify the CLIENT_FOUND_ROWS flag to the mysql_real_connect() C API function when connecting to mysqld, the affected-rows value is 1 (not 0) if an existing row is set to its current values.
The text was updated successfully, but these errors were encountered:
Can an option be exposed in
connect()
to set the connection capability flag forCLIENT_FOUND_ROWS
? Currently,lua-resty-mysql
sets the flag by default.My use case is when I use
INSERT INTO... ON DUPLICATE KEY UPDATE...
form. Not settingCLIENT_ROWS_FOUND
lets me know whether the row was upserted into the DB or no change has happened.From mysql documentation:
The text was updated successfully, but these errors were encountered: