-
unknown authored
a table with TRANSACTIONAL=x needs to still have it after TRUNCATE. No testcase, but without this fix, the frm and the Maria table got "out of sync" in this case: create table t1 (a int) row_format=page transactional=0; truncate table t1; After TRUNCATE, the Maria table (not the frm) was transactional (thus logging records, which is wrong). * fix for non-closed file at end of "maria_chk -r" sql/table.cc: "transactionality" needs to be preserved when truncating. It's behind a if() to not cancel the hack added to mysql_truncate() today for temporary Maria tables. storage/maria/ha_maria.cc: question for Monty (he also has a big mail from me on the same subject) storage/maria/ma_check.c: question for Monty (likely bugs) storage/maria/ma_create.c: debugging info storage/maria/ma_open.c: fix for datafile left open at end of "maria_chk -r": ma_open_datafile() happens after _ma_bitmap_init(), it sets dfile.file so needs to set share->bitmap.file.file too (they are copies of each other). Otherwise it breaks how closing of files works in BLOCK_RECORD (which is that info.dfile.file is not closed but share->bitmap.file.file is closed): not setting share->bitmap.file.file can lead to forgetting to close a file or closing a wrong file.
be50e337