コード例 #1
0
ファイル: StartHandler.java プロジェクト: belloner/JamesMycat
 public static void handle(String stmt, ServerConnection c, int offset) {
   switch (ServerParseStart.parse(stmt, offset)) {
     case ServerParseStart.TRANSACTION:
       if (c.isAutocommit()) {
         c.setAutocommit(false);
         c.write(c.writeToBuffer(AC_OFF, c.allocate()));
       } else {
         c.getSession2().commit();
       }
       break;
     default:
       c.execute(stmt, ServerParse.START);
   }
 }