Use std::list instead of std::deque

The copying of a std::deque appears to cause problems on CentOS 6. Using
an std::list seems to work without problems.
This commit is contained in:
Markus Mäkelä
2018-05-23 12:20:14 +03:00
parent 88380038c1
commit d9b61f9f15

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh> #include <maxscale/cppdefs.hh>
#include <deque> #include <list>
#include <maxscale/buffer.hh> #include <maxscale/buffer.hh>
#include <maxscale/utils.hh> #include <maxscale/utils.hh>
@ -24,7 +24,7 @@ class Trx
{ {
public: public:
// A log of executed queries, for transaction replay // A log of executed queries, for transaction replay
typedef std::deque<mxs::Buffer> TrxLog; typedef std::list<mxs::Buffer> TrxLog;
Trx(): Trx():
m_size(0) m_size(0)
@ -39,7 +39,7 @@ public:
void add_stmt(GWBUF* buf) void add_stmt(GWBUF* buf)
{ {
m_size += gwbuf_length(buf); m_size += gwbuf_length(buf);
m_log.push_back(buf); m_log.emplace_back(buf);
} }
/** /**