~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Mark Atwood
  • Date: 2011-10-25 19:08:35 UTC
  • mfrom: (2445.1.6 rf)
  • Revision ID: me@mark.atwood.name-20111025190835-g21cn911ypxjd5fi
mergeĀ lp:~olafvdspek/drizzle/refactor7

Show diffs side-by-side

added added

removed removed

Lines of Context:
306
306
  ' ' at the end
307
307
  returns 1 on error
308
308
*/
309
 
bool check_table_name(const char *name, uint32_t length)
 
309
bool check_table_name(str_ref str)
310
310
{
311
 
  if (!length || length > NAME_LEN || name[length - 1] == ' ')
312
 
    return 1;
313
 
  lex_string_t ident;
314
 
  ident.assign(name, length);
315
 
  return check_identifier_name(ident);
 
311
  return str.empty() || str.size() > NAME_LEN || str.data()[str.size() - 1] == ' ' || check_identifier_name(str);
316
312
}
317
313
 
318
314
 
328
324
 
329
325
  while (*name)
330
326
  {
331
 
    last_char_is_space= my_isspace(system_charset_info, *name);
 
327
    last_char_is_space= system_charset_info->isspace(*name);
332
328
    if (use_mb(system_charset_info))
333
329
    {
334
330
      int len=my_ismbchar(system_charset_info, name,