diff options
author | Nuno Carvalho <nuno.carvalho@oracle.com> | 2012-04-20 22:25:59 +0100 |
---|---|---|
committer | Nuno Carvalho <nuno.carvalho@oracle.com> | 2012-04-20 22:25:59 +0100 |
commit | ca33df20942cc50f8038e9cd0ecc846330ebc8ce (patch) | |
tree | 3e90fc7337b5e4526065135b09f053c737c88ffa /sql/log.h | |
parent | 5203d9bb98bc4696b916317045216de1ee55c663 (diff) | |
download | mariadb-git-ca33df20942cc50f8038e9cd0ecc846330ebc8ce.tar.gz |
BUG#13979418: SHOW BINLOG EVENTS MAY CRASH THE SERVER
The function mysql_show_binlog_events has a local stack variable
'LOG_INFO linfo;', which is assigned to thd->current_linfo, however
this variable goes out of scope and is destroyed before clean
thd->current_linfo.
The problem is solved by moving 'LOG_INFO linfo;' to function scope.
Diffstat (limited to 'sql/log.h')
-rw-r--r-- | sql/log.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/log.h b/sql/log.h index 81342f6e696..9ed5db04e87 100644 --- a/sql/log.h +++ b/sql/log.h @@ -130,6 +130,11 @@ extern TC_LOG_DUMMY tc_log_dummy; class Relay_log_info; +/* + Note that we destroy the lock mutex in the desctructor here. + This means that object instances cannot be destroyed/go out of scope, + until we have reset thd->current_linfo to NULL; + */ typedef struct st_log_info { char log_file_name[FN_REFLEN]; |