• Sven Sandberg's avatar
    BUG#49222: Mark RAND() as unsafe · 94946c68
    Sven Sandberg authored
    Problem: When RAND() is binlogged in statement mode, the seed is
    binlogged too, so the replication slave generates the same
    sequence of random numbers. This makes replication work in many
    cases, but not in all cases: the order of rows is not guaranteed
    for, e.g., UPDATE or INSERT...SELECT statements, so the row data
    will be different if master and slave retrieve the rows in
    different orders.
    Fix: Mark RAND() as unsafe. It will generate a warning if
    binlog_format=STATEMENT and switch to row-logging if
    binlog_format=ROW.
    94946c68
rpl_trigger.test 11.9 KB