~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Mats Kindahl
  • Date: 2008-08-25 11:54:47 UTC
  • mto: (489.1.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 372.
  • Revision ID: mats@mysql.com-20080825115447-tg73zkyjnldm7p4c
Hiding THD::proc_info field and providing a setter and getter.
Replacing use of swap_variables() in C++ code with std::swap().
Moving swap_variables() into C files where it is used.
Replacing some function-like macros with inline functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
880
880
    pthread_mutex_lock(&thd->mysys_var->mutex);
881
881
    thd->mysys_var->current_mutex= 0;
882
882
    thd->mysys_var->current_cond= 0;
883
 
    thd->proc_info=0;
 
883
    thd->set_proc_info(0);
884
884
    pthread_mutex_unlock(&thd->mysys_var->mutex);
885
885
  }
886
886
 
1731
1731
  const char *proc_info;
1732
1732
  thd->mysys_var->current_mutex= mutex;
1733
1733
  thd->mysys_var->current_cond= cond;
1734
 
  proc_info=thd->proc_info;
 
1734
  proc_info=thd->get_proc_info();
1735
1735
  thd_proc_info(thd, "Waiting for table");
1736
1736
  if (!thd->killed)
1737
1737
    (void) pthread_cond_wait(cond, mutex);
5464
5464
      {
5465
5465
        /* This can happen only for JOIN ... ON. */
5466
5466
        assert(table_ref->nested_join->join_list.elements == 2);
5467
 
        swap_variables(TABLE_LIST*, same_level_left_neighbor, cur_table_ref);
 
5467
        std::swap(same_level_left_neighbor, cur_table_ref);
5468
5468
      }
5469
5469
 
5470
5470
      /*
5508
5508
      back for 'mark_common_columns'.
5509
5509
    */
5510
5510
    if (table_ref_2->outer_join & JOIN_TYPE_RIGHT)
5511
 
      swap_variables(TABLE_LIST*, table_ref_1, table_ref_2);
 
5511
      std::swap(table_ref_1, table_ref_2);
5512
5512
    if (mark_common_columns(thd, table_ref_1, table_ref_2,
5513
5513
                            using_fields, &found_using_fields))
5514
5514
      goto err;
5519
5519
      same as of an equivalent LEFT JOIN.
5520
5520
    */
5521
5521
    if (table_ref_1->outer_join & JOIN_TYPE_RIGHT)
5522
 
      swap_variables(TABLE_LIST*, table_ref_1, table_ref_2);
 
5522
      std::swap(table_ref_1, table_ref_2);
5523
5523
    if (store_natural_using_join_columns(thd, table_ref, table_ref_1,
5524
5524
                                         table_ref_2, using_fields,
5525
5525
                                         found_using_fields))