~ubuntu-branches/ubuntu/vivid/drizzle/vivid

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_schema.cc

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-10-29 15:43:40 UTC
  • mfrom: (20.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20131029154340-j36v7gxq9tm1gi5f
Tags: 1:7.2.3-2ubuntu1
* Merge from debian, remaining changes:
  - Link against boost_system because of boost_thread.
  - Add required libs to message/include.am
  - Add upstart job and adjust init script to be upstart compatible.
  - Disable -floop-parallelize-all due to gcc-4.8/4.9 compiler ICE
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57732

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <drizzled/message.h>
28
28
#include <drizzled/sql_lex.h>
29
29
 
 
30
#include <drizzled/catalog/instance.h>
 
31
 
30
32
#include <string>
31
33
 
32
34
using namespace std;
38
40
  if (not validateSchemaOptions())
39
41
    return true;
40
42
 
41
 
  identifier::Schema schema_identifier(lex().name);
 
43
  identifier::Schema schema_identifier(session().catalog().identifier(),
 
44
                                       lex().name);
42
45
 
43
46
  if (not schema::check(session(), schema_identifier))
44
47
  {
46
49
    return false;
47
50
  }
48
51
 
49
 
  identifier::Schema identifier(lex().name);
 
52
  identifier::Schema identifier(session().catalog().identifier(), lex().name);
50
53
  message::schema::shared_ptr old_definition= plugin::StorageEngine::getSchemaDefinition(identifier);
51
54
  if (not old_definition)
52
55
  {
64
67
  */
65
68
 
66
69
  // First initialize the schema message
67
 
  drizzled::message::schema::init(schema_message, old_definition->name());
 
70
  drizzled::message::schema::init(schema_message, identifier);
68
71
 
69
72
  // We set the name from the old version to keep case preference
70
73
  schema_message.set_version(old_definition->version());