How to prevent crashes connected with dropped tables during mysql import?
This is a big problem with the design of your system!  

You are apparently performing DDL on a running application. This is never a good idea. The one Open Source server which does support transactional DDL is PostgreSQL - from here:


  You can't recover from an add/drop on a database or tablespace, but
  all other catalog operations are reversible.


MySQL even in its latest version (as of 05/2018) - verion 8, doesn't support tranactional DDL - from here:


  Some statements cannot be rolled back. In general, these include data
  definition language (DDL) statements, such as those that create or
  drop databases, those that create, drop, or alter tables or stored
  routines.


This page goes on to say:


  You should design your transactions not to include such statements. If you issue a statement early in a transaction that
  cannot be rolled back, and then another statement later fails, the
  full effect of the transaction cannot be rolled back in such cases by
  issuing a ROLLBACK statement. [Emphasis mine]


What, exactly, will, or will not, be rolled back isn't specified in detail - bit of a lottery situation which will require lots of testing! I wouldn't open that can of worms if I were you!

Could you possibly expand expand on your question by letting us know why, exactly, you feel that you need to issue such commands against a running application and maybe we can help you find a more suitable alternative solution?