1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge of the mwl106 tree into the latest 5.3 tree.

Resolved conflicts. Adjusted some test results
This commit is contained in:
Igor Babaev
2010-09-23 08:10:53 -07:00
72 changed files with 4103 additions and 928 deletions

View File

@ -10492,3 +10492,27 @@ Field::set_datetime_warning(MYSQL_ERROR::enum_warning_level level, uint code,
field_name);
}
}
/*
@brief
Return possible keys for a field
@details
Return bit map of keys over this field which can be used by the range
optimizer. For a field of a generic table such keys are all keys that starts
from this field. For a field of a materialized derived table/view such keys
are all keys in which this field takes a part. This is less restrictive as
keys for a materialized derived table/view are generated on the fly from
present fields, thus the case when a field for the beginning of a key is
absent is impossible.
@return map of possible keys
*/
key_map Field::get_possible_keys()
{
DBUG_ASSERT(table->pos_in_table_list);
return (table->pos_in_table_list->is_materialized_derived() ?
part_of_key : key_start);
}