~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_data.cc

  • Committer: Brian Aker
  • Date: 2010-12-10 03:50:07 UTC
  • mto: (1992.4.2 system-tables)
  • mto: This revision was merged to the branch mainline in revision 2001.
  • Revision ID: brian@tangent.org-20101210035007-w8ld6aze3ub0cu2s
Additional cerr output bits for a few classes (Item, Field,...)

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
          {
374
374
            os << "NULL";
375
375
          }
376
 
          else if (obj.table->fields[i]->type.compare("BOOLEAN") == 0)
377
 
          {
378
 
            if (strncmp(row[i], "1", 1) == 0)
379
 
              os << "TRUE";
380
 
            else
381
 
              os << "FALSE";
382
 
          }
383
376
          else
384
377
            os << "'" << DrizzleDumpData::escape(row[i], row_sizes[i]) << "'";
385
378
          byte_counter+= 3;
568
561
    throw std::exception();
569
562
  }
570
563
 
571
 
  ServerDetect server_detect= ServerDetect(&connection);
572
 
 
573
 
  serverType= server_detect.getServerType();
574
 
  serverVersion= server_detect.getServerVersion();
 
564
  boost::match_flag_type flags = boost::match_default; 
 
565
 
 
566
  boost::regex mysql_regex("(5\\.[0-9]+\\.[0-9]+)");
 
567
  boost::regex drizzle_regex("(20[0-9]{2}\\.(0[1-9]|1[012])\\.[0-9]+)");
 
568
 
 
569
  std::string version(getServerVersion());
 
570
 
 
571
  if (regex_search(version, mysql_regex, flags))
 
572
    serverType= SERVER_MYSQL_FOUND;
 
573
  else if (regex_search(version, drizzle_regex, flags))
 
574
    serverType= SERVER_DRIZZLE_FOUND;
 
575
  else
 
576
    serverType= SERVER_UNKNOWN_FOUND;
575
577
}
576
578
 
577
579
drizzle_result_st* DrizzleDumpConnection::query(std::string &str_query)