summaryrefslogtreecommitdiff
path: root/storage/heap/ha_heap.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-26 22:25:38 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-26 22:25:38 +0100
commit10740939eb824bbd792352f654380e258edd7675 (patch)
treea4c68f331f0470b8bd30822de5938a6552f69738 /storage/heap/ha_heap.cc
parenta91c59c2affdebb4b34c2c8000b0b1648d43046d (diff)
parent44002a34e680c79c01df879b540458c2885e97e8 (diff)
downloadmariadb-git-10740939eb824bbd792352f654380e258edd7675.tar.gz
5.5 merge
Diffstat (limited to 'storage/heap/ha_heap.cc')
-rw-r--r--storage/heap/ha_heap.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 73dce174a09..5631d60a10a 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -215,7 +215,7 @@ void ha_heap::update_key_stats()
else
{
ha_rows hash_buckets= file->s->keydef[i].hash_buckets;
- uint no_records= hash_buckets ? (uint) (file->s->records/hash_buckets) : 2;
+ ha_rows no_records= hash_buckets ? (file->s->records/hash_buckets) : 2;
if (no_records < 2)
no_records= 2;
key->rec_per_key[key->user_defined_key_parts-1]= no_records;
@@ -244,6 +244,7 @@ int ha_heap::write_row(uchar * buf)
We can perform this safely since only one writer at the time is
allowed on the table.
*/
+ records_changed= 0;
file->s->key_stat_version++;
}
return res;
@@ -260,6 +261,7 @@ int ha_heap::update_row(const uchar * old_data, uchar * new_data)
We can perform this safely since only one writer at the time is
allowed on the table.
*/
+ records_changed= 0;
file->s->key_stat_version++;
}
return res;
@@ -276,6 +278,7 @@ int ha_heap::delete_row(const uchar * buf)
We can perform this safely since only one writer at the time is
allowed on the table.
*/
+ records_changed= 0;
file->s->key_stat_version++;
}
return res;
@@ -726,8 +729,8 @@ heap_prepare_hp_create_info(TABLE *table_arg, bool internal_table,
if (share->max_rows && share->max_rows < max_rows)
max_rows= share->max_rows;
- hp_create_info->max_records= (ulong) max_rows;
- hp_create_info->min_records= (ulong) share->min_rows;
+ hp_create_info->max_records= (ulong) MY_MIN(max_rows, ULONG_MAX);
+ hp_create_info->min_records= (ulong) MY_MIN(share->min_rows, ULONG_MAX);
hp_create_info->keys= share->keys;
hp_create_info->reclength= share->reclength;
hp_create_info->keydef= keydef;