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