Commit dd283b75 authored by Rich Prohaska's avatar Rich Prohaska

#263 enable bulk fetch for insert select sql commands

parent 0430a965
......@@ -4395,7 +4395,7 @@ int ha_tokudb::prepare_index_key_scan(const uchar * key, uint key_len) {
range_lock_grabbed = true;
range_lock_grabbed_null = index_key_is_null(table, tokudb_active_index, key, key_len);
doing_bulk_fetch = thd_sql_command(thd) == SQLCOM_SELECT || thd_sql_command(thd) == SQLCOM_CREATE_TABLE;
doing_bulk_fetch = thd_sql_command(thd) == SQLCOM_SELECT || thd_sql_command(thd) == SQLCOM_CREATE_TABLE || thd_sql_command(thd) == SQLCOM_INSERT_SELECT;
bulk_fetch_iteration = 0;
rows_fetched_using_bulk_fetch = 0;
error = 0;
......@@ -5694,11 +5694,8 @@ int ha_tokudb::prelock_range( const key_range *start_key, const key_range *end_k
goto cleanup;
}
//
// at this point, determine if we will be doing bulk fetch
// as of now, only do it if we are doing a select
//
doing_bulk_fetch = thd_sql_command(thd) == SQLCOM_SELECT || thd_sql_command(thd) == SQLCOM_CREATE_TABLE;
doing_bulk_fetch = thd_sql_command(thd) == SQLCOM_SELECT || thd_sql_command(thd) == SQLCOM_CREATE_TABLE || thd_sql_command(thd) == SQLCOM_INSERT_SELECT;
bulk_fetch_iteration = 0;
rows_fetched_using_bulk_fetch = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment