Code review comment: Why add elements into the same `mysqlTypeCodes` in `PrepareStmt`?  Is there any problem lead the list size larger than placeholder number?

Code before review:
private void handleExecute() {
packetBuf = packetBuf.order(ByteOrder.LITTLE_ENDIAN);
int stmtId = packetBuf.getInt();
packetBuf.get();
packetBuf.getInt();
PrepareStmtContext prepareCtx = ctx.getPreparedStmt(String.valueOf(stmtId));
if (null == prepareCtx) {
ctx.getState().setError("msg: Not Found prepared statement, stmtName: " + stmtId);
return;
}
int numParams = prepareCtx.getStmt().getParameters().size();
byte[] nullBitmap = new byte[(numParams + 7) / 8];
packetBuf.get(nullBitmap);
try {
ctx.setQueryId(UUIDUtil.genUUID());
Integer[] mysqlTypeCodes = new Integer[numParams];
if (packetBuf.hasRemaining() && (int) packetBuf.get() != 0) {
IntStream.range(0, numParams)
.forEach(i -> prepareCtx.getStmt().addMysqlTypeCodes((int) packetBuf.getChar()));
}
List<Expr> exprs = new ArrayList<>();
for (int i = 0; i < numParams; ++i) {
if (isNull(nullBitmap, i)) {
exprs.add(new NullLiteral());
continue;
}
LiteralExpr l = LiteralExpr.parseLiteral(prepareCtx.getStmt().getMysqlTypeCodes().get(i));
l.parseMysqlParam(packetBuf);
exprs.add(l);
}
ExecuteStmt executeStmt = new ExecuteStmt(String.valueOf(stmtId), exprs);
boolean enableAudit = ctx.getSessionVariable().isAuditExecuteStmt();
String originStmt = enableAudit ? executeStmt.toSql() : "/* omit */";
executeStmt.setOrigStmt(new OriginStatement(originStmt, 0));
executor = new StmtExecutor(ctx, executeStmt);
ctx.setExecutor(executor);
executor.execute();
if (enableAudit) {
auditAfterExec(originStmt, executor.getParsedStmt(), executor.getQueryStatisticsForAuditLog());
}
} catch (Throwable e) {
LOG.warn("Process one query failed because unknown reason: ", e);
ctx.getState().setError(e.getClass().getSimpleName() + ", msg: " + e.getMessage());
}
}

Line under review: .forEach(i -> prepareCtx.getStmt().addMysqlTypeCodes((int) packetBuf.getChar()));

Code after addressing the review:
private void handleExecute() {
packetBuf = packetBuf.order(ByteOrder.LITTLE_ENDIAN);
int stmtId = packetBuf.getInt();
packetBuf.get();
packetBuf.getInt();
PrepareStmtContext prepareCtx = ctx.getPreparedStmt(String.valueOf(stmtId));
if (null == prepareCtx) {
ctx.getState().setError("msg: Not Found prepared statement, stmtName: " + stmtId);
return;
}
int numParams = prepareCtx.getStmt().getParameters().size();
byte[] nullBitmap = new byte[(numParams + 7) / 8];
packetBuf.get(nullBitmap);
try {
ctx.setQueryId(UUIDUtil.genUUID());
if (packetBuf.hasRemaining() && (int) packetBuf.get() != 0) {
for (int i = 0; i < numParams; ++i) {
prepareCtx.getStmt().getMysqlTypeCodes().set(i, (int) packetBuf.getChar());
}
}
List<Expr> exprs = new ArrayList<>();
for (int i = 0; i < numParams; ++i) {
if (isNull(nullBitmap, i)) {
exprs.add(new NullLiteral());
continue;
}
LiteralExpr l = LiteralExpr.parseLiteral(prepareCtx.getStmt().getMysqlTypeCodes().get(i));
l.parseMysqlParam(packetBuf);
exprs.add(l);
}
ExecuteStmt executeStmt = new ExecuteStmt(String.valueOf(stmtId), exprs);
boolean enableAudit = ctx.getSessionVariable().isAuditExecuteStmt();
String originStmt = enableAudit ? executeStmt.toSql() : "/* omit */";
executeStmt.setOrigStmt(new OriginStatement(originStmt, 0));
executor = new StmtExecutor(ctx, executeStmt);
ctx.setExecutor(executor);
executor.execute();
if (enableAudit) {
auditAfterExec(originStmt, executor.getParsedStmt(), executor.getQueryStatisticsForAuditLog());
}
} catch (Throwable e) {
LOG.warn("Process one query failed because unknown reason: ", e);
ctx.getState().setError(e.getClass().getSimpleName() + ", msg: " + e.getMessage());
}
}