1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge dator6.(none):/home/mikael/mysql_clones/clean-mysql-5.1

into  dator6.(none):/home/mikael/mysql_clones/bug18198


mysql-test/t/partition_hash.test:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/item.h:
  manual merge
sql/item_cmpfunc.h:
  manual merge
sql/item_func.h:
  manual merge
sql/item_strfunc.h:
  manual merge
sql/item_timefunc.h:
  manual merge
sql/item_xmlfunc.h:
  manual merge
sql/partition_info.cc:
  manual merge
sql/sql_partition.cc:
  manual merge
This commit is contained in:
unknown
2007-06-13 16:03:18 +02:00
25 changed files with 649 additions and 206 deletions

View File

@ -2869,6 +2869,8 @@ uint32 get_partition_id_range_for_endpoint(partition_info *part_info,
}
if (unsigned_flag)
part_func_value-= 0x8000000000000000ULL;
if (left_endpoint && !include_endpoint)
part_func_value++;
while (max_part_id > min_part_id)
{
loc_part_id= (max_part_id + min_part_id + 1) >> 1;
@ -3292,13 +3294,16 @@ static uint32 get_sub_part_id_from_key(const TABLE *table,uchar *buf,
uint32 part_id;
DBUG_ENTER("get_sub_part_id_from_key");
key_restore(buf, (uchar*)key_spec->key, key_info, key_spec->length);
if (likely(rec0 == buf))
{
key_restore(buf, (uchar*)key_spec->key, key_info, key_spec->length);
part_id= part_info->get_subpartition_id(part_info);
}
else
{
Field **part_field_array= part_info->subpart_field_array;
set_field_ptr(part_field_array, buf, rec0);
key_restore(buf, (uchar*)key_spec->key, key_info, key_spec->length);
part_id= part_info->get_subpartition_id(part_info);
set_field_ptr(part_field_array, rec0, buf);
}
@ -3335,14 +3340,17 @@ bool get_part_id_from_key(const TABLE *table, uchar *buf, KEY *key_info,
longlong func_value;
DBUG_ENTER("get_part_id_from_key");
key_restore(buf, (uchar*)key_spec->key, key_info, key_spec->length);
if (likely(rec0 == buf))
{
key_restore(buf, (uchar*)key_spec->key, key_info, key_spec->length);
result= part_info->get_part_partition_id(part_info, part_id,
&func_value);
}
else
{
Field **part_field_array= part_info->part_field_array;
set_field_ptr(part_field_array, buf, rec0);
key_restore(buf, (uchar*)key_spec->key, key_info, key_spec->length);
result= part_info->get_part_partition_id(part_info, part_id,
&func_value);
set_field_ptr(part_field_array, rec0, buf);
@ -3382,14 +3390,17 @@ void get_full_part_id_from_key(const TABLE *table, uchar *buf,
longlong func_value;
DBUG_ENTER("get_full_part_id_from_key");
key_restore(buf, (uchar*)key_spec->key, key_info, key_spec->length);
if (likely(rec0 == buf))
{
key_restore(buf, (uchar*)key_spec->key, key_info, key_spec->length);
result= part_info->get_partition_id(part_info, &part_spec->start_part,
&func_value);
}
else
{
Field **part_field_array= part_info->full_part_field_array;
set_field_ptr(part_field_array, buf, rec0);
key_restore(buf, (uchar*)key_spec->key, key_info, key_spec->length);
result= part_info->get_partition_id(part_info, &part_spec->start_part,
&func_value);
set_field_ptr(part_field_array, rec0, buf);