~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Monty Taylor
  • Date: 2009-12-08 22:43:58 UTC
  • mfrom: (1240.1.5 build)
  • mto: (1240.1.6 build)
  • mto: This revision was merged to the branch mainline in revision 1241.
  • Revision ID: mordred@inaugust.com-20091208224358-u1pazjsnn4n932cu
MergedĀ upĀ build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1835
1835
}
1836
1836
 
1837
1837
/*
1838
 
  Check if database name is valid
1839
 
 
1840
 
  SYNPOSIS
1841
 
    check_db_name()
1842
 
    org_name            Name of database and length
1843
 
 
1844
 
  RETURN
1845
 
    0   ok
1846
 
    1   error
1847
 
*/
1848
 
 
1849
 
bool check_db_name(LEX_STRING *org_name)
1850
 
{
1851
 
  char *name= org_name->str;
1852
 
  uint32_t name_length= org_name->length;
1853
 
 
1854
 
  if (!name_length || name_length > NAME_LEN || name[name_length - 1] == ' ')
1855
 
    return 1;
1856
 
 
1857
 
  my_casedn_str(files_charset_info, name);
1858
 
 
1859
 
  return check_identifier_name(org_name);
1860
 
}
1861
 
 
1862
 
 
1863
 
/*
1864
1838
  Allow anything as a table name, as long as it doesn't contain an
1865
1839
  ' ' at the end
1866
1840
  returns 1 on error