mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
WL#3700: Handler API change: all index search methods - that is,
index_read(), index_read_idx(), index_read_last(), and records_in_range() - instead of 'uint keylen' argument take 'ulonglong keypart_map', a bitmap showing which keyparts are present in the key value. Fallback method is provided for handlers that are lagging behind.
This commit is contained in:
@ -10854,7 +10854,8 @@ int safe_index_read(JOIN_TAB *tab)
|
||||
TABLE *table= tab->table;
|
||||
if ((error=table->file->index_read(table->record[0],
|
||||
tab->ref.key_buff,
|
||||
tab->ref.key_length, HA_READ_KEY_EXACT)))
|
||||
tab_to_keypart_map(tab),
|
||||
HA_READ_KEY_EXACT)))
|
||||
return report_error(table, error);
|
||||
return 0;
|
||||
}
|
||||
@ -10992,7 +10993,8 @@ join_read_const(JOIN_TAB *tab)
|
||||
{
|
||||
error=table->file->index_read_idx(table->record[0],tab->ref.key,
|
||||
(byte*) tab->ref.key_buff,
|
||||
tab->ref.key_length,HA_READ_KEY_EXACT);
|
||||
tab_to_keypart_map(tab),
|
||||
HA_READ_KEY_EXACT);
|
||||
}
|
||||
if (error)
|
||||
{
|
||||
@ -11035,7 +11037,8 @@ join_read_key(JOIN_TAB *tab)
|
||||
}
|
||||
error=table->file->index_read(table->record[0],
|
||||
tab->ref.key_buff,
|
||||
tab->ref.key_length,HA_READ_KEY_EXACT);
|
||||
tab_to_keypart_map(tab),
|
||||
HA_READ_KEY_EXACT);
|
||||
if (error && error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE)
|
||||
return report_error(table, error);
|
||||
}
|
||||
@ -11063,7 +11066,8 @@ join_read_always_key(JOIN_TAB *tab)
|
||||
return -1;
|
||||
if ((error=table->file->index_read(table->record[0],
|
||||
tab->ref.key_buff,
|
||||
tab->ref.key_length,HA_READ_KEY_EXACT)))
|
||||
tab_to_keypart_map(tab),
|
||||
HA_READ_KEY_EXACT)))
|
||||
{
|
||||
if (error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE)
|
||||
return report_error(table, error);
|
||||
@ -11090,7 +11094,7 @@ join_read_last_key(JOIN_TAB *tab)
|
||||
return -1;
|
||||
if ((error=table->file->index_read_last(table->record[0],
|
||||
tab->ref.key_buff,
|
||||
tab->ref.key_length)))
|
||||
tab_to_keypart_map(tab))))
|
||||
{
|
||||
if (error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE)
|
||||
return report_error(table, error);
|
||||
@ -11631,7 +11635,7 @@ end_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
||||
group->buff[-1]= (char) group->field->is_null();
|
||||
}
|
||||
if (!table->file->index_read(table->record[1],
|
||||
join->tmp_table_param.group_buff,0,
|
||||
join->tmp_table_param.group_buff, ~(ulonglong)0,
|
||||
HA_READ_KEY_EXACT))
|
||||
{ /* Update old record */
|
||||
restore_record(table,record[1]);
|
||||
|
Reference in New Issue
Block a user