vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.42k stars 2.08k forks source link

Adapt Vitess to MySQL deprecation of `WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS` #14611

Closed shlomi-noach closed 9 months ago

shlomi-noach commented 9 months ago

Per MySQL 8.2.0 release notes:

Incompatible Change: The WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS() SQL function, deprecated in MySQL 8.0 (see Changes in MySQL 8.0.18 (2019-10-14, General Availability)), has been removed; attempting to invoke it now causes a syntax error. Use WAIT_FOR_EXECUTED_GTID_SET() instead. (WL #13180)

Both 5.7 docs and 8.0 docs suggest that WAIT_FOR_EXECUTED_GTID_SET should be used, instead. In vitess, we never actually use the channel parameter, so for Vitess the usage is identical for both.

mattlord commented 9 months ago

Re-opening this as we had to revert the original changes because the results from the two functions are inverted and it led to errant PRSs.

We should still do this work ASAP, but some additional slight refactoring should also be done so that e.g. we handle the results as 0 (success) and non-zero (failure) values like unix exit code values -- this way the results will be compatible across versions (and MariaDB).