• unknown's avatar
    Prevent reenabling logging by thread which tries to lock table used by bulk insert. · 094d92e2
    unknown authored
          Scenario of the BUG#40731 ("Maria: hang (probably in page cache) under concurrency"):
          T1: Disable logging for the table
          T1: Start inserting into the table
          T2: Tries to lock the table so waits.
          T2: Tries unlock and relock during the process see that the table has disabled logging and reenables it
          T1: Got DBUG_ASSERT because suddenly start use table with transaction switched on which is not expected during bulk insert
    
    storage/maria/ma_pagecache.c:
      Page type print added for debugging purposes.
    storage/maria/ma_recovery.c:
      Check that it was this thred which switched off logging (transactional mode).
    storage/maria/maria_def.h:
      Flag for controling which thread switched off transactiona mode for the table added.
    094d92e2
ma_pagecache.c 167 KB