Revision 4f8195d2 src/raft/FedReplicaManager.cc

View differences:

src/raft/FedReplicaManager.cc
410 410
    }
411 411

  
412 412
    oss << "REPLACE INTO " << table << " ("<< db_names <<") VALUES "
413
        << "(" << index  << ",'" << sql_db << "'), "
414
        << "(" << -1 << "," << index << ")";
413
        << "(" << index  << ",'" << sql_db << "')";
415 414

  
416 415
    return logdb->exec_wr(oss);
417 416
}
......
424 423

  
425 424
    single_cb<unsigned int> cb;
426 425

  
427
    oss << "SELECT sqlcmd FROM fed_logdb WHERE log_index = -1";
426
    oss << "SELECT MAX(log_index) FROM fed_logdb";
428 427

  
429 428
    cb.set_callback(&index);
430 429

  

Also available in: Unified diff