Currently, the CSV storage engine (ha_tina) doesn't have it's 'records' value set properly. This causes issues such as BUG#13406. In this bug, delete_all_rows returns '2' all the time, reguardless of how many rows there were in the table. Also, other variables such as 'deleted' are not ever set to a correct value. What's needed to have these values persist is a meta file, as implemented for the Archive storage engine (ha_archive). This meta file keeps track of the number of rows in the table, as well as determine if the table was closed properly or not.