LOAD DATA is it transactional ?

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 ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-14-2005
Tony
 
Posts: n/a
Default LOAD DATA is it transactional ?

Command LOAD DATA is it transactional ?

What's happens if loading 1000 rows, some rows goes in error ?

Thank You in advance


Reply With Quote
  #2 (permalink)  
Old 11-15-2005
Duane Phillips
 
Posts: n/a
Default Re: LOAD DATA is it transactional ?

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
>



Reply With Quote
  #3 (permalink)  
Old 11-16-2005
Duane Phillips
 
Posts: n/a
Default Re: LOAD DATA is it transactional ?

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
>>

>
>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:19 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0