~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/server_includes.h

  • Committer: Jay Pipes
  • Date: 2009-11-02 19:37:16 UTC
  • mto: This revision was merged to the branch mainline in revision 1208.
  • Revision ID: jpipes@serialcoder-20091102193716-vjrwlvvv4mbqohy2
Fixes a few things I found on reviewing a recent commit:

a) Variable names should not include the type of the variable.  There were
   some new variables called vector_of_engines, vector_of_transactional_engines, 
   set_of_table_definition_ext which I changed to reflect our normal naming
   practices.  The reason we do not prefix variable names with the type of the
   variable is that this means the variable name is not future-proof.  If another
   developer wants to use a set instead of a vector for the variable in the
   future, then the variable name has to be changed needlessly.  The purpose of
   the standard template library is to templatize containers so that they act
   much like each other and follow standard interfaces.  Naming variables with a
   type prefix takes away this generalization.

b) Removes the std:: prefix used in various places in drizzled/plugin/storage_engine.cc.
   Per the style guide, these are not necessary.

c) Corrects an improper use of vector<>.clear() in plugin::StorageEngine::removePlugin().
   The code was incorrectly calling vector<>.clear() instead of vector<>.erase().

d) Removes the fn_rext() function which was removed in a recent commit and re-added in
   this later commit, presumably because the commit was not merged up with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
bool check_db_name(LEX_STRING *db);
214
214
bool check_column_name(const char *name);
215
215
bool check_table_name(const char *name, uint32_t length);
216
 
const char *fn_rext(const char *name);
217
216
 
218
217
/* Conversion functions */
219
218
size_t build_table_filename(char *buff, size_t bufflen, const char *db,