feat(mysql-dual-conn): add endpoint to trigger COM_STMT_RESET#137
Open
khareyash05 wants to merge 1 commit into
Open
feat(mysql-dual-conn): add endpoint to trigger COM_STMT_RESET#137khareyash05 wants to merge 1 commit into
khareyash05 wants to merge 1 commit into
Conversation
Adds GET /api/oms/stmt-reset/{n} which re-executes a server-side prepared
statement n times on the SAME JDBC connection. Updates the OMS JDBC URL
with useServerPrepStmts=true, cachePrepStmts=true, and useCursorFetch=true
so MySQL Connector/J 8.x emits COM_STMT_RESET between re-executions.
This exercises the COM_STMT_RESET synthetic-OK fallback added in
keploy/keploy#4217 during keploy record/replay against this existing
samples-java CI app, avoiding the need to wire a brand new sample
(spring-mysql-redis) into keploy's java_linux pipeline. The existing
dual-handshake test path is unchanged — the Camunda pool keeps the
original JDBC URL, and the new endpoint is purely additive.
Signed-off-by: Yash Khare <khareyash05@gmail.com>
18 tasks
gouravkrosx
pushed a commit
to keploy/keploy
that referenced
this pull request
May 29, 2026
…4225) Adds one curl to /api/oms/stmt-reset/5 inside the mysql-dual-conn record loop so the java_linux pipeline now exercises the COM_STMT_RESET synthetic-OK fallback added in #4217. The endpoint itself is added in keploy/samples-java#137. Without this, the only Java + MySQL CI app exercises COM_QUERY and HandshakeResponse41 paths but never re-executes a server-prepared statement on the same JDBC connection, so the COM_STMT_RESET branch in matchCommand has no e2e coverage. With this curl, all three java_linux compat-matrix cells (record_latest_replay_build, record_build_replay_latest, record_build_replay_build) will fail if the synthetic-OK fallback ever regresses. Signed-off-by: Yash Khare <khareyash05@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
GET /api/oms/stmt-reset/{n}tomysql-dual-connthat re-executes aserver-side prepared statement
ntimes on the same JDBC connection.Also updates the OMS JDBC URL with
useServerPrepStmts=true&cachePrepStmts=true&useCursorFetch=trueso MySQLConnector/J 8.x emits
COM_STMT_RESETbetween re-executions.This lets keploy's existing
java_linuxCI pipeline exercise theCOM_STMT_RESETsynthetic-OK fallback added in keploy/keploy#4217 withoutneeding to wire a brand new sample app into keploy's workflows. The
existing dual-handshake test path is unaffected — the Camunda pool keeps
the original JDBC URL, and the new endpoint is purely additive.
Related: keploy/keploy#4217 (the
match.gofix this endpoint exercises).A separate PR will be opened against
keploy/keployto add acurl http://localhost:8080/api/oms/stmt-reset/5line into.github/workflows/test_workflow_scripts/java/mysql_dual_conn/java-linux.sh.Fixes # (n/a)
Type of change
How Has This Been Tested?
The replay log shows the
COM_STMT_RESETdebug line (stmt id) fromkeploy/keploy#4217, and the run completes without
CJCommunicationsException/Socket is closed.Additional Context
existing dual-handshake assertions stay unchanged.
JdbcTemplate.execute(ConnectionCallback)to pin allnexecutions to one physical connection; otherwise HikariCP couldhand out a fresh connection per
executeQuery()and theCOM_STMT_RESETpacket would never be emitted.Checklist
--signoff)