DCiAOKernelImporter: different injection semantic.

Is now very similar to normal importer, and may be deleted in the future, but
at the moment, this should be merged, since it is the importer used in the
sobres-2013 paper.

This changes the MySQL Schema. instr1_absolute was introduced.

Change-Id: I1bc2919bd14c335beca6d586b7cc0f80767ad7d5
This commit is contained in:
Christian Dietrich
2013-04-10 17:37:23 +02:00
parent 6d8b3331d8
commit 6789a313a9
10 changed files with 85 additions and 62 deletions

View File

@ -82,7 +82,7 @@ bool DatabaseCampaign::run() {
/* Gather all unfinished jobs */
int experiment_count;
std::string sql_select = "SELECT pilot_id, g.fspmethod_id, g.variant_id, g.injection_instr, g.injection_instr_absolute, g.data_address";
std::string sql_select = "SELECT pilot_id, g.fspmethod_id, g.variant_id, p.injection_instr, p.injection_instr_absolute, g.data_address";
std::stringstream ss;
ss << " FROM fspgroup g"
<< " INNER JOIN fsppilot p ON p.id = g.pilot_id "
@ -90,7 +90,7 @@ bool DatabaseCampaign::run() {
<< " AND g.fspmethod_id = " << fspmethod_id
<< " AND g.variant_id = " << variant_id
<< " AND (SELECT COUNT(*) FROM " + db_connect.result_table() + " as r WHERE r.pilot_id = g.pilot_id) = 0"
<< " ORDER BY g.injection_instr";
<< " ORDER BY p.injection_instr";
std::string sql_body = ss.str();
/* Get the number of unfinished experiments */

View File

@ -369,6 +369,7 @@ void DatabaseProtobufAdapter::create_table(const Descriptor *toplevel_desc) {
create_table_stmt << "CREATE TABLE IF NOT EXISTS " << result_table_name << "(";
create_table_stmt << top_level_msg.sql_create_stmt() << ", PRIMARY KEY(" << primary_join.join(", ") << "))";
create_table_stmt << " ENGINE=MyISAM";
insert_stmt << "INSERT INTO " << result_table_name << "(" << insert_join.join(",");
insert_stmt << ") VALUES (" << question_marks.join(",") << ")";