~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/schema_engine.cc

  • Committer: Brian Aker
  • Date: 2010-12-07 09:12:12 UTC
  • mto: This revision was merged to the branch mainline in revision 1985.
  • Revision ID: brian@tangent.org-20101207091212-1m0w20tck6z7632m
This is a fix for bug lp:686197

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include "drizzled/global_charset_info.h"
25
25
#include "drizzled/charset.h"
26
 
#include "drizzled/transaction_services.h"
27
26
 
28
27
#include "drizzled/plugin/storage_engine.h"
29
28
#include "drizzled/plugin/authorization.h"
58
57
  std::for_each(StorageEngine::getSchemaEngines().begin(), StorageEngine::getSchemaEngines().end(),
59
58
           AddSchemaNames(schemas));
60
59
 
61
 
  plugin::Authorization::pruneSchemaNames(session.user(), schemas);
 
60
  plugin::Authorization::pruneSchemaNames(session.getSecurityContext(), schemas);
62
61
}
63
62
 
64
63
class StorageEngineGetSchemaDefinition: public std::unary_function<StorageEngine *, bool>
155
154
  result_type operator() (argument_type engine)
156
155
  {
157
156
    // @todo eomeday check that at least one engine said "true"
158
 
    bool success= engine->doCreateSchema(schema_message);
159
 
 
160
 
    if (success) 
161
 
    {
162
 
      TransactionServices &transaction_services= TransactionServices::singleton();
163
 
      transaction_services.allocateNewTransactionId();
164
 
    }
 
157
    (void)engine->doCreateSchema(schema_message);
165
158
  }
166
159
};
167
160
 
194
187
    bool success= engine->doDropSchema(identifier);
195
188
 
196
189
    if (success)
197
 
    {
198
190
      success_count++;
199
 
      TransactionServices &transaction_services= TransactionServices::singleton();
200
 
      transaction_services.allocateNewTransactionId();
201
 
    }
202
191
  }
203
192
};
204
193
 
233
222
 
234
223
 
235
224
    if (success)
236
 
    {
237
225
      success_count++;
238
 
      TransactionServices &transaction_services= TransactionServices::singleton();
239
 
      transaction_services.allocateNewTransactionId();
240
 
    }
241
226
  }
242
227
};
243
228