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
In MySQL, when executing an ordered query such as:
SELECT last_insert_id(col)
FROM some_table
ORDER BY some_col;
the session’s LAST_INSERT_ID gets set to the value from the final row returned. Currently, Vitess does not guarantee that the last row sets LAST_INSERT_ID, resulting in a discrepancy compared to native MySQL behavior.
Steps to Reproduce
Run an ordered query that includes LAST_INSERT_ID(x) in its select list.
Observe that MySQL’s last-insert-id value is always set to the last row, whereas Vitess may not set it in a predictable way.
The text was updated successfully, but these errors were encountered:
Description
In MySQL, when executing an ordered query such as:
the session’s
LAST_INSERT_ID
gets set to the value from the final row returned. Currently, Vitess does not guarantee that the last row setsLAST_INSERT_ID
, resulting in a discrepancy compared to native MySQL behavior.Steps to Reproduce
LAST_INSERT_ID(x)
in its select list.last-insert-id
value is always set to the last row, whereas Vitess may not set it in a predictable way.The text was updated successfully, but these errors were encountered: