~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2010-12-15 21:28:47 UTC
  • mto: This revision was merged to the branch mainline in revision 1998.
  • Revision ID: brian@tangent.org-20101215212847-c52kuprsbrcm8sfk
Update name usage for user defined objects.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1542
1542
 
1543
1543
 
1544
1544
/**
 
1545
  CREATE TABLE query pre-check.
 
1546
 
 
1547
  @param session                        Thread handler
 
1548
  @param tables         Global table list
 
1549
  @param create_table           Table which will be created
 
1550
 
 
1551
  @retval
 
1552
    false   OK
 
1553
  @retval
 
1554
    true   Error
 
1555
*/
 
1556
 
 
1557
bool create_table_precheck(TableIdentifier &identifier)
 
1558
{
 
1559
  if (not plugin::StorageEngine::canCreateTable(identifier))
 
1560
  {
 
1561
    my_error(ER_DBACCESS_DENIED_ERROR, MYF(0), "", "", identifier.getSchemaName().c_str());
 
1562
    return true;
 
1563
  }
 
1564
 
 
1565
  if (not plugin::StorageEngine::doesSchemaExist(identifier))
 
1566
  {
 
1567
    my_error(ER_BAD_DB_ERROR, MYF(0), identifier.getSchemaName().c_str());
 
1568
    return true;
 
1569
  }
 
1570
 
 
1571
  return false;
 
1572
}
 
1573
 
 
1574
 
 
1575
/**
1545
1576
  negate given expression.
1546
1577
 
1547
1578
  @param session  thread handler