• Kristofer Pettersson's avatar
    Bug#42108 Wrong locking for UPDATE with subqueries leads to broken statement · da9a5ef6
    Kristofer Pettersson authored
              replication
                  
    MySQL server uses wrong lock type (always TL_READ instead of
    TL_READ_NO_INSERT when appropriate) for tables used in
    subqueries of UPDATE statement. This leads in some cases to
    a broken replication as statements are written in the wrong
    order to the binlog.
    
    sql/sql_yacc.yy:
      * Set lock_option to either TL_READ_NO_INSERT or
        TL_READ for any sub-SELECT following UPDATE.
      * Changed line adjusted for parser identation
        rules; code begins at column 13.
    da9a5ef6
sql_yacc.yy 296 KB