[fix](forward) set error code for query state to handle exception of (#31975)
This commit is contained in:
@ -93,8 +93,7 @@ public class QueryState {
|
||||
}
|
||||
|
||||
public void setError(String errorMsg) {
|
||||
this.stateType = MysqlStateType.ERR;
|
||||
this.errorMessage = errorMsg;
|
||||
this.setError(ErrorCode.ERR_UNKNOWN_ERROR, errorMsg);
|
||||
}
|
||||
|
||||
public void setError(ErrorCode code, String msg) {
|
||||
|
||||
@ -46,7 +46,7 @@ public class MysqlErrPacketTest {
|
||||
// assert indicator
|
||||
Assert.assertEquals(0xff, MysqlProto.readInt1(buffer));
|
||||
// error code
|
||||
Assert.assertEquals(1064, MysqlProto.readInt2(buffer));
|
||||
Assert.assertEquals(1105, MysqlProto.readInt2(buffer));
|
||||
// sql state marker
|
||||
Assert.assertEquals('#', MysqlProto.readInt1(buffer));
|
||||
// sql state
|
||||
|
||||
Reference in New Issue
Block a user