diff options
author | unknown <Dao-Gang.Qu@sun.com> | 2009-08-29 16:52:22 +0800 |
---|---|---|
committer | unknown <Dao-Gang.Qu@sun.com> | 2009-08-29 16:52:22 +0800 |
commit | f32c08bd0ca20d23e95ca46912044d48282cfd6f (patch) | |
tree | 7b9f786af53e5a6e82eb856d81565f2687e89823 /strings | |
parent | dc7106f5cae48d59ec6d30ad289d085e82f4bd7c (diff) | |
download | mariadb-git-f32c08bd0ca20d23e95ca46912044d48282cfd6f.tar.gz |
Bug #44331 Restore of database with events produces warning in replication
If an EVENT is created without the DEFINER clause set explicitly or with it set
to CURRENT_USER, the master and slaves become inconsistent. This issue stems from
the fact that in both cases, the DEFINER is set to the CURRENT_USER of the current
thread. On the master, the CURRENT_USER is the mysqld's user, while on the slave,
the CURRENT_USER is empty for the SQL Thread which is responsible for executing
the statement.
To fix the problem, we do what follows. If the definer is not set explicitly,
a DEFINER clause is added when writing the query into binlog; if 'CURRENT_USER' is
used as the DEFINER, it is replaced with the value of the current user before
writing to binlog.
mysql-test/suite/rpl/r/rpl_create_if_not_exists.result:
Updated the result file after fixing bug#44331
mysql-test/suite/rpl/r/rpl_drop_if_exists.result:
Updated the result file after fixing bug#44331
mysql-test/suite/rpl/r/rpl_events.result:
Test result of Bug#44331
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
Updated the result file after fixing bug#44331
mysql-test/suite/rpl/t/rpl_events.test:
Added test to verify if the definer is consistent between master and slave
when the event is created without the DEFINER clause set explicitly or the
DEFINER is set to CURRENT_USER
sql/events.cc:
The "create_query_string" function is added to create a new query string
for removing executable comments.
sql/sql_yacc.yy:
The remember_name token was added for recording the offset of EVENT_SYM.
Diffstat (limited to 'strings')
0 files changed, 0 insertions, 0 deletions