~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Brian Aker
  • Date: 2009-11-16 17:06:48 UTC
  • mto: (1220.1.2 staging)
  • mto: This revision was merged to the branch mainline in revision 1221.
  • Revision ID: brian@gaz-20091116170648-u9feaqfbs3twp9ct
Move print_error up to Engine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1890
1890
  for (table= temporary_tables; table; table= tmp_next)
1891
1891
  {
1892
1892
    tmp_next= table->next;
1893
 
    close_temporary(table, true, true);
 
1893
    close_temporary(table);
1894
1894
  }
1895
1895
  temporary_tables= NULL;
1896
1896
}
1899
1899
  unlink from session->temporary tables and close temporary table
1900
1900
*/
1901
1901
 
1902
 
void Session::close_temporary_table(Table *table,
1903
 
                                    bool free_share, bool delete_table)
 
1902
void Session::close_temporary_table(Table *table)
 
1903
                         
1904
1904
{
1905
1905
  if (table->prev)
1906
1906
  {
1921
1921
    if (temporary_tables)
1922
1922
      table->next->prev= NULL;
1923
1923
  }
1924
 
  close_temporary(table, free_share, delete_table);
 
1924
  close_temporary(table);
1925
1925
}
1926
1926
 
1927
1927
/*
1932
1932
  If this is needed, use close_temporary_table()
1933
1933
*/
1934
1934
 
1935
 
void Session::close_temporary(Table *table, bool free_share, bool delete_table)
 
1935
void Session::close_temporary(Table *table)
1936
1936
{
1937
1937
  plugin::StorageEngine *table_type= table->s->db_type();
1938
1938
 
1939
1939
  table->free_io_cache();
1940
1940
  table->closefrm(false);
1941
1941
 
1942
 
  if (delete_table)
1943
 
    rm_temporary_table(table_type, table->s->path.str);
 
1942
  rm_temporary_table(table_type, table->s->path.str);
1944
1943
 
1945
 
  if (free_share)
1946
 
  {
1947
 
    table->s->free_table_share();
1948
 
    /* This makes me sad, but we're allocating it via malloc */
1949
 
    free(table);
1950
 
  }
 
1944
  table->s->free_table_share();
 
1945
  /* This makes me sad, but we're allocating it via malloc */
1951
1946
}
1952
1947
 
1953
1948
/** Clear most status variables. */