• Sven Sandberg's avatar
    BUG#39934: Slave stops for engine that only support row-based logging · 931ac1d7
    Sven Sandberg authored
    This is a post-push fix addressing review requests and
    problems with extra warnings.
    
    Problem 1: The sub-statement where an unsafe warning was detected was
    printed as part of the warning. This was ok for statements that
    were unsafe due to, e.g., calls to UUID(), but did not make
    sense for statements that were unsafe because there was more than
    one autoincrement column (unsafeness in this case comes from the
    combination of several sub-statements).
    Fix 1: Instead of printing the sub-statement, print an explanation
    of why the statement is unsafe.
    
    Problem 2:
    When a recursive construct (i.e., stored proceure, stored
    function, trigger, view, prepared statement) contained several
    sub-statements, and at least one of them was unsafe, there would be
    one unsafeness warning per sub-statement - even for safe
    sub-statements.
    Fix 2:
    Ensure that each type of warning is printed at most once, by
    remembering throughout the execution of the statement which types
    of warnings have been printed.
    931ac1d7
binlog_unsafe.test 18.6 KB