1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shardingsphere.db.protocol.mysql.packet.handshake;
19
20 import com.google.common.base.Preconditions;
21 import lombok.Getter;
22 import lombok.RequiredArgsConstructor;
23 import org.apache.shardingsphere.db.protocol.mysql.packet.MySQLPacket;
24 import org.apache.shardingsphere.db.protocol.mysql.payload.MySQLPacketPayload;
25 import org.apache.shardingsphere.infra.exception.generic.UnsupportedSQLOperationException;
26
27
28
29
30
31
32 @RequiredArgsConstructor
33 @Getter
34 public final class MySQLAuthMoreDataPacket extends MySQLPacket {
35
36
37
38
39 public static final int HEADER = 0x01;
40
41 private final byte[] pluginData;
42
43 public MySQLAuthMoreDataPacket(final MySQLPacketPayload payload) {
44 Preconditions.checkArgument(HEADER == payload.readInt1(), "Header of MySQL auth more data packet must be `0x01`.");
45 pluginData = payload.readStringEOFByBytes();
46 }
47
48 @Override
49 protected void write(final MySQLPacketPayload payload) {
50 throw new UnsupportedSQLOperationException("MySQLAuthMoreDataPacket.write()");
51 }
52 }