~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Siddharth Prakash Singh
  • Date: 2010-03-26 19:25:23 UTC
  • mfrom: (1410 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1425.
  • Revision ID: spsneo@spsneo-laptop-20100326192523-ibjlbt1p692vobtj
merging with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
2054
2054
  if (delete_table_proto_file(path))
2055
2055
    error= true;
2056
2056
 
2057
 
  if (base->doDropTable(*this, dummy, path))
 
2057
  if (base->doDropTable(*this, dummy))
2058
2058
  {
2059
2059
    error= true;
2060
2060
    errmsg_printf(ERRMSG_LVL_WARN, _("Could not remove temporary table: '%s', error: %d"),
2076
2076
 
2077
2077
  iter= table_message_cache.find(identifier.getPath());
2078
2078
 
2079
 
  if (iter != table_message_cache.end())
2080
 
    table_message_cache.erase(iter);
 
2079
  if (iter == table_message_cache.end())
 
2080
    return false;
 
2081
 
 
2082
  table_message_cache.erase(iter);
2081
2083
 
2082
2084
  return true;
2083
2085
}
2088
2090
 
2089
2091
  iter= table_message_cache.find(identifier.getPath());
2090
2092
 
 
2093
  if (iter == table_message_cache.end())
 
2094
    return false;
 
2095
 
2091
2096
  table_message.CopyFrom(((*iter).second));
2092
2097
 
2093
2098
  return true;
2099
2104
 
2100
2105
  iter= table_message_cache.find(identifier.getPath());
2101
2106
 
2102
 
  if (iter != table_message_cache.end())
2103
 
  {
2104
 
    return true;
2105
 
  }
2106
 
 
2107
 
  return false;
 
2107
  if (iter == table_message_cache.end())
 
2108
  {
 
2109
    return false;
 
2110
  }
 
2111
 
 
2112
  return true;
 
2113
}
 
2114
 
 
2115
bool Session::renameTableMessage(TableIdentifier &from, TableIdentifier &to)
 
2116
{
 
2117
  TableMessageCache::iterator iter;
 
2118
 
 
2119
  table_message_cache[to.getPath()]= table_message_cache[from.getPath()];
 
2120
 
 
2121
  iter= table_message_cache.find(to.getPath());
 
2122
 
 
2123
  if (iter == table_message_cache.end())
 
2124
  {
 
2125
    return false;
 
2126
  }
 
2127
 
 
2128
  to.copyToTableMessage((*iter).second);
 
2129
 
 
2130
  (void)removeTableMessage(from);
 
2131
 
 
2132
  return true;
2108
2133
}
2109
2134
 
2110
2135
} /* namespace drizzled */