2

I am inserting data into the table with mysql load data local infile statement. my csv file contains 50000 rows.

My question is suppose load data infile stament has inserted 30000 rows and at that time power failure or exception has occurred. In this case will mysql automatically rollback this transaction or there will be 30000 rows into the table.

dynamic
  • 46,985
  • 55
  • 154
  • 231
Lokesh Harjani
  • 119
  • 1
  • 9

1 Answers1

0

It mostly depends which engine you are using.

  • Remember that MyISAM doesn't support transactions, so with MyISAM you will find in the database all rows inserted up to that moment

  • With InnoDB instead, it will rollback so you will find no rows inserted.

dynamic
  • 46,985
  • 55
  • 154
  • 231