~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2010-12-20 19:20:57 UTC
  • mto: This revision was merged to the branch mainline in revision 2016.
  • Revision ID: brian@tangent.org-20101220192057-1ch4b9uo008d8rje
Merge in additional fixes for sign, plus alter table, plus TIME on
processlist.

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
 
/**
1576
1545
  negate given expression.
1577
1546
 
1578
1547
  @param session  thread handler