~drizzle-trunk/drizzle/jenkins-Drizzle-Builder-187

« back to all changes in this revision

Viewing changes to drizzled/schema.cc

  • Committer: Stewart Smith
  • Date: 2012-07-11 14:06:00 UTC
  • mto: This revision was merged to the branch mainline in revision 2574.
  • Revision ID: stewart@flamingspork.com-20120711140600-oxrs1cjabjuqpd05
force a identifier::Schema to be constructed with a identifier::Catalog. This is close to the final 'big' part for CATALOG support. We also have to modify all around the server that creates identifier::Schema so it does so properly. Since a single Session cannot span schemas, we get off a wee bit easy :) The big limitation in this patch is that INFORMATION_SCHEMA and DATA_DICTIONARY only appear in the LOCAL catalog (and this really needs to be fixed before CATALOGs other than LOCAL are supported).

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
  {
99
99
    boost::mutex::scoped_lock scopedLock(session.catalog().schemaLock());
100
100
 
101
 
    // Check to see if it exists already.  
102
 
    identifier::Schema schema_identifier(schema_message.name());
 
101
    // Check to see if it exists already.
 
102
    identifier::Schema schema_identifier(session.catalog().identifier(),
 
103
                                         schema_message.name());
103
104
    if (plugin::StorageEngine::doesSchemaExist(schema_identifier))
104
105
    {
105
106
      if (not is_if_not_exists)
157
158
  {
158
159
    boost::mutex::scoped_lock scopedLock(session.catalog().schemaLock());
159
160
 
160
 
    identifier::Schema schema_idenifier(schema_message.name());
 
161
    identifier::Schema schema_idenifier(session.catalog().identifier(),
 
162
                                        schema_message.name());
161
163
    if (not plugin::StorageEngine::doesSchemaExist(schema_idenifier))
162
164
    {
163
165
      my_error(ER_SCHEMA_DOES_NOT_EXIST, schema_idenifier);