diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-03-26 10:35:34 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-03-26 10:35:34 +0100 |
commit | d9f975d08bc4480109b172e1f9c3799a375c238d (patch) | |
tree | d3a2b8fca828d150b3b25b6b688b979f6336f355 /sql/log_event.cc | |
parent | a3f651d0f635df1a29d152c7088150b3ba144b72 (diff) | |
download | mariadb-git-d9f975d08bc4480109b172e1f9c3799a375c238d.tar.gz |
MDEV-26: Global transaction ID
Adjust full test suite to work with GTID.
Huge patch, mainly due to having to update .result file for all SHOW BINLOG
EVENTS and mysqlbinlog outputs, where the new GTID events pop up.
Everything was painstakingly checked to be still correct and valid .result
file updates.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 04d1118b835..9c41684eee4 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -6284,34 +6284,35 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) Write_on_release_cache::FLUSH_F); char buf[21]; - print_header(&cache, print_event_info, FALSE); - longlong10_to_str(seq_no, buf, 10); if (!print_event_info->short_form) - my_b_printf(&cache, "\tGTID %u-%u-%s", domain_id, server_id, buf); - my_b_printf(&cache, "\n"); - - if (!print_event_info->domain_id_printed || - print_event_info->domain_id != domain_id) { - my_b_printf(&cache, "/*!100001 SET @@session.gtid_domain_id=%u*/%s\n", - domain_id, print_event_info->delimiter); - print_event_info->domain_id= domain_id; - print_event_info->domain_id_printed= true; - } + print_header(&cache, print_event_info, FALSE); + longlong10_to_str(seq_no, buf, 10); + my_b_printf(&cache, "\tGTID %u-%u-%s\n", domain_id, server_id, buf); - if (!print_event_info->server_id_printed || - print_event_info->server_id != server_id) - { - my_b_printf(&cache, "/*!100001 SET @@session.server_id=%u*/%s\n", - server_id, print_event_info->delimiter); - print_event_info->server_id= server_id; - print_event_info->server_id_printed= true; - } + if (!print_event_info->domain_id_printed || + print_event_info->domain_id != domain_id) + { + my_b_printf(&cache, "/*!100001 SET @@session.gtid_domain_id=%u*/%s\n", + domain_id, print_event_info->delimiter); + print_event_info->domain_id= domain_id; + print_event_info->domain_id_printed= true; + } + + if (!print_event_info->server_id_printed || + print_event_info->server_id != server_id) + { + my_b_printf(&cache, "/*!100001 SET @@session.server_id=%u*/%s\n", + server_id, print_event_info->delimiter); + print_event_info->server_id= server_id; + print_event_info->server_id_printed= true; + } - my_b_printf(&cache, "/*!100001 SET @@session.gtid_seq_no=%s*/%s\n", - buf, print_event_info->delimiter); + my_b_printf(&cache, "/*!100001 SET @@session.gtid_seq_no=%s*/%s\n", + buf, print_event_info->delimiter); + } if (!(flags2 & FL_STANDALONE)) - my_b_printf(&cache, "BEGIN%s\n", print_event_info->delimiter); + my_b_printf(&cache, "BEGIN\n%s\n", print_event_info->delimiter); } #endif /* MYSQL_SERVER */ |