summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@macbook.local>2007-09-21 10:15:16 +0200
committerunknown <gkodinov/kgeorge@macbook.local>2007-09-21 10:15:16 +0200
commit92771001b3ac1b29bd3587e05bae93b3a35cb030 (patch)
treec0646efb7b78935b17aa1ecf56230f83916fb8cd /storage
parentc9f5a087f5d0a789286aed8dded9d5813cbf1bb7 (diff)
downloadmariadb-git-92771001b3ac1b29bd3587e05bae93b3a35cb030.tar.gz
fixed type conversion warnings revealed by bug 30639
Diffstat (limited to 'storage')
-rw-r--r--storage/federated/ha_federated.cc6
-rw-r--r--storage/heap/ha_heap.cc2
-rw-r--r--storage/innobase/handler/ha_innodb.cc2
-rw-r--r--storage/myisam/ha_myisam.cc2
-rw-r--r--storage/myisam/mi_write.c2
-rw-r--r--storage/myisam/sort.c4
6 files changed, 9 insertions, 9 deletions
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index edcd1127dbd..3fc17e18e76 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -2795,15 +2795,15 @@ int ha_federated::info(uint flag)
stats.records= (ha_rows) my_strtoll10(row[4], (char**) 0,
&error);
if (row[5] != NULL)
- stats.mean_rec_length= (ha_rows) my_strtoll10(row[5], (char**) 0, &error);
+ stats.mean_rec_length= (ulong) my_strtoll10(row[5], (char**) 0, &error);
stats.data_file_length= stats.records * stats.mean_rec_length;
if (row[12] != NULL)
- stats.update_time= (ha_rows) my_strtoll10(row[12], (char**) 0,
+ stats.update_time= (time_t) my_strtoll10(row[12], (char**) 0,
&error);
if (row[13] != NULL)
- stats.check_time= (ha_rows) my_strtoll10(row[13], (char**) 0,
+ stats.check_time= (time_t) my_strtoll10(row[13], (char**) 0,
&error);
}
/*
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 4934792de80..601d4612dda 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -197,7 +197,7 @@ void ha_heap::update_key_stats()
else
{
ha_rows hash_buckets= file->s->keydef[i].hash_buckets;
- uint no_records= hash_buckets ? file->s->records/hash_buckets : 2;
+ uint no_records= hash_buckets ? (uint) (file->s->records/hash_buckets) : 2;
if (no_records < 2)
no_records= 2;
key->rec_per_key[key->key_parts-1]= no_records;
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 267ebc5bb1e..bf5e6ddb1c6 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -5765,7 +5765,7 @@ ha_innobase::info(
table->key_info[i].rec_per_key[j]=
rec_per_key >= ~(ulong) 0 ? ~(ulong) 0 :
- rec_per_key;
+ (ulong) rec_per_key;
}
index = dict_table_get_next_index_noninline(index);
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index bc6e5706c21..ca4c40547ee 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -1461,7 +1461,7 @@ void ha_myisam::start_bulk_insert(ha_rows rows)
DBUG_ENTER("ha_myisam::start_bulk_insert");
THD *thd= current_thd;
ulong size= min(thd->variables.read_buff_size,
- table->s->avg_row_length*rows);
+ (ulong) (table->s->avg_row_length*rows));
DBUG_PRINT("info",("start_bulk_insert: rows %lu size %lu",
(ulong) rows, size));
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index 719008d3513..70ba7a4588a 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -987,7 +987,7 @@ int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows)
DBUG_RETURN(0);
if (rows && rows*total_keylength < cache_size)
- cache_size=rows;
+ cache_size= (ulong)rows;
else
cache_size/=total_keylength*16;
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c
index 27e4bd37af7..2146a8d16cb 100644
--- a/storage/myisam/sort.c
+++ b/storage/myisam/sort.c
@@ -141,7 +141,7 @@ int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages,
if ((records < UINT_MAX32) &&
((my_off_t) (records + 1) *
(sort_length + sizeof(char*)) <= (my_off_t) memavl))
- keys= records+1;
+ keys= (uint)records+1;
else
do
{
@@ -349,7 +349,7 @@ pthread_handler_t thr_find_all_keys(void *arg)
sort_keys= (uchar **) NULL;
memavl= max(sort_param->sortbuff_size, MIN_SORT_MEMORY);
- idx= sort_param->sort_info->max_records;
+ idx= (uint)sort_param->sort_info->max_records;
sort_length= sort_param->key_length;
maxbuffer= 1;