~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/statement_transform.cc

  • Committer: Siddharth Prakash Singh
  • Date: 2010-03-26 19:25:23 UTC
  • mfrom: (1410 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1425.
  • Revision ID: spsneo@spsneo-laptop-20100326192523-ibjlbt1p692vobtj
merging with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
819
819
enum TransformSqlError
820
820
transformTableDefinitionToSql(const Table &table,
821
821
                              string &destination,
822
 
                              enum TransformSqlVariant sql_variant)
 
822
                              enum TransformSqlVariant sql_variant, bool with_schema)
823
823
{
824
824
  char quoted_identifier= '`';
825
825
  if (sql_variant == ANSI)
831
831
    destination.append("TEMPORARY ", 10);
832
832
  
833
833
  destination.append("TABLE ", 6);
 
834
  if (with_schema)
 
835
  {
 
836
    destination.push_back(quoted_identifier);
 
837
    destination.append(table.schema());
 
838
    destination.push_back(quoted_identifier);
 
839
    destination.push_back('.');
 
840
  }
834
841
  destination.push_back(quoted_identifier);
835
842
  destination.append(table.name());
836
843
  destination.push_back(quoted_identifier);
1112
1119
    break;
1113
1120
  case Table::Field::ENUM:
1114
1121
    {
1115
 
      size_t num_field_values= field.set_options().field_value_size();
 
1122
      size_t num_field_values= field.enumeration_values().field_value_size();
1116
1123
      destination.append(" ENUM(", 6);
1117
1124
      for (size_t x= 0; x < num_field_values; ++x)
1118
1125
      {
1119
 
        const string &type= field.set_options().field_value(x);
 
1126
        const string &type= field.enumeration_values().field_value(x);
1120
1127
 
1121
1128
        if (x != 0)
1122
1129
          destination.push_back(',');