~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_update.cc

  • Committer: Brian Aker
  • Date: 2009-06-08 22:21:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1058.
  • Revision ID: brian@gaz-20090608222127-gazmq4pzrq49dvhn
This is a large number of refactors against the Session class for its
ownership of of open_tables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
 
143
143
  for ( ; ; )
144
144
  {
145
 
    if (open_tables(session, &table_list, &table_count, 0))
 
145
    if (session->open_tables_from_list(&table_list, &table_count, 0))
146
146
      return(1);
147
147
 
148
148
    if (!lock_tables(session, table_list, table_count, &need_reopen))
711
711
    TableList *duplicate;
712
712
    if ((duplicate= unique_table(session, table_list, table_list->next_global, 0)))
713
713
    {
714
 
      update_non_unique_table_error(table_list, "UPDATE", duplicate);
715
714
      my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->table_name);
716
715
      return true;
717
716
    }
777
776
 
778
777
  /* open tables and create derived ones, but do not lock and fill them */
779
778
  if (((original_multiupdate || need_reopen) &&
780
 
       open_tables(session, &table_list, &table_count, 0)) ||
 
779
       session->open_tables_from_list(&table_list, &table_count, false)) ||
781
780
      mysql_handle_derived(lex, &mysql_derived_prepare))
782
781
    return true;
783
782
  /*
868
867
      TableList *duplicate;
869
868
      if ((duplicate= unique_table(session, tl, table_list, 0)))
870
869
      {
871
 
        update_non_unique_table_error(table_list, "UPDATE", duplicate);
 
870
        my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->alias);
 
871
 
872
872
        return true;
873
873
      }
874
874
    }