On Thu, Dec 02, 2010 at 12:44:00PM +0800, Libing Song wrote:
> > > > Also, being non-replication guy, I'm a bit confused: you set unsafe
> > > > warning flag, but you don't really mark statement unsafe? If it is
> > > > done implicitely, could you point me to that code?
> > > binlog_query() calls issue_unsafe_warnings(). issue_unsafe_warnings()
> > > checks this flag and then generates different unsafe warnings.
> > Right, it generates different unsafe warnings. But I don't see how it
> > marks statement unsafe.
> First, lex->set_stmt_unsafe() are called by yacc.yy and some functions
> (eg. uuid, rand)when they are initializing.
Right. But we don't call set_stmt_unsafe() for MATCH()?
> Second, after opening all tables related to a statement,
> decide_logging_format() are called to decide what binlog format should
> be used in current statement.
> decide_logging_format() will copy the unsafe flags marked by
> lex->set_stmt_unsafe to thd->binlog_unsafe_warning_flags if
> the statement has to be binlogged in statement format.
Please don't be blocked by this question. I'm just trying to educate
Could you correct me where I'm wrong:
I read bug report and I see that unsafe statements are to be logged
in row format if binlog_format=mixed or cause a warning to be generated
Also I see that it is suggested to mark MATCH() using plugin unsafe.
I read your patch and see that a warning is generated if binlog_format
I can see that you achieve it by setting binlog_unsafe_warning_flags.
But in mixed mode you still log MATCH() in statement format, because
binlog_stmt_flags is unaffected. It is contradicting to the requirement
listed in the bug report.
Probably it is a good idea to test mixed mode as well. At least to avoid
questions like this.
Sergey Vojtovich <svoj@stripped>
MySQL AB, Software Engineer
Izhevsk, Russia, www.mysql.com