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

@ -27,38 +27,40 @@ using namespace qfe;
int processDDLStmt(const string& stmt, uint32_t sid)
{
MessageQueueClient* mq=0;
SqlParser parser;
MessageQueueClient* mq = 0;
SqlParser parser;
parser.setDefaultSchema(DefaultSchema);
parser.Parse(stmt.c_str());
if (parser.Good())
{
const ddlpackage::ParseTree& ptree = parser.GetParseTree();
SqlStatement &ddlstmt = *ptree.fList[0];
ddlstmt.fSessionID = sid;
ddlstmt.fSql = stmt;
ddlstmt.fOwner = DefaultSchema;
ByteStream bytestream;
bytestream << ddlstmt.fSessionID;
ddlstmt.serialize(bytestream);
mq = new MessageQueueClient("DDLProc");
scoped_ptr<MessageQueueClient> smq(mq);
ByteStream::byte b=0;
mq->write(bytestream);
bytestream = mq->read();
bytestream >> b;
string emsg;
bytestream >> emsg;
if (b != 0)
throw runtime_error(emsg);
}
else
{
throw runtime_error("syntax error");
}
parser.setDefaultSchema(DefaultSchema);
parser.Parse(stmt.c_str());
return 0;
if (parser.Good())
{
const ddlpackage::ParseTree& ptree = parser.GetParseTree();
SqlStatement& ddlstmt = *ptree.fList[0];
ddlstmt.fSessionID = sid;
ddlstmt.fSql = stmt;
ddlstmt.fOwner = DefaultSchema;
ByteStream bytestream;
bytestream << ddlstmt.fSessionID;
ddlstmt.serialize(bytestream);
mq = new MessageQueueClient("DDLProc");
scoped_ptr<MessageQueueClient> smq(mq);
ByteStream::byte b = 0;
mq->write(bytestream);
bytestream = mq->read();
bytestream >> b;
string emsg;
bytestream >> emsg;
if (b != 0)
throw runtime_error(emsg);
}
else
{
throw runtime_error("syntax error");
}
return 0;
}
}
@ -68,12 +70,12 @@ namespace qfe
void processCreateStmt(const string& stmt, uint32_t sid)
{
processDDLStmt(stmt, sid);
processDDLStmt(stmt, sid);
}
void processDropStmt(const string& stmt, uint32_t sid)
{
processDDLStmt(stmt, sid);
processDDLStmt(stmt, sid);
}
} //namespace qfe