Quoting from the manual:
"With LOCAL, the default duplicate-key handling 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. IGNORE
is explained further later in this section."
On Tue, Mar 5, 2013 at 6:20 PM, Zardosht Kasheff <zardosht@stripped> wrote:
> So is my conclusion accurate that as far as the handler goes, load
> data local basically acts like load data ignore? If not, what are the
> On Fri, Mar 1, 2013 at 12:08 PM, Zardosht Kasheff <zardosht@stripped> wrote:
>> Here is a stack trace where for LOAD DATA LOCAL, we get a call to
>> handler::extra with operation set to HA_EXTRA_IGNORE_DUP_KEY
>> #0 ha_tokudb::extra (this=0x1aaf240,
>> operation=HA_EXTRA_IGNORE_DUP_KEY) at
>> #1 0x000000000084be8a in mysql_load (thd=0x1a14d20, ex=0x1acc190,
>> table_list=0x1acc218, fields_vars=..., set_fields=..., set_values=...,
>> handle_duplicates=DUP_ERROR, ignore=true,
>> read_file_from_client=true) at
>> #2 0x00000000005dcfb5 in mysql_execute_command (thd=0x1a14d20) at
>> #3 0x00000000005e32a6 in mysql_parse (thd=0x1a14d20,
>> rawbuf=0x1acbfd0 "load data local infile
>> '/nfs/tmcsrv/sysbench-mysqldump-50000000/sbtest.txt' into table
>> sbtest1 fields terminated by ',' enclosed by '\"'", length=135,
>> at /home/zardosht/dev/mysql-build/mysql-5.5.28/sql/sql_parse.cc:5627
>> #4 0x00000000005d7f0c in dispatch_command (command=COM_QUERY,
>> thd=0x1a14d20, packet=0x1ab1cd1 "", packet_length=135) at
>> #5 0x00000000005d729d in do_command (thd=0x1a14d20) at
>> #6 0x00000000006b2b49 in do_handle_one_connection (thd_arg=0x1a14d20)
>> at /home/zardosht/dev/mysql-build/mysql-5.5.28/sql/sql_connect.cc:840
>> #7 0x00000000006b2676 in handle_one_connection (arg=0x1a14d20) at
>> #8 0x000000310e60677d in start_thread () from /lib64/libpthread.so.0
>> #9 0x000000310dad325d in clone () from /lib64/libc.so.6
>> #10 0x0000000000000000 in ?? ()
>> On Fri, Mar 1, 2013 at 9:42 AM, Michael Widenius <monty@stripped>
>>>>>>>> "Zardosht" == Zardosht Kasheff <zardosht@stripped>
>>> Zardosht> As I understand it, LOAD DATA LOCAL acts basically like ignore.
>>> Zardosht> sets table->file->extra(HA_EXTRA_IGNORE_DUP_KEY).
>>> Where does it do that?
>>> (LOCAL should not have anything to do with IGNORE).
>>> The code we have in MariaDB 5.5 is:
>>> if (ignore ||
>>> handle_duplicates == DUP_REPLACE)
>>> This has nothing to do with LOCAL.
>>> Zardosht> What I am wondering is why would LOAD DATA LOCAL use more RSS
>>> Zardosht> LOAD DATA IGNORE for us, but not for InnoDB. Does anyone have
>>> Zardosht> theories?
>>> As LOCAL and IGNORE are independent flags that have nothing to do with
>>> each other, I can't answer your question.
>>> My previous answer should cover most things about using or not using IGNORE.
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe: http://lists.mysql.com/internals