Commit 98cc7a8e authored by Michael Widenius's avatar Michael Widenius

Fixed compiler warnings

parent 3294f6c3
......@@ -4643,6 +4643,7 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
double roru_index_costs;
ha_rows roru_total_records;
double roru_intersect_part= 1.0;
ulong n_child_scans;
DBUG_ENTER("get_best_disjunct_quick");
DBUG_PRINT("info", ("Full table scan cost: %g", read_time));
......@@ -4659,7 +4660,7 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
}
}
size_t n_child_scans= imerge->trees_next - imerge->trees;
n_child_scans= imerge->trees_next - imerge->trees;
if (!n_child_scans)
DBUG_RETURN(NULL);
......@@ -4877,8 +4878,8 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
(TIME_FOR_COMPARE_ROWID * M_LN2) +
get_sweep_read_cost(param, roru_total_records);
DBUG_PRINT("info", ("ROR-union: cost %g, %d members", roru_total_cost,
n_child_scans));
DBUG_PRINT("info", ("ROR-union: cost %g, %lu members",
roru_total_cost, n_child_scans));
TRP_ROR_UNION* roru;
if (roru_total_cost < read_time)
{
......
......@@ -85,8 +85,9 @@ static my_bool print_cached_tables_callback(TDC_element *element,
while ((entry= it++))
{
THD *in_use= entry->in_use;
printf("%-14.14s %-32s%6ld%8ld%6d %s\n",
entry->s->db.str, entry->s->table_name.str, element->version,
printf("%-14.14s %-32s%6lu%8ld%6d %s\n",
entry->s->db.str, entry->s->table_name.str,
(ulong) element->version,
in_use ? (long) in_use->thread_id : (long) 0,
entry->db_stat ? 1 : 0,
in_use ? lock_descriptions[(int)entry->reginfo.lock_type] :
......@@ -106,7 +107,8 @@ static void print_cached_tables(void)
tdc_iterate(0, (my_hash_walk_action) print_cached_tables_callback, NULL, true);
printf("\nCurrent refresh version: %ld\n", tdc_refresh_version());
printf("\nCurrent refresh version: %ld\n",
(long) tdc_refresh_version());
fflush(stdout);
/* purecov: end */
return;
......
......@@ -1459,7 +1459,7 @@ int BLKFAM::ReadBuffer(PGLOBAL g)
// Read the entire next block
n = fread(To_Buf, 1, (size_t)BlkLen, Stream);
if (n == BlkLen) {
if ((size_t) n == (size_t) BlkLen) {
// ReadBlks++;
num_read++;
Rbuf = (CurBlk == Block - 1) ? Last : Nrec;
......
......@@ -570,9 +570,10 @@ rec_get_offsets_func(
case REC_STATUS_SUPREMUM:
/* infimum or supremum record */
ut_ad(rec_get_heap_no_new(rec)
== (rec_get_status(rec) == REC_STATUS_INFIMUM
? PAGE_HEAP_NO_INFIMUM
: PAGE_HEAP_NO_SUPREMUM));
== ulint(rec_get_status(rec)
== REC_STATUS_INFIMUM
? PAGE_HEAP_NO_INFIMUM
: PAGE_HEAP_NO_SUPREMUM));
n = 1;
break;
default:
......
......@@ -332,8 +332,8 @@ int ma_checkpoint_init(ulong interval)
res= 1;
else if (interval > 0)
{
compile_time_assert(sizeof(void *) >= sizeof(ulong));
size_t intv= interval;
compile_time_assert(sizeof(void *) >= sizeof(ulong));
if ((res= mysql_thread_create(key_thread_checkpoint,
&checkpoint_control.thread, NULL,
ma_checkpoint_background,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment