Skip to content

feat(node-driver): add MariaDB and MySQL L5 support - #831

Merged
rrobetti merged 8 commits into
mainfrom
copilot/node-mysql-mariadb-l5
Nov 24, 2026
Merged

rrobetti merged 8 commits into
mainfrom
copilot/node-mysql-mariadb-l5

Conversation

@rrobetti

@rrobetti rrobetti commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Raise the Node driver MariaDB and MySQL implementation level to L5.
  • Add nine cumulative real-server integration scenarios per database covering BLOB/CLOB upload and read streams, >64KB chunking, binding, hydrated results, Unicode, empty-versus-NULL, updates, reference reuse, and closed-session lifecycle.
  • Keep session propagation and endpoint routing internal to OjpClient; document that callers explicitly upload and bind LOB references, without manually passing session/routing metadata.
  • Update the client README and shared non-Java implementation-level matrix.

Validation

  • npm run build
  • npm test -- --runInBand (12 suites, 123 tests)
  • Both L5 suites load successfully; the real-server integration workflow includes them.
  • GitHub currently marks the pull_request workflows action_required before jobs start, so repository workflow approval is required to run real-server checks.

rrobetti and others added 2 commits November 24, 2026 08:15
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@rrobetti
rrobetti marked this pull request as ready for review November 24, 2026 08:19
@rrobetti

Copy link
Copy Markdown
Contributor Author

@copilot investigate, root cause, explain in simple terms and only fix if highly confident: https://github.com/Open-J-Proxy/ojp/actions/runs/45355025158/job/138312810066?pr=831

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@copilot investigate, root cause, explain in simple terms and only fix if highly confident: https://github.com/Open-J-Proxy/ojp/actions/runs/45355025158/job/138312810066?pr=831

I traced the failure to two assertions in the new L5 suites. On both databases, the large CLOB round-trip changes one 🚀 to ?? after the CLOB is bound into LONGTEXT and selected; the direct readLobStream check passes. The shared server binding path is ParameterHandler.setClobParameter → PreparedStatement.setClob(reader), so the evidence points to CLOB binding/storage, but I can’t yet distinguish an OJP issue from the MySQL/MariaDB JDBC connector behavior with enough confidence for a production fix. I left that unchanged rather than mask it. The separate lifecycle check expects number 1 while CI returns bigint 1n; I corrected that test in c22722c. Node build and all 123 unit tests pass. I couldn’t rerun the real-server suites locally because this environment has Java 17, while OJP requires Java 25. Confidence: high in the observed failures, medium in the CLOB root-cause attribution.

@rrobetti

Copy link
Copy Markdown
Contributor Author

@copilot investigate, root cause, explain in simple terms and only fix if highly confident:
https://github.com/Open-J-Proxy/ojp/actions/runs/45361625121/job/138647305344?pr=831

Check if other clients implemented this level, how did they do it? Are we trying to validate more here then in other clients like ojp jdbc ?

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@copilot investigate, root cause, explain in simple terms and only fix if highly confident:
https://github.com/Open-J-Proxy/ojp/actions/runs/45361625121/job/138647305344?pr=831
...

The latest run has two failures that remain relevant: the same large Unicode CLOB round-trip replaces one 🚀 with ?? on both MySQL and MariaDB; the MariaDB session-health check also returned 1 where an earlier run returned 1n. I made that health assertion type-agnostic in c55c070. The CLOB direct-stream test passes, but the failure occurs after binding the uploaded CLOB reference into LONGTEXT; the path reaches PreparedStatement.setClob(reader). I can localize it to reference binding/storage, but can’t confidently tell whether OJP’s server path or a JDBC connector behavior is responsible, so I did not make a speculative production change.

The Node suite is more explicit than the MySQL/MariaDB JDBC tests about LOB references: the JDBC tests use standard Blob/stream APIs, while Node exposes and must validate createLob/readLob and reference lifecycle. This is still within the shared L5 minimum, which calls for multi-chunk Unicode CLOBs, empty versus NULL, supported stream APIs, and reference lifecycle. The C++ ODBC MariaDB L5 suite also covers large/Unicode LOBs, empty/NULL, repeated reads, and updates. So it is not beyond the L5 checklist, though test cases are not a one-to-one match across client APIs. Node build and all 123 unit tests pass; the real-server CLOB failure remains. Confidence: high in the failing path and test-scope comparison, medium in the precise CLOB root cause.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
rrobetti and others added 2 commits November 24, 2026 19:09
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@rrobetti

Copy link
Copy Markdown
Contributor Author

@copilot The failed step was Run every client integration suite. Jest itself passed all 34 suites and 274 tests, but reported 2 skipped. The step then runs a JSON guard that exits nonzero whenever r.numPendingTests is nonzero, so those skips caused the failure; this points to an overly strict test/workflow check, not an infrastructure flake. fix: update the guard to validate only failed suites/tests. Job: https://github.com/Open-J-Proxy/ojp/actions/runs/45467280244/job/138715448840

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@copilot The failed step was Run every client integration suite. Jest itself passed all 34 suites and 274 tests, but reported 2 skipped. The step then runs a JSON guard that exits nonzero whenever r.n...

Updated both integration guards to ignore pending/skipped tests and fail only when Jest reports failed tests, failed suites, or runtime suite errors. Committed as `

@sonarqubecloud

Copy link
Copy Markdown

@rrobetti
rrobetti merged commit 4b1275e into main Nov 24, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants