~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Mark Atwood
  • Date: 2012-01-04 16:59:32 UTC
  • mfrom: (2478.2.3 real-key-use-catalog)
  • Revision ID: me@mark.atwood.name-20120104165932-cm0xqs4by0u3p4cy
mergeĀ lp:~stewart/drizzle/key-use-catalog

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.str= (char*) name;
315
 
  ident.length= length;
316
 
  return check_identifier_name(&ident);
 
311
  return str.empty() || str.size() > NAME_LEN || str.data()[str.size() - 1] == ' ' || check_identifier_name(str);
317
312
}
318
313
 
319
314
 
329
324
 
330
325
  while (*name)
331
326
  {
332
 
    last_char_is_space= my_isspace(system_charset_info, *name);
 
327
    last_char_is_space= system_charset_info->isspace(*name);
333
328
    if (use_mb(system_charset_info))
334
329
    {
335
330
      int len=my_ismbchar(system_charset_info, name,