~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_delete.cc

  • Committer: Brian Aker
  • Date: 2008-08-16 22:34:15 UTC
  • mto: This revision was merged to the branch mainline in revision 346.
  • Revision ID: brian@tangent.org-20080816223415-n24esdpfcqi4pwpy
Refactor around classes. TABLE_LIST has been factored out of table.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
{
37
37
  bool          will_batch;
38
38
  int           error, loc_error;
39
 
  TABLE         *table;
 
39
  Table         *table;
40
40
  SQL_SELECT    *select=0;
41
41
  READ_RECORD   info;
42
42
  bool          using_limit=limit != HA_POS_ERROR;
537
537
    if (tab->table->map & tables_to_delete_from)
538
538
    {
539
539
      /* We are going to delete from this table */
540
 
      TABLE *tbl=walk->table=tab->table;
 
540
      Table *tbl=walk->table=tab->table;
541
541
      walk= walk->next_local;
542
542
      /* Don't use KEYREAD optimization on this table */
543
543
      tbl->no_keyread=1;
571
571
  }
572
572
  for (;walk ;walk= walk->next_local)
573
573
  {
574
 
    TABLE *table=walk->table;
 
574
    Table *table=walk->table;
575
575
    *tempfiles_ptr++= new Unique (refpos_order_cmp,
576
576
                                  (void *) table->file,
577
577
                                  table->file->ref_length,
587
587
       table_being_deleted;
588
588
       table_being_deleted= table_being_deleted->next_local)
589
589
  {
590
 
    TABLE *table= table_being_deleted->table;
 
590
    Table *table= table_being_deleted->table;
591
591
    table->no_keyread=0;
592
592
  }
593
593
 
609
609
       del_table;
610
610
       del_table= del_table->next_local, secure_counter++)
611
611
  {
612
 
    TABLE *table= del_table->table;
 
612
    Table *table= del_table->table;
613
613
 
614
614
    /* Check if we are using outer join and we didn't find the row */
615
615
    if (table->status & (STATUS_NULL_ROW | STATUS_DELETED))
732
732
       table_being_deleted= table_being_deleted->next_local, counter++)
733
733
  { 
734
734
    ha_rows last_deleted= deleted;
735
 
    TABLE *table = table_being_deleted->table;
 
735
    Table *table = table_being_deleted->table;
736
736
    if (tempfiles[counter]->get(table))
737
737
    {
738
738
      local_error=1;
827
827
 
828
828
 
829
829
/***************************************************************************
830
 
  TRUNCATE TABLE
 
830
  TRUNCATE Table
831
831
****************************************************************************/
832
832
 
833
833
/*
846
846
{
847
847
  HA_CREATE_INFO create_info;
848
848
  char path[FN_REFLEN];
849
 
  TABLE *table;
 
849
  Table *table;
850
850
  bool error;
851
851
  uint path_length;
852
852