However, if I just move the mark_columns_used_by_index() outside of the if-statement, I get this error with tests:
At line 287: query 'DELETE t1 FROM t1,t2 WHERE t1.c1=0 AND t1.c2=0' failed: 126: Incorrect key file for table './test/t1.MYI'; try to repair it
will need to investigate.
However, if I just move the mark_columns_ used_by_ index() outside of the if-statement, I get this error with tests:
At line 287: query 'DELETE t1 FROM t1,t2 WHERE t1.c1=0 AND t1.c2=0' failed: 126: Incorrect key file for table './test/t1.MYI'; try to repair it
will need to investigate.