~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/strfunc.cc

MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
{
151
151
  int pos;
152
152
  const char *j;
153
 
  DBUG_ENTER("find_type2");
154
 
  DBUG_PRINT("enter",("x: '%.*s'  lib: 0x%lx", length, x, (long) typelib));
155
153
 
156
154
  if (!typelib->count)
157
155
  {
158
 
    DBUG_PRINT("exit",("no count"));
159
 
    DBUG_RETURN(0);
 
156
    return(0);
160
157
  }
161
158
 
162
159
  for (pos=0 ; (j=typelib->type_names[pos]) ; pos++)
163
160
  {
164
161
    if (!my_strnncoll(cs, (const uchar*) x, length,
165
162
                          (const uchar*) j, typelib->type_lengths[pos]))
166
 
      DBUG_RETURN(pos+1);
 
163
      return(pos+1);
167
164
  }
168
 
  DBUG_PRINT("exit",("Couldn't find type"));
169
 
  DBUG_RETURN(0);
 
165
  return(0);
170
166
} /* find_type */
171
167
 
172
168