On Wed, 2010-12-01 at 11:57 +0300, Sergey Vojtovich wrote:
> Hi Li-Bing,
> On Wed, Dec 01, 2010 at 03:29:27PM +0800, Libing Song wrote:
> > > What if simple_parser is not available?
> > > Did you try to remove mypluglib.so and run this test?
> > The test sources have_simple_parser.inc, so the whole test will be
> > skipped if mypluglib.so is not available.
> Right. AFAIR simple parser is not available on all PB2 platforms,
> I hope that's acceptable.
It is too bad, it is better there are some branches can run with this
> Since have_* scripts affect the whole test file, probably it is
> a good idea to move it's inclusion to the top of the test file.
> At least I would be very surprised if my test is skipped, but there
> is no appropriate requirement listed at the top of the test file.
Yes, I am preparing a new patch, in which the test for this patch
put in a separated test file.
> > > 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.
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.
> Sergey Vojtovich <svoj@stripped>
> MySQL AB, Software Engineer
> Izhevsk, Russia, www.mysql.com
MySQL Replication Team
Email : Li-Bing.Song@stripped
Skype : libing.song
MSN : slb_database@stripped
Phone : +86 010-6505-4020 ext. 319
Mobile: +86 138-1144-2038