diff options
author | Neha Kumari <neha.n.kumari@oracle.com> | 2016-08-05 12:17:11 +0530 |
---|---|---|
committer | Neha Kumari <neha.n.kumari@oracle.com> | 2016-08-05 12:17:11 +0530 |
commit | 22eec68941f3acbd9033e7fb33d10c63e6b388da (patch) | |
tree | f4cfbdbc4adb27f787bc883893b801a39a182527 /support-files/mysql.server.sh | |
parent | 194776ce00f6fea37551ea25584798f78b0ad24b (diff) | |
download | mariadb-git-22eec68941f3acbd9033e7fb33d10c63e6b388da.tar.gz |
Bug#23540182:MYSQLBINLOG DOES NOT FREE THE EXISTING CONNECTION BEFORE OPENING NEW REMOTE ONE
It happens when you are trying to read two or more log files from a
remote server using mysqlbinlog utility.
The reason for this is no matching mysql_close() that concludes the
life time of 'mysql' struct describing connection to the server.
This happens when mysqlbinlog is invoked with connecting to the server
and requesting more than one binlog file. In such case
dump_remote_log_entries() keeps calling safe_connect() per eachfile,
never caring to invoke mysql_close(). Only the final safe_connect()'s
allocation effect are cleaned by the base code.
That is with 2 files there's one 'mysql' connection descriptor struct
uncleaned/deallocated.
We are backporting the bug 21255763 (pushed in mysql-trunk)
in the earlier version of MySQL starting from 5.5 to 5.7.
which was pushed in mysql-trunk.
Fix:
Invoke mysql_close() just before mysql_init() in safe_connect()
defined in mysqlbinlog.cc. That makes possibly previously used 'mysql' be
reclaimed prior a new one is allocated.
Diffstat (limited to 'support-files/mysql.server.sh')
0 files changed, 0 insertions, 0 deletions