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

Merged the code of mwl 106 into the latest 5.3 with mwl 90 pushed.

Resolved all conflicts and failures.
This commit is contained in:
Igor Babaev
2011-06-04 19:56:06 -07:00
99 changed files with 4331 additions and 1089 deletions

View File

@ -9902,3 +9902,27 @@ void Field::set_datetime_warning(MYSQL_ERROR::enum_warning_level level,
set_warning(level, code, cuted_increment))
make_truncated_value_warning(thd, level, str, ts_type, 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);
}