~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/handler.cc

  • Committer: Brian Aker
  • Date: 2008-07-05 17:02:05 UTC
  • Revision ID: brian@tangent.org-20080705170205-ezff9is4e7hpa3x2
Conversion of handler type.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
KEY_CREATE_INFO default_key_create_info= { HA_KEY_ALG_UNDEF, 0, {NullS,0}, {NullS,0} };
43
43
 
44
44
/* number of entries in handlertons[] */
45
 
ulong total_ha= 0;
 
45
uint32_t total_ha= 0;
46
46
/* number of storage engines (from handlertons[]) that support 2pc */
47
 
ulong total_ha_2pc= 0;
 
47
uint32_t total_ha_2pc= 0;
48
48
/* size of savepoint storage area (see ha_init) */
49
 
ulong savepoint_alloc_size= 0;
 
49
uint32_t savepoint_alloc_size= 0;
50
50
 
51
51
static const LEX_STRING sys_table_aliases[]=
52
52
{
467
467
    binary log (which is considered a transaction-capable storage engine in
468
468
    counting total_ha)
469
469
  */
470
 
  opt_using_transactions= total_ha>(ulong)opt_bin_log;
 
470
  opt_using_transactions= total_ha>(uint32_t)opt_bin_log;
471
471
  savepoint_alloc_size+= sizeof(SAVEPOINT);
472
472
  DBUG_RETURN(error);
473
473
}
1426
1426
  /* commit_list and tc_heuristic_recover cannot be set both */
1427
1427
  DBUG_ASSERT(info.commit_list==0 || tc_heuristic_recover==0);
1428
1428
  /* if either is set, total_ha_2pc must be set too */
1429
 
  DBUG_ASSERT(info.dry_run || total_ha_2pc>(ulong)opt_bin_log);
 
1429
  DBUG_ASSERT(info.dry_run || total_ha_2pc>(uint32_t)opt_bin_log);
1430
1430
 
1431
 
  if (total_ha_2pc <= (ulong)opt_bin_log)
 
1431
  if (total_ha_2pc <= (uint32_t)opt_bin_log)
1432
1432
    DBUG_RETURN(0);
1433
1433
 
1434
1434
  if (info.commit_list)
1442
1442
    rollback all pending transactions, without risking inconsistent data
1443
1443
  */
1444
1444
 
1445
 
  DBUG_ASSERT(total_ha_2pc == (ulong) opt_bin_log+1); // only InnoDB and binlog
 
1445
  DBUG_ASSERT(total_ha_2pc == (uint32_t) opt_bin_log+1); // only InnoDB and binlog
1446
1446
  tc_heuristic_recover= TC_HEURISTIC_RECOVER_ROLLBACK; // forcing ROLLBACK
1447
1447
  info.dry_run=false;
1448
1448
#endif
2077
2077
    */
2078
2078
    DBUG_PRINT("info",("auto_increment: nr: %lu cannot honour "
2079
2079
                       "auto_increment_offset: %lu",
2080
 
                       (ulong) nr, variables->auto_increment_offset));
 
2080
                       (uint32_t) nr, variables->auto_increment_offset));
2081
2081
    return nr;
2082
2082
  }
2083
2083
  if (variables->auto_increment_increment == 1)
2272
2272
    }
2273
2273
  }
2274
2274
 
2275
 
  DBUG_PRINT("info",("auto_increment: %lu", (ulong) nr));
 
2275
  DBUG_PRINT("info",("auto_increment: %lu", (uint32_t) nr));
2276
2276
 
2277
2277
  if (unlikely(table->next_number_field->store((longlong) nr, true)))
2278
2278
  {
3364
3364
  if (!key_cache->key_cache_inited)
3365
3365
  {
3366
3366
    pthread_mutex_lock(&LOCK_global_system_variables);
3367
 
    ulong tmp_buff_size= (ulong) key_cache->param_buff_size;
 
3367
    uint32_t tmp_buff_size= (uint32_t) key_cache->param_buff_size;
3368
3368
    uint tmp_block_size= (uint) key_cache->param_block_size;
3369
3369
    uint division_limit= key_cache->param_division_limit;
3370
3370
    uint age_threshold=  key_cache->param_age_threshold;
4271
4271
bool DsMrr_impl::get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags,
4272
4272
                                         uint *buffer_size, COST_VECT *cost)
4273
4273
{
4274
 
  ulong max_buff_entries, elem_size;
 
4274
  uint32_t max_buff_entries, elem_size;
4275
4275
  ha_rows rows_in_full_step, rows_in_last_step;
4276
4276
  uint n_full_steps;
4277
4277
  double index_read_cost;