You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
clang format apply
This commit is contained in:
@ -27,56 +27,54 @@ 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());
|
||||
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 (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");
|
||||
}
|
||||
if (b != 0)
|
||||
throw runtime_error(emsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw runtime_error("syntax error");
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace
|
||||
|
||||
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
|
||||
|
||||
} // namespace qfe
|
||||
|
Reference in New Issue
Block a user