~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/csv/ha_tina.cc

  • Committer: Brian Aker
  • Date: 2008-10-20 04:28:21 UTC
  • mto: (492.3.21 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: brian@tangent.org-20081020042821-rqqdrccuu8195k3y
Second pass of thd cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
308
308
  return(0);
309
309
}
310
310
 
311
 
bool ha_tina::check_and_repair(Session *thd)
 
311
bool ha_tina::check_and_repair(Session *session)
312
312
{
313
313
  HA_CHECK_OPT check_opt;
314
314
 
315
315
  check_opt.init();
316
316
 
317
 
  return(repair(thd, &check_opt));
 
317
  return(repair(session, &check_opt));
318
318
}
319
319
 
320
320
 
1256
1256
 
1257
1257
  SYNOPSIS
1258
1258
    repair()
1259
 
    thd         The thread, performing repair
 
1259
    session         The thread, performing repair
1260
1260
    check_opt   The options for repair. We do not use it currently.
1261
1261
 
1262
1262
  DESCRIPTION
1269
1269
         rows (after the first bad one) as well.
1270
1270
*/
1271
1271
 
1272
 
int ha_tina::repair(Session* thd,
 
1272
int ha_tina::repair(Session* session,
1273
1273
                    HA_CHECK_OPT* check_opt __attribute__((unused)))
1274
1274
{
1275
1275
  char repaired_fname[FN_REFLEN];
1309
1309
  /* Read the file row-by-row. If everything is ok, repair is not needed. */
1310
1310
  while (!(rc= find_current_row(buf)))
1311
1311
  {
1312
 
    thd_inc_row_count(thd);
 
1312
    session_inc_row_count(session);
1313
1313
    rows_repaired++;
1314
1314
    current_position= next_position;
1315
1315
  }
1415
1415
  Called by the database to lock the table. Keep in mind that this
1416
1416
  is an internal lock.
1417
1417
*/
1418
 
THR_LOCK_DATA **ha_tina::store_lock(Session *thd __attribute__((unused)),
 
1418
THR_LOCK_DATA **ha_tina::store_lock(Session *session __attribute__((unused)),
1419
1419
                                    THR_LOCK_DATA **to,
1420
1420
                                    enum thr_lock_type lock_type)
1421
1421
{
1467
1467
  return(0);
1468
1468
}
1469
1469
 
1470
 
int ha_tina::check(Session* thd,
 
1470
int ha_tina::check(Session* session,
1471
1471
                   HA_CHECK_OPT* check_opt __attribute__((unused)))
1472
1472
{
1473
1473
  int rc= 0;
1475
1475
  const char *old_proc_info;
1476
1476
  ha_rows count= share->rows_recorded;
1477
1477
 
1478
 
  old_proc_info= get_thd_proc_info(thd);
1479
 
  set_thd_proc_info(thd, "Checking table");
 
1478
  old_proc_info= get_session_proc_info(session);
 
1479
  set_session_proc_info(session, "Checking table");
1480
1480
  if (!(buf= (unsigned char*) my_malloc(table->s->reclength, MYF(MY_WME))))
1481
1481
    return(HA_ERR_OUT_OF_MEM);
1482
1482
 
1498
1498
  /* Read the file row-by-row. If everything is ok, repair is not needed. */
1499
1499
  while (!(rc= find_current_row(buf)))
1500
1500
  {
1501
 
    thd_inc_row_count(thd);
 
1501
    session_inc_row_count(session);
1502
1502
    count--;
1503
1503
    current_position= next_position;
1504
1504
  }
1506
1506
  free_root(&blobroot, MYF(0));
1507
1507
 
1508
1508
  free((char*)buf);
1509
 
  set_thd_proc_info(thd, old_proc_info);
 
1509
  set_session_proc_info(session, old_proc_info);
1510
1510
 
1511
1511
  if ((rc != HA_ERR_END_OF_FILE) || count)
1512
1512
  {