kyuubi/kyuubi-server
Cheng Pan 56a88f1e48
[KYUUBI #1395] Implement MySQL protocol codec
### _Why are the changes needed?_

Sub task of #1219

The required `MySQLPacket`s are split into 4 groups, as Kyuubi is designed to be a "MySQL Server", only part of packets need to be encodable and others just need to be decodable.

- Generic
  - `MySQLOKPacket` with `SupportsEncode`
  - `MySQLErrPacket` with `SupportsEncode`
  - `MySQLEofPacket` with `SupportsEncode`
- Authentication
  - `MySQLHandshakePacket` with `SupportsEncode`
  - `MySQLHandshakeResponse41Packet` with `SupportsDecode`
  - `MySQLAuthSwitchRequestPacket` with `SupportsEncode`
  - `MySQLAuthSwitchResponsePacket` with `SupportsDecode`
- Command
  - `MySQLComPingPacket` with `SupportsDecode`
  - `MySQLComInitDbPacket` with `SupportsDecode`
  - `MySQLComFieldListPacket` with `SupportsDecode`
  - `MySQLComQueryPacket` with `SupportsDecode`
  - `MySQLComQuitPacket` with `SupportsDecode`
- Data
  - `MySQLFieldCountPacket`  with`SupportsEncode`
  - `MySQLColumnDefinition41Packet` with `SupportsEncode`
  - `MySQLTextResultSetRowPacket` with `SupportsEncode`

### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1395 from pan3793/mysql-protocol.

Closes #1395

25b7b3d8 [Cheng Pan] Nit
90637ea1 [Cheng Pan] Fix compile
7fae786e [Cheng Pan] Use while
47a1da82 [Cheng Pan] Add MySQL links
b6d91f7b [Cheng Pan] Implement MySQL protocol codec

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-11-17 18:42:01 +08:00
..
src [KYUUBI #1395] Implement MySQL protocol codec 2021-11-17 18:42:01 +08:00
pom.xml [KYUUBI #1354] Expose OpenAPI Specifications 2021-11-17 12:17:58 +08:00