~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/ha_myisam.cc

  • Committer: Jay Pipes
  • Date: 2009-02-04 15:44:25 UTC
  • mfrom: (829 drizzle)
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090204154425-th8xfk2ujz2y8xwg
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
766
766
  param.testflag= ((check_opt->flags & ~(T_EXTEND)) |
767
767
                   T_SILENT | T_FORCE_CREATE | T_CALC_CHECKSUM |
768
768
                   (check_opt->flags & T_EXTEND ? T_REP : T_REP_BY_SORT));
769
 
  param.sort_buffer_length=  sort_buffer_size;
 
769
  param.sort_buffer_length=  (size_t)sort_buffer_size;
770
770
  start_records=file->state->records;
771
771
  while ((error=repair(session,param,0)) && param.retry_repair)
772
772
  {
812
812
  param.op_name= "optimize";
813
813
  param.testflag= (check_opt->flags | T_SILENT | T_FORCE_CREATE |
814
814
                   T_REP_BY_SORT | T_STATISTICS | T_SORT_INDEX);
815
 
  param.sort_buffer_length= sort_buffer_size;
 
815
  param.sort_buffer_length= (size_t)sort_buffer_size;
816
816
  if ((error= repair(session,param,1)) && param.retry_repair)
817
817
  {
818
818
    errmsg_printf(ERRMSG_LVL_WARN, "Warning: Optimize table got errno %d on %s.%s, retrying",
856
856
  param.using_global_keycache = 1;
857
857
  param.session= session;
858
858
  param.out_flag= 0;
859
 
  param.sort_buffer_length= sort_buffer_size;
 
859
  param.sort_buffer_length= (size_t)sort_buffer_size;
860
860
  strcpy(fixed_name,file->filename);
861
861
 
862
862
  // Don't lock tables if we have used LOCK Table
1125
1125
    param.testflag= (T_SILENT | T_REP_BY_SORT | T_QUICK |
1126
1126
                     T_CREATE_MISSING_KEYS);
1127
1127
    param.myf_rw&= ~MY_WAIT_IF_FULL;
1128
 
    param.sort_buffer_length=  sort_buffer_size;
 
1128
    param.sort_buffer_length=  (size_t)sort_buffer_size;
1129
1129
    param.stats_method= (enum_mi_stats_method)session->variables.myisam_stats_method;
1130
1130
    if ((error= (repair(session,param,0) != HA_ADMIN_OK)) && param.retry_repair)
1131
1131
    {
1216
1216
    if (!file->bulk_insert &&
1217
1217
        (!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT))
1218
1218
    {
1219
 
      mi_init_bulk_insert(file, session->variables.bulk_insert_buff_size, rows);
 
1219
      mi_init_bulk_insert(file,
 
1220
                          (size_t)session->variables.bulk_insert_buff_size,
 
1221
                          rows);
1220
1222
    }
1221
1223
 
1222
1224
  return;
1885
1887
static DRIZZLE_SYSVAR_ULONGLONG(sort_buffer_size, sort_buffer_size,
1886
1888
                                PLUGIN_VAR_RQCMDARG,
1887
1889
                                N_("The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE."),
1888
 
                                NULL, NULL, 8192*1024, 1024, UINT64_MAX, 0);
 
1890
                                NULL, NULL, 8192*1024, 1024, SIZE_MAX, 0);
1889
1891
 
1890
1892
extern uint32_t data_pointer_size;
1891
1893
static DRIZZLE_SYSVAR_UINT(data_pointer_size, data_pointer_size,