~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/substr_functions/substr_functions.cc

  • Committer: Brian Aker
  • Date: 2010-08-03 20:57:39 UTC
  • mfrom: (1680.6.4 rollup)
  • Revision ID: brian@gaz-20100803205739-7betgobkod41363k
Removes LOCK_system_variables_hash, one goto, drops internall new for std
new (so possible performance regression), fixes bug where Session was not
unlocked correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
      (args[1]->unsigned_flag && ((uint64_t) start > INT32_MAX)))
87
87
    return &my_empty_string;
88
88
 
89
 
  start= ((start < 0) ?
90
 
          static_cast<int64_t>(res->numchars() + start)
91
 
          : start - 1);
 
89
  start= ((start < 0) ? res->numchars() + start : start - 1);
92
90
  start= res->charpos((int) start);
93
91
  if ((start < 0) || ((uint) start + 1 > res->length()))
94
92
    return &my_empty_string;