He Zhenxing wrote:
> Hi Mats
>
> I found that there is no ha_start/end_bulk_* functions for update and
> delete as insert, and the default implementation for start_bulk_delete
> will fail the server in debug mode, so now I'd rather not to include
> these function calls.
Strange. OK, let's not include it then. I'll make a note to look up why there is
a failure.
Best wishes,
Mats Kindahl
>
> Mats Kindahl wrote:
>> Hi Jason!
>>
>> The patch looks good, but I would suggest to add a call to start_bulk_delete()
>> and start_bulk_update() at the appropriate places. They don't take an argument,
>> so there is nothing to compute for that.
>>
>> Just my few cents,
>> Mats Kindahl
>>
>> He Zhenxing wrote:
>>> #At file:///media/sda3/work/mysql/bzrwork/b35843/5.1-rpl/
>>>
>>> 2666 He Zhenxing 2008-09-10
>>> BUG#35843 Slow replication slave when using partitioned myisam table
>>>
>>> In order to improve the performance when replicating to partitioned
>>> myisam tables with row-based format, the number of rows of current
>>> rows log event is estimated and used to setup storage engine for bulk
>>> inserts.
>>> modified:
>>> sql/log_event.cc
>>>
>>> === modified file 'sql/log_event.cc'
>>> --- a/sql/log_event.cc 2008-08-06 10:41:27 +0000
>>> +++ b/sql/log_event.cc 2008-09-10 09:13:58 +0000
>>> @@ -7488,7 +7488,6 @@ Write_rows_log_event::do_before_row_oper
>>> */
>>> }
>>>
>>> - m_table->file->ha_start_bulk_insert(0);
>>> /*
>>> We need TIMESTAMP_NO_AUTO_SET otherwise ha_write_row() will not use
> fill
>>> any TIMESTAMP column with data from the row but instead will use
>>> @@ -7627,7 +7626,16 @@ Rows_log_event::write_row(const Relay_lo
>>>
>>> /* unpack row into table->record[0] */
>>> error= unpack_current_row(rli); // TODO: how to handle errors?
>>> -
>>> + if (m_curr_row == m_rows_buf)
>>> + {
>>> + /* this is the first row to be inserted, we estimate the rows with
>>> + the size of the first row and use that value to initialize
>>> + storage engine for bulk insertion */
>>> + ulong estimated_rows= (m_rows_end - m_curr_row) / (m_curr_row_end -
> m_curr_row);
>>> + m_table->file->ha_start_bulk_insert(estimated_rows);
>>> + }
>>> +
>>> +
>>> #ifndef DBUG_OFF
>>> DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
>>> DBUG_PRINT_BITSET("debug", "write_set = %s", table->write_set);
>>>
>>>
>>
>> --
>> MySQL Code Commits Mailing List
>> For list archives: http://lists.mysql.com/commits
>> To unsubscribe: http://lists.mysql.com/commits?unsub=1
>