• MySQL Build Team's avatar
    Backport into build-200906240007-5.1.34sp1 · cf1f35a1
    MySQL Build Team authored
    > ------------------------------------------------------------
    > revno: 2852.2.1
    > revision-id: gni@mysql.com-20090403182157-de6ecrtzlgvpl5mk
    > parent: timothy.smith@sun.com-20090402083720-b7i3jr4dmvwjakcj
    > committer: Guangbao Ni <gni@mysql.com>
    > branch nick: bugteam-5.1-bug42640
    > timestamp: Fri 2009-04-03 18:21:57 +0000
    > message:
    >   BUG#42640 mysqld crashes when unsafe statements are executed (STRICT_TRANS_TABLESmode)
    >   
    >   Mysql server crashes because unsafe statements warning is wrongly elevated to error,
    >   which is set the error status of Diagnostics_area of the thread in THD::binlog_query().
    >   Yet the caller believes that binary logging shouldn't touch the status, so it will
    >   set the status also later by my_ok(), my_error() or my_message() seperately
    >   according to the execution result of the statement or transaction.
    >   But the status of Diagnostics_area of the thread is allowed to set only once.
    >   
    >   Fixed to clear the error wrongly set by binary logging, but keep the warning message.
    cf1f35a1
binlog_unsafe.test 11.1 KB