0

I have a system which runs quite heavy MySQL queries, and we'd like to provide a way of interrupting the queries through JDBC. Statement.cancel() seems like the way to go, and it effectively sends a KILL QUERY on a separate connection to the database. However, since we're dealing with MyISAM table, we don't have any transaction management for the operations.

I would be interested in knowing the effects a KILL QUERY has on a LOAD DATA INFILE statement, or on an INSERT.

It seems like LOAD DATA INFILE statements are bit riskier than your average INSERT, so I would like to know if killing the statement could leave the table in a corrupted state.

Thanks !

ahelix
  • 308
  • 1
  • 2
  • 13

1 Answers1

0
  • query will be killed;
  • changes will be rolled back.

No risk to make table corrupted.

ravnur
  • 2,772
  • 19
  • 28
  • Ah ! Now I realized I forgot an important detail: my question was for MyISAM and ARCHIVE tables, so the lack of transaction support means that it isn't possible to roll back the whole operation. – ahelix Feb 06 '13 at 09:23
  • i didn't try this option. I think table will not became corrupted anyway because of consistent writes but you'd better try on dev box. – ravnur Feb 06 '13 at 10:00