Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Support for tracking session information [rt.cpan.org #119122] #209

Open
mbeijen opened this issue Nov 15, 2017 · 1 comment
Open

Comments

@mbeijen
Copy link
Contributor

mbeijen commented Nov 15, 2017

Migrated from rt.cpan.org#119122 (status was 'open')

Requestors:

From [email protected] on 2016-12-04 12:19:21:

Hello,

In MySQL 5.7 it is possible to enable tracking of certain session
attributes.

These are the global variables which control that:
session_track_gtids
session_track_schema
session_track_state_change
session_track_system_variables

From the MySQL C API these can be used to get access to the data:
mysql_session_track_get_first()
mysql_session_track_get_next()

The main use case I see is to insert a record on a master and then get
the GTID back which then
can be used with WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS() on the replica to
ensure the row did
replicate to the replica.

The other way of doing this would be to @@global.gtid_executed, but that
needs an extra roundtrip.

So it would be nice if DBD::mysql would expose the session tracking data.

https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html
https://dev.mysql.com/doc/refman/5.7/en/mysql-session-track-get-first.html
https://dev.mysql.com/doc/refman/5.7/en/mysql-session-track-get-next.html
https://dev.mysql.com/doc/refman/5.7/en/gtid-functions.html#function_wait-until-sql-thread-after-gtids

Daniël

From [email protected] on 2016-12-12 20:55:31:

Pull requests welcome!

https://github.com/perl5-dbi/DBD-mysql
@dveeden
Copy link
Collaborator

dveeden commented Jan 12, 2018

Related to: #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants