Must use thd_test_options() instead of thd->variables.option_bits. refs #1964
Don't use thd->lex->type, and SQLCOM_FLUSH in handler.close() means only "FLASH TABLE". refs #1964
Fix column "_i" is erroneously treated as a special column "_id". refs #2085
Reported by Alexander Barkov. Thanks!
Remove unused variable. refs #1964