List:Internals« Previous MessageNext Message »
From:Zardosht Kasheff Date:July 9 2009 10:01pm
Subject:Re: question on handler::start_bulk_insert
View as plain text  
Hello Sergei,

Thank you for your reply. However, I have just seen the following
steps result in a call to handler::start_bulk_insert and
handler::end_bulk_insert. The the value of rows in start_bulk_insert
was 1.

mysql> create table foo (a int, b int) engine = tokudb;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into foo values (1,1);

So it seems to be called here as well.

This is on 5.1.30.

-Zardosht


On Thu, Jul 9, 2009 at 5:56 PM, Sergei Golubchik<serg@stripped> wrote:
> Hi, Zardosht!
>
> On Jul 09, Zardosht Kasheff wrote:
>> Hello,
>>
>> Is the handler guaranteed to have calls to handler::write_row
>> surrounded by handler::start_bulk_insert and handler::end_bulk_insert?
>> Or is it possible for a call to write_row to occur without a call to
>> start_bulk_insert first.
>
> It is possible.
>
> INSERT t1 VALUES (1,2,3) -- should have no start_bulk_insert/end_bulk_insert
>
> "bulk_insert" is when more than one row is inserted, like
>
> INSERT ... VALUES (...),(...), ...
> INSERT ... SELECT
> LOAD DATA INFILE
>
> Regards / Mit vielen Grüßen,
> Sergei
>
> --
>   __  ___     ___ ____  __
>  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik
> <serg@stripped>
>  / /|_/ / // /\ \/ /_/ / /__  Principal Software Engineer/Server Architect
> /_/  /_/\_, /___/\___\_\___/  Sun Microsystems GmbH, HRB München
> 161028
>       <___/                
>  Sonnenallee 1, 85551 Kirchheim-Heimstetten
> Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
> Vorsitzender des Aufsichtsrates: Martin Häring
>
Thread
question on handler::start_bulk_insertZardosht Kasheff9 Jul
  • Re: question on handler::start_bulk_insertSergei Golubchik9 Jul
    • Re: question on handler::start_bulk_insertZardosht Kasheff10 Jul
      • Re: question on handler::start_bulk_insertSergei Golubchik10 Jul