Commit 20f59d83 authored by Carla Guillen's avatar Carla Guillen

Linking mariadb and compiling related classes

parent a154211e
......@@ -61,6 +61,6 @@ libdcdboperator_filesink.$(LIBEXT): operators/filesink/FilesinkOperator.o operat
libdcdboperator_smucngperf.$(LIBEXT): operators/smucngperf/SMUCNGPerfOperator.o operators/smucngperf/SMUCNGPerfConfigurator.o operators/smucngperf/SKXPMUMetrics.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
libdcdboperator_persystsql.$(LIBEXT): operators/persystsql/PerSystSqlOperator.o operators/persystsql/PerSystSqlConfigurator.o ../common/src/sensornavigator.o
libdcdboperator_persystsql.$(LIBEXT): operators/persystsql/PerSystSqlOperator.o operators/persystsql/PerSystSqlConfigurator.o operators/persystsql/PerSystDB.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
......@@ -97,7 +97,7 @@ PerSystDB::~PerSystDB(){
bool PerSystDB::getDBJobIDs(std::vector<std::string> & job_id_strings, std::map<std::string, std::string>& job_id_map ){
std::stringstream build_query;
build_query << "SELECT job_id, job_id_string FROM Accounting WHERE job_id_string IN (";
for(int i = 0; i < job_id_strings.size(); ++i){
for(std::vector<std::string>::size_type i = 0; i < job_id_strings.size(); ++i){
build_query << "'" << job_id_strings[i] << "'";
if (i != job_id_strings.size()-1) { //not last element
build_query << ",";
......@@ -116,7 +116,7 @@ bool PerSystDB::getDBJobIDs(std::vector<std::string> & job_id_strings, std::map<
SQLResult result(_mysql);
if(result.get()){
MYSQL_ROW row;
while(row = result.fetch_row()){
while((row = result.fetch_row())){
if(row[0]){
job_id_map[std::string(row[1])]= row[0];
}
......@@ -154,7 +154,7 @@ bool PerSystDB::getCurrentSuffixAggregateTable(std::string & suffix){
SQLResult result(_mysql);
if(result.get()){
MYSQL_ROW row;
while(row = result.fetch_row()){
while((row = result.fetch_row())){
if(row[0] && row[1]){
suffix = std::string(row[0]);
std::string row1(row[1]);
......@@ -222,7 +222,7 @@ bool PerSystDB::createNewAggregate(std::string& new_suffix){
SQLResult result(_mysql);
if(result.get()){
MYSQL_ROW row;
while (row = result.fetch_row()){
while ((row = result.fetch_row())){
if(row[0]){
last_suffix = std::string(row[0]);
}
......
......@@ -28,7 +28,7 @@
#ifndef ANALYTICS_OPERATORS_PERSYSTSQL_PERSYSTDB_H_
#define ANALYTICS_OPERATORS_PERSYSTSQL_PERSYSTDB_H_
#include <mysql.h>
#include "mariadb/mysql.h"
#include <vector>
#include <string>
#include <map>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment