1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -30,66 +30,69 @@ namespace qfe
void processReturnedRows(MessageQueueClient* mqc, SockType fd)
{
scoped_ptr<MessageQueueClient> cleaner(mqc);
SBS sbs;
sbs = mqc->read();
//cerr << "got a bs of " << sbs->length() << " bytes" << endl;
scoped_ptr<MessageQueueClient> cleaner(mqc);
SBS sbs;
sbs = mqc->read();
//cerr << "got a bs of " << sbs->length() << " bytes" << endl;
RowGroup rg;
rg.deserialize(*sbs);
RowGroup rg;
rg.deserialize(*sbs);
//cerr << "got a base rowgroup with rows of " << rg.getRowSize() << " bytes" << endl;
//cerr << rg.toString() << endl;
//cerr << "got a base rowgroup with rows of " << rg.getRowSize() << " bytes" << endl;
//cerr << rg.toString() << endl;
ByteStream bs;
ByteStream::quadbyte tableOID=100;
bs.reset();
bs << tableOID;
mqc->write(bs);
ByteStream bs;
ByteStream::quadbyte tableOID = 100;
bs.reset();
bs << tableOID;
mqc->write(bs);
sbs = mqc->read();
//cerr << "got a bs of " << sbs->length() << " bytes" << endl;
RGData rgd;
rgd.deserialize(*sbs, true);
rg.setData(&rgd);
//cerr << "got a rowgroup with: " << rg.getRowCount() << " rows" << endl;
sbs = mqc->read();
//cerr << "got a bs of " << sbs->length() << " bytes" << endl;
RGData rgd;
rgd.deserialize(*sbs, true);
rg.setData(&rgd);
//cerr << "got a rowgroup with: " << rg.getRowCount() << " rows" << endl;
socketio::writeString(fd, "OK");
Row r;
while (rg.getRowCount() > 0)
{
rg.initRow(&r);
rg.getRow(0, &r);
string csv;
bs.reset();
for (unsigned i = 0; i < rg.getRowCount(); i++)
{
csv = r.toCSV();
bs << csv;
r.nextRow();
}
//cerr << "writing " << bs.length() << " bytes back to client" << endl;
SockWriteFcn(fd, bs.buf(), bs.length());
socketio::writeString(fd, "OK");
Row r;
bs.reset();
bs << tableOID;
mqc->write(bs);
while (rg.getRowCount() > 0)
{
rg.initRow(&r);
rg.getRow(0, &r);
string csv;
bs.reset();
sbs = mqc->read();
//cerr << "got a bs of " << sbs->length() << " bytes" << endl;
rgd.deserialize(*sbs, true);
rg.setData(&rgd);
//cerr << "got a rowgroup with: " << rg.getRowCount() << " rows" << endl;
}
for (unsigned i = 0; i < rg.getRowCount(); i++)
{
csv = r.toCSV();
bs << csv;
r.nextRow();
}
tableOID=0;
bs.reset();
bs << tableOID;
mqc->write(bs);
//cerr << "writing " << bs.length() << " bytes back to client" << endl;
SockWriteFcn(fd, bs.buf(), bs.length());
//sync with the client on end-of-results
SockWriteFcn(fd, &tableOID, 4);
SockReadFcn(fd, &tableOID, 4);
bs.reset();
bs << tableOID;
mqc->write(bs);
sbs = mqc->read();
//cerr << "got a bs of " << sbs->length() << " bytes" << endl;
rgd.deserialize(*sbs, true);
rg.setData(&rgd);
//cerr << "got a rowgroup with: " << rg.getRowCount() << " rows" << endl;
}
tableOID = 0;
bs.reset();
bs << tableOID;
mqc->write(bs);
//sync with the client on end-of-results
SockWriteFcn(fd, &tableOID, 4);
SockReadFcn(fd, &tableOID, 4);
}