Conversation
[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>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )