~skinny.moey/drizzle/fix_global_stats

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Brian Aker
  • Date: 2010-06-11 18:03:14 UTC
  • mfrom: (1608.2.4 rollup)
  • Revision ID: brian@gaz-20100611180314-1bafy27fvm3t7z1j
Merge in some recent changes to tableshare.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1924
1924
  assert(ret == false);
1925
1925
  if (open_tables_from_list(&tables, &counter, flags) ||
1926
1926
      mysql_handle_derived(lex, &mysql_derived_prepare))
 
1927
  {
1927
1928
    return true;
 
1929
  }
1928
1930
  return false;
1929
1931
}
1930
1932
 
1931
 
bool Session::rm_temporary_table(TableIdentifier &identifier)
 
1933
/*
 
1934
  @note "best_effort" is used in cases were if a failure occurred on this
 
1935
  operation it would not be surprising because we are only removing because there
 
1936
  might be an issue (lame engines).
 
1937
*/
 
1938
 
 
1939
bool Session::rm_temporary_table(TableIdentifier &identifier, bool best_effort)
1932
1940
{
1933
1941
  if (plugin::StorageEngine::dropTable(*this, identifier))
1934
1942
  {
1935
 
    errmsg_printf(ERRMSG_LVL_WARN, _("Could not remove temporary table: '%s', error: %d"),
1936
 
                  identifier.getSQLPath().c_str(), errno);
1937
 
    dumpTemporaryTableNames("rm_temporary_table()");
 
1943
    if (not best_effort)
 
1944
    {
 
1945
      errmsg_printf(ERRMSG_LVL_WARN, _("Could not remove temporary table: '%s', error: %d"),
 
1946
                    identifier.getSQLPath().c_str(), errno);
 
1947
    }
1938
1948
 
1939
1949
    return true;
1940
1950
  }
1950
1960
  {
1951
1961
    errmsg_printf(ERRMSG_LVL_WARN, _("Could not remove temporary table: '%s', error: %d"),
1952
1962
                  identifier.getSQLPath().c_str(), errno);
1953
 
    dumpTemporaryTableNames("rm_temporary_table()");
1954
1963
 
1955
1964
    return true;
1956
1965
  }