• unknown's avatar
    BUG#29152 - INSERT DELAYED does not use concurrent_insert on slave · 8018d6ac
    unknown authored
    INSERT DELAYED on a replication slave was converted to regular INSERT,
    whereas it should try concurrent INSERT first.
    
    With this patch we try to convert delayed insert to concurrent insert on
    a replication slave. If it is impossible for some reason, we fall back to
    regular insert.
    
    No test case for this fix. I do not see anything indicating this is
    regression - we behave this way since Nov 2000.
    
    
    sql/sql_insert.cc:
      If we're executing INSERT DELAYED on a replication slave, we're upgrading
      lock type to TL_WRITE as we need to ensure serial execution of queries on
      the slave.
      
      OTOH if we're executing regular INSERT on a replication slave, we're
      trying TL_WRITE_CONCURRENT_INSERT first, and if we may not use it, we
      fall back to TL_WRITE.
      
      Fixed INSERT DELAYED on a replication slave to behave the same way as
      regular INSERT, that is to try TL_WRITE_CONCURRENT_INSERT first.
    8018d6ac
sql_insert.cc 106 KB