List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:September 10 2008 12:02pm
Subject:Re: bzr commit into mysql-5.1 branch (hezx:2666) Bug#35843
View as plain text  
-----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-----
Thread
bzr commit into mysql-5.1 branch (hezx:2666) Bug#35843He Zhenxing9 Sep
  • Re: bzr commit into mysql-5.1 branch (hezx:2666) Bug#35843Mats Kindahl10 Sep
    • Re: bzr commit into mysql-5.1 branch (hezx:2666) Bug#35843He Zhenxing10 Sep
      • Re: bzr commit into mysql-5.1 branch (hezx:2666) Bug#35843Mats Kindahl10 Sep