~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/statement_transform.cc

  • Committer: Brian Aker
  • Date: 2011-02-17 10:09:00 UTC
  • mfrom: (2173.2.1 clean-include-usuage)
  • Revision ID: brian@tangent.org-20110217100900-4tpuxxzdl1sj00sh
Merge Monty for headers.

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;
156
155
 
157
156
      if (num_keys > 1 && ! already_in_transaction)
158
157
        sql_strings.push_back("START TRANSACTION");
159
158
 
160
 
      for (x= 0; x < num_keys; ++x)
 
159
      for (size_t x= 0; x < num_keys; ++x)
161
160
      {
162
161
        string destination;
163
162
 
1140
1139
    destination.append(boost::lexical_cast<string>(options.avg_row_length()));
1141
1140
  }
1142
1141
 
1143
 
  if (options.has_checksum() &&
1144
 
      options.checksum())
 
1142
  if (options.has_checksum() && options.checksum())
1145
1143
    destination.append("\nCHECKSUM = TRUE");
1146
 
  if (options.has_page_checksum() &&
1147
 
      options.page_checksum())
 
1144
 
 
1145
  if (options.has_page_checksum() && options.page_checksum())
1148
1146
    destination.append("\nPAGE_CHECKSUM = TRUE");
1149
1147
 
 
1148
  if (options.has_dont_replicate() and options.dont_replicate())
 
1149
  {
 
1150
    destination.append(" REPLICATION = FALSE");
 
1151
  }
 
1152
 
1150
1153
  return NONE;
1151
1154
}
1152
1155