~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Brian Aker
  • Date: 2011-02-16 02:39:43 UTC
  • mfrom: (2171.1.3 drizzle-staging)
  • Revision ID: brian@tangent.org-20110216023943-z4lxkjvknnrrncr2
Merge of all fixes related to errors, schemas, etc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
323
323
}
324
324
 
325
325
/*
326
 
  Check if database name is valid
327
 
 
328
 
  SYNPOSIS
329
 
    check_db_name()
330
 
    org_name            Name of database and length
331
 
 
332
 
  RETURN
333
 
    false error
334
 
    true ok
335
 
*/
336
 
 
337
 
bool check_db_name(Session *session, identifier::Schema &schema_identifier)
338
 
{
339
 
  if (not plugin::Authorization::isAuthorized(session->user(), schema_identifier))
340
 
  {
341
 
    return false;
342
 
  }
343
 
 
344
 
  return schema_identifier.isValid();
345
 
}
346
 
 
347
 
/*
348
326
  Allow anything as a table name, as long as it doesn't contain an
349
327
  ' ' at the end
350
328
  returns 1 on error