~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/statement_transform.cc

  • Committer: Lee Bieber
  • Date: 2011-02-11 20:30:05 UTC
  • mfrom: (2157.1.3 build)
  • Revision ID: kalebral@gmail.com-20110211203005-757o1y2yf78dxzqr
Merge Stewart - 716848: drizzleimport displays wrong program_name
Merge Stewart - update README file
Merge Andrew and Joe - Exposes the InnoDB SYS_REPLICATION_LOG to data_dictionary so that it is fast and fixes many issues we have been having

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 * Statement messages to other formats, including SQL strings.
30
30
 */
31
31
 
32
 
#include <config.h>
 
32
#include "config.h"
33
33
 
34
34
#include <boost/lexical_cast.hpp>
35
 
#include <drizzled/message/statement_transform.h>
36
 
#include <drizzled/message/transaction.pb.h>
37
 
#include <drizzled/message/table.pb.h>
38
 
#include <drizzled/charset.h>
39
 
#include <drizzled/charset_info.h>
40
 
#include <drizzled/global_charset_info.h>
 
35
#include "drizzled/message/statement_transform.h"
 
36
#include "drizzled/message/transaction.pb.h"
 
37
#include "drizzled/message/table.pb.h"
 
38
#include "drizzled/charset.h"
 
39
#include "drizzled/charset_info.h"
 
40
#include "drizzled/global_charset_info.h"
41
41
 
42
42
#include <string>
43
43
#include <vector>
152
152
      const InsertHeader &insert_header= source.insert_header();
153
153
      const InsertData &insert_data= source.insert_data();
154
154
      size_t num_keys= insert_data.record_size();
 
155
      size_t x;
155
156
 
156
157
      if (num_keys > 1 && ! already_in_transaction)
157
158
        sql_strings.push_back("START TRANSACTION");
158
159
 
159
 
      for (size_t x= 0; x < num_keys; ++x)
 
160
      for (x= 0; x < num_keys; ++x)
160
161
      {
161
162
        string destination;
162
163
 
884
885
    destination.append(schema.collation());
885
886
  }
886
887
 
887
 
  if (schema.has_replication_options() and schema.replication_options().has_dont_replicate() and schema.replication_options().dont_replicate())
888
 
  {
889
 
    destination.append(" REPLICATION = FALSE");
890
 
  }
891
 
 
892
888
  return NONE;
893
889
}
894
890
 
1144
1140
    destination.append(boost::lexical_cast<string>(options.avg_row_length()));
1145
1141
  }
1146
1142
 
1147
 
  if (options.has_checksum() && options.checksum())
 
1143
  if (options.has_checksum() &&
 
1144
      options.checksum())
1148
1145
    destination.append("\nCHECKSUM = TRUE");
1149
 
 
1150
 
  if (options.has_page_checksum() && options.page_checksum())
 
1146
  if (options.has_page_checksum() &&
 
1147
      options.page_checksum())
1151
1148
    destination.append("\nPAGE_CHECKSUM = TRUE");
1152
1149
 
1153
 
  if (options.has_dont_replicate() and options.dont_replicate())
1154
 
  {
1155
 
    destination.append(" REPLICATION = FALSE");
1156
 
  }
1157
 
 
1158
1150
  return NONE;
1159
1151
}
1160
1152