~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Brian Aker
  • Date: 2009-08-04 21:28:10 UTC
  • mto: This revision was merged to the branch mainline in revision 1111.
  • Revision ID: brian@gaz-20090804212810-3pmf0ttumbhkjfk1
More from the table patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
2073
2073
  close_thread_tables();
2074
2074
}
2075
2075
 
2076
 
int Session::open_and_lock_tables(TableList *tables)
 
2076
bool Session::open_and_lock_tables(TableList *tables)
2077
2077
{
2078
2078
  uint32_t counter;
2079
2079
  bool need_reopen;
2080
2080
 
2081
2081
  for ( ; ; )
2082
2082
  {
2083
 
    if (open_tables_from_list(&tables, &counter, 0))
2084
 
      return -1;
 
2083
    if (open_tables_from_list(&tables, &counter))
 
2084
      return true;
2085
2085
 
2086
2086
    if (!lock_tables(this, tables, counter, &need_reopen))
2087
2087
      break;
2088
2088
    if (!need_reopen)
2089
 
      return -1;
 
2089
      return true;
2090
2090
    close_tables_for_reopen(&tables);
2091
2091
  }
2092
2092
  if ((mysql_handle_derived(lex, &mysql_derived_prepare) ||
2093
2093
       (fill_derived_tables() &&
2094
2094
        mysql_handle_derived(lex, &mysql_derived_filling))))
2095
 
    return 1; /* purecov: inspected */
 
2095
    return true; /* purecov: inspected */
2096
2096
 
2097
 
  return 0;
 
2097
  return false;
2098
2098
}
2099
2099
 
2100
2100
bool Session::open_normal_and_derived_tables(TableList *tables, uint32_t flags)