Syntax:
WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS(gtid_set[, timeout])

Wait until the slave SQL thread has executed all of the transactions
whose global transaction identifiers are contained in gtid_set (see
http://dev.mysql.com/doc/refman/5.6/en/replication-gtids-concepts.html,
for a definition of "GTID sets"), or until timeout seconds have
elapsed, whichever occurs first. timeout is optional; the default
timeout is 0 seconds, in which case the master simply waits until all
of the transactions in the GTID set have been executed.

Prior to MySQL 5.6.9, WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS() was named
SQL_THREAD_WAIT_AFTER_GTIDS(). (Bug #14775984)

For more information, see
http://dev.mysql.com/doc/refman/5.6/en/replication-gtids.html.

URL: http://dev.mysql.com/doc/refman/5.6/en/gtid-functions.html

