• Guilhem Bichot's avatar
    Fix for BUG#36319 "Maria: table is not empty but DELETE and SELECT find no rows": · a0aa81f9
    Guilhem Bichot authored
    _ma_scan_block_record() has "while (likely(bits))" where bits is ulonglong, so was cast to long
    which lost most significant bits (32-bit linux), and test yielded false.
    
    include/my_global.h:
      It's too easy to think that because "if (some_longlong)" works as intended, "if (likely(longlong))" will work too,
      though it does not. Making likely() cast to bool.
    mysql-test/r/maria2.result:
      Result. Before fixing the bug, 810 was 812 and 0 was 812 (DELETE and SELECT found no rows
      though they were there).
    mysql-test/t/maria2.test:
      Testcase for the bug. maria.test is huge now, so starting a second test file instead.
    a0aa81f9
maria2.result 387 Bytes