-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
He Zhenxing wrote:
> Hi Mats
>
> Mats Kindahl wrote:
>> Hi Jason!
>>
>> The patch is formally correct, but since this code is called for each event, I
>> think it is more efficient and compact to add a member variable m_estimate, set
>> it to 0 when constructing the event, and then add the following code just after
>> unpack_current_row() in find_row() and write_row().
>>
>> if (m_estimate == 0) {
>> m_estimate= (m_rows_end - m_curr_row) / (m_curr_row_end - m_curr_row);
>> m_table->file->ha_start_bulk_insert(m_estimate);
>> }
>>
>
> Good, but I don't think we need to add this to find_row(), because
> m_table->file->ha_start_bulk_insert should only be called for inserts
Right, but I digged around a little, and there are start_bulk_delete() and
start_bulk_update() member functions available. They don't take any arguments,
but it could be good to call them at the right place as well (i.e., in the
do_before_row_operation() call). However, it is your decision if you want to
include it or not.
Just my few cents,
Mats Kindahl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIx5sju8G15bFGLesRAkQnAJ4/LDzBOnCAgx9j06uuBkU93zRO3ACfV1AZ
rw57LH7u3an+04m5P2FtYU4=
=TkSJ
-----END PGP SIGNATURE-----