content: /*
   * Copyright 1999-2012 Alibaba Group.
   *  
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *  
   *      http://www.apache.org/licenses/LICENSE-2.0
   *  
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  package com.alibaba.cobar.jdbc.packet;
  
  /**
   * From server to client in response to command, if no error and no result set.
   * 
   * <pre>
   * Bytes                       Name
   * -----                       ----
   * 1                           field_count, always = 0
   * 1-9 (Length Coded Binary)   affected_rows
   * 1-9 (Length Coded Binary)   insert_id
   * 2                           server_status
   * 2                           warning_count
   * n   (until end of packet)   message fix:(Length Coded String)
   * 
   * @see http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol#OK_Packet
   * </pre>
   * 
   * @author xianmao.hexm 2010-7-16 上午10:33:50
   */
  public class OkPacket extends MySQLPacket {
  
      public static final byte FIELD_COUNT = 0x00;
  
      public byte fieldCount = FIELD_COUNT;
      public long affectedRows;
      public long insertId;
      public int serverStatus;
      public int warningCount;
      public byte[] message;
  
      @Override
      protected String packetInfo() {
          return "MySQL OK Packet";
      }
  
  }
  