Skip to content

[pull] main from prisma:main#220

Merged
pull[bot] merged 2 commits intocode:mainfrom
prisma:main
Mar 9, 2026
Merged

[pull] main from prisma:main#220
pull[bot] merged 2 commits intocode:mainfrom
prisma:main

Conversation

@pull
Copy link

@pull pull bot commented Mar 9, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

jacek-prisma and others added 2 commits March 9, 2026 09:00
[TML-1899](https://linear.app/prisma-company/issue/TML-1899/investigate-and-fix-mysql-update-precision-issue)

Fixes #29160

Modifies the mariadb adapter to use the binary protocol whenever
possible. This solves some edge cases with serializing large numbers.
Also changed the adapter to use phantom queries, because the driver does
not support transactions in its binary protocol, so it has to issue
`query` calls directly.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved MariaDB adapter transaction and query behavior to avoid
protocol-related issues; made commit/rollback/savepoint operations more
robust and error-safe.

* **Tests**
  * Added end-to-end tests validating large-decimal precision on MySQL.
  * Added test matrix/schema wiring for MySQL precision scenarios.
  * Updated tracing tests to include MariaDB/MySQL driver scenarios.
* Relaxed float assertions in MySQL scalar tests to allow Float32
representation variance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
Fix DateTime fields returning `Invalid Date` when using `unixepoch-ms`.

   ## Changes
- Correct DateTime handling for `unixepoch-ms` (millisecond timestamps).
- Add regression test covering DateTime read/write with `unixepoch-ms`.

   ## Tests
   - Added/updated tests for this regression and verified they pass.

   Fixes #28890

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Safer handling of very large integers from the database: values that
fit safely are returned as numbers, while out-of-range integers fall
back to strings to prevent precision loss.

* **Tests**
* Added functional tests for millisecond-precision timestamps to verify
created and aggregated datetime values are returned as valid Date
instances across create, find, and aggregate scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pull pull bot locked and limited conversation to collaborators Mar 9, 2026
@pull pull bot added the ⤵️ pull label Mar 9, 2026
@pull pull bot merged commit 7a1f497 into code:main Mar 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants