~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/statement_transform.cc

  • Committer: earney
  • Date: 2010-09-20 22:29:50 UTC
  • mto: (1813.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 1814.
  • Revision ID: earney@earney.homedns.org-20100920222950-evtw5u0vzlxt31qh
modified files containing stringstream to use boost:lexical_cast instead as 
requested in bug 621331

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
#include "config.h"
33
33
 
 
34
#include <boost/lexical_cast.hpp>
34
35
#include "drizzled/message/statement_transform.h"
35
36
#include "drizzled/message/transaction.pb.h"
36
37
#include "drizzled/message/table.pb.h"
1012
1013
  if (sql_variant == ANSI)
1013
1014
    return NONE; /* ANSI does not support table options... */
1014
1015
 
1015
 
  stringstream ss;
 
1016
  //stringstream ss;
1016
1017
 
1017
1018
  if (options.has_comment())
1018
1019
  {
1042
1043
 
1043
1044
  if (options.has_max_rows())
1044
1045
  {
1045
 
    ss << options.max_rows();
 
1046
    //ss << options.max_rows();
1046
1047
    destination.append("\nMAX_ROWS = ", 12);
1047
 
    destination.append(ss.str());
1048
 
    ss.clear();
 
1048
    //destination.append(ss.str());
 
1049
    destination.append(boost::lexical_cast<string>(options.max_rows()));
 
1050
    //ss.clear();
1049
1051
  }
1050
1052
 
1051
1053
  if (options.has_min_rows())
1052
1054
  {
1053
 
    ss << options.min_rows();
 
1055
    //ss << options.min_rows();
1054
1056
    destination.append("\nMIN_ROWS = ", 12);
1055
 
    destination.append(ss.str());
1056
 
    ss.clear();
 
1057
    //destination.append(ss.str());
 
1058
    destination.append(boost::lexical_cast<string>(options.min_rows()));
 
1059
    //ss.clear();
1057
1060
  }
1058
1061
 
1059
1062
  if (options.has_user_set_auto_increment_value()
1060
1063
      && options.has_auto_increment_value())
1061
1064
  {
1062
 
    ss << options.auto_increment_value();
 
1065
    //ss << options.auto_increment_value();
1063
1066
    destination.append(" AUTO_INCREMENT=", 16);
1064
 
    destination.append(ss.str());
1065
 
    ss.clear();
 
1067
    //destination.append(ss.str());
 
1068
    destination.append(boost::lexical_cast<string>(options.auto_increment_value()));
 
1069
    //ss.clear();
1066
1070
  }
1067
1071
 
1068
1072
  if (options.has_avg_row_length())
1069
1073
  {
1070
 
    ss << options.avg_row_length();
 
1074
    //ss << options.avg_row_length();
1071
1075
    destination.append("\nAVG_ROW_LENGTH = ", 18);
1072
 
    destination.append(ss.str());
1073
 
    ss.clear();
 
1076
    //destination.append(ss.str());
 
1077
    //ss.clear();
 
1078
    destination.append(boost::lexical_cast<string>(options.avg_row_length()));
1074
1079
  }
1075
1080
 
1076
1081
  if (options.has_checksum() &&
1136
1141
      {
1137
1142
        if (part.compare_length() != field.string_options().length())
1138
1143
        {
1139
 
          stringstream ss;
 
1144
          //stringstream ss;
1140
1145
          destination.push_back('(');
1141
 
          ss << part.compare_length();
1142
 
          destination.append(ss.str());
 
1146
          //ss << part.compare_length();
 
1147
          //destination.append(ss.str());
 
1148
          destination.append(boost::lexical_cast<string>(part.compare_length()));
1143
1149
          destination.push_back(')');
1144
1150
        }
1145
1151
      }
1301
1307
      else
1302
1308
        destination.append(" VARCHAR(", 9);
1303
1309
 
1304
 
      stringstream ss;
1305
 
      ss << field.string_options().length() << ")";
1306
 
      destination.append(ss.str());
 
1310
      //stringstream ss;
 
1311
      //ss << field.string_options().length() << ")";
 
1312
      //destination.append(ss.str());
 
1313
      destination.append(boost::lexical_cast<string>(field.string_options().length()));
 
1314
      destination.append(")");
1307
1315
    }
1308
1316
    break;
1309
1317
  case Table::Field::BLOB: