This is a discussion on LOAD DATA is it transactional ? within the MySQL Database forums, part of the Database Forums category; Command LOAD DATA is it transactional ? What's happens if loading 1000 rows, some rows goes in error ? Thank You ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
That depends on the backend pluggable DB engine you are using.
For instance, innodb will cancel the entire transaction. MyISAM can be made to keep taking as many rows as it can read. HTH. ~ Duane Phillips. "Tony" <arcucci@gmail.com> wrote in message news:I61ef.37634$65.1135673@twister1.libero.it... > Command LOAD DATA is it transactional ? > > What's happens if loading 1000 rows, some rows goes in error ? > > Thank You in advance > |
|
|||
|
I should also add that you can set additional options on load (depending on
your version). See documentation on Load Data like this: "The REPLACE and IGNORE keywords control handling of input records that duplicate existing records on unique key values. If you specify REPLACE, input rows replace existing rows (in other words, rows that have the same value for a primary or unique index as an existing row)." And... "If you specify IGNORE, input rows that duplicate an existing row on a unique key value are skipped. If you don't specify either option, the behavior depends on whether or not the LOCAL keyword is specified. Without LOCAL, an error occurs when a duplicate key value is found, and the rest of the text file is ignored. With LOCAL, the default behavior is the same as if IGNORE is specified; this is because the server has no way to stop transmission of the file in the middle of the operation." HTH ~ Duane Phillips. "Duane Phillips" <askme@askme.askme> wrote in message news:16qdnc6QY4Y-uufenZ2dnUVZ_sOdnZ2d@giganews.com... > That depends on the backend pluggable DB engine you are using. > > For instance, innodb will cancel the entire transaction. MyISAM can be > made to keep taking as many rows as it can read. > > HTH. > > ~ Duane Phillips. > > "Tony" <arcucci@gmail.com> wrote in message > news:I61ef.37634$65.1135673@twister1.libero.it... >> Command LOAD DATA is it transactional ? >> >> What's happens if loading 1000 rows, some rows goes in error ? >> >> Thank You in advance >> > > |