Hi, Konstantin!
On Mar 26, Konstantin Osipov wrote:
> * Guangbao Ni <gni@stripped> [09/03/12 16:21]:
> > 2846 Guangbao Ni 2009-03-12
> > BUG#42640 mysqld crashes when unsafe statements are executed
> (STRICT_TRANS_TABLES mode)
>
> The current implementation of the strict mode is an
> oversimplification: there is no such thing in the SQL standard as
> elevation of all warnings to errors.
>
> Certain conditions are always errors, and certain are always
> warnings.
>
> This oversimplification is the root cause of the grievance
> manifested in 42640..
...
> Please consider one of the solutions suggested above.
What about simply downgrading ER_BINLOG_UNSAFE_STATEMENT to a "note" ?
Notes aren't promoted to errors in the strict mode, in a sense notes are
"warnings which are never errors, even in a strict mode", so making
ER_BINLOG_UNSAFE_STATEMENT a note is correct here.
> > === modified file 'sql/sql_class.cc'
> > --- a/sql/sql_class.cc 2009-03-09 11:15:46 +0000
> > +++ b/sql/sql_class.cc 2009-03-12 18:10:28 +0000
> > @@ -3677,6 +3677,14 @@ int THD::binlog_query(THD::enum_binlog_q
> > MYSQL_ERRMSG_SIZE, query_arg);
> > binlog_flags|= BINLOG_FLAG_UNSAFE_STMT_PRINTED;
> > }
> > + /*
> > + A warning can be elevated a error when STRICT sql mode.
> > + But we don't want to elevate binlog warning to error here.
> > + */
> > + if (is_error())
> > + {
> > + clear_error();
> > + }
> > }
>
> Thanks,
>
> --
> kostja
>
> --
> MySQL Code Commits Mailing List
> For list archives: http://lists.mysql.com/commits
> To unsubscribe: http://lists.mysql.com/commits?unsub=1
>
Regards / Mit vielen Grüßen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring