~atcurtis/sakila-server/mysql-5.1-antony.1

« back to all changes in this revision

Viewing changes to sql/handler.cc

  • Committer: Antony Curtis
  • Date: 2008-07-08 21:02:50 UTC
  • Revision ID: atcurtis@dhcp-172-29-58-124.smo.corp.google.com-20080708210250-zkznwk4nee5l7w37
Remove remaining partition code.
Fixup tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3206
3206
 
3207
3207
 
3208
3208
/**
3209
 
  Change partitions: public interface.
3210
 
 
3211
 
  @sa handler::change_partitions()
3212
 
*/
3213
 
 
3214
 
int
3215
 
handler::ha_change_partitions(HA_CREATE_INFO *create_info,
3216
 
                     const char *path,
3217
 
                     ulonglong *copied,
3218
 
                     ulonglong *deleted,
3219
 
                     const uchar *pack_frm_data,
3220
 
                     size_t pack_frm_len)
3221
 
{
3222
 
  mark_trx_read_write();
3223
 
 
3224
 
  return change_partitions(create_info, path, copied, deleted,
3225
 
                           pack_frm_data, pack_frm_len);
3226
 
}
3227
 
 
3228
 
 
3229
 
/**
3230
 
  Drop partitions: public interface.
3231
 
 
3232
 
  @sa handler::drop_partitions()
3233
 
*/
3234
 
 
3235
 
int
3236
 
handler::ha_drop_partitions(const char *path)
3237
 
{
3238
 
  mark_trx_read_write();
3239
 
 
3240
 
  return drop_partitions(path);
3241
 
}
3242
 
 
3243
 
 
3244
 
/**
3245
 
  Rename partitions: public interface.
3246
 
 
3247
 
  @sa handler::rename_partitions()
3248
 
*/
3249
 
 
3250
 
int
3251
 
handler::ha_rename_partitions(const char *path)
3252
 
{
3253
 
  mark_trx_read_write();
3254
 
 
3255
 
  return rename_partitions(path);
3256
 
}
3257
 
 
3258
 
 
3259
 
/**
3260
 
  Optimize partitions: public interface.
3261
 
 
3262
 
  @sa handler::optimize_partitions()
3263
 
*/
3264
 
 
3265
 
int
3266
 
handler::ha_optimize_partitions(THD *thd)
3267
 
{
3268
 
  mark_trx_read_write();
3269
 
 
3270
 
  return optimize_partitions(thd);
3271
 
}
3272
 
 
3273
 
 
3274
 
/**
3275
 
  Analyze partitions: public interface.
3276
 
 
3277
 
  @sa handler::analyze_partitions()
3278
 
*/
3279
 
 
3280
 
int
3281
 
handler::ha_analyze_partitions(THD *thd)
3282
 
{
3283
 
  mark_trx_read_write();
3284
 
 
3285
 
  return analyze_partitions(thd);
3286
 
}
3287
 
 
3288
 
 
3289
 
/**
3290
 
  Check partitions: public interface.
3291
 
 
3292
 
  @sa handler::check_partitions()
3293
 
*/
3294
 
 
3295
 
int
3296
 
handler::ha_check_partitions(THD *thd)
3297
 
{
3298
 
  mark_trx_read_write();
3299
 
 
3300
 
  return check_partitions(thd);
3301
 
}
3302
 
 
3303
 
 
3304
 
/**
3305
 
  Repair partitions: public interface.
3306
 
 
3307
 
  @sa handler::repair_partitions()
3308
 
*/
3309
 
 
3310
 
int
3311
 
handler::ha_repair_partitions(THD *thd)
3312
 
{
3313
 
  mark_trx_read_write();
3314
 
 
3315
 
  return repair_partitions(thd);
3316
 
}
3317
 
 
3318
 
 
3319
 
/**
3320
3209
  Tell the storage engine that it is allowed to "disable transaction" in the
3321
3210
  handler. It is a hint that ACID is not required - it is used in NDB for
3322
3211
  ALTER TABLE, for example, when data are copied to temporary table.
3400
3289
}
3401
3290
 
3402
3291
 
3403
 
void handler::get_dynamic_partition_info(PARTITION_INFO *stat_info,
3404
 
                                         uint part_id)
3405
 
{
3406
 
  info(HA_STATUS_CONST | HA_STATUS_TIME | HA_STATUS_VARIABLE |
3407
 
       HA_STATUS_NO_LOCK);
3408
 
  stat_info->records=              stats.records;
3409
 
  stat_info->mean_rec_length=      stats.mean_rec_length;
3410
 
  stat_info->data_file_length=     stats.data_file_length;
3411
 
  stat_info->max_data_file_length= stats.max_data_file_length;
3412
 
  stat_info->index_file_length=    stats.index_file_length;
3413
 
  stat_info->delete_length=        stats.delete_length;
3414
 
  stat_info->create_time=          stats.create_time;
3415
 
  stat_info->update_time=          stats.update_time;
3416
 
  stat_info->check_time=           stats.check_time;
3417
 
  stat_info->check_sum=            0;
3418
 
  if (table_flags() & (ulong) HA_HAS_CHECKSUM)
3419
 
    stat_info->check_sum= checksum();
3420
 
  return;
3421
 
}
3422
 
 
3423
 
 
3424
3292
/****************************************************************************
3425
3293
** Some general functions that isn't in the handler class
3426
3294
****************************************************************************/