Skip to content

fix: various mssql compat fixes - #5483

Merged
jacek-prisma merged 1 commit into
mainfrom
fix/misc-mssql-fixes
Jun 17, 2025
Merged

fix: various mssql compat fixes#5483
jacek-prisma merged 1 commit into
mainfrom
fix/misc-mssql-fixes

Conversation

@jacek-prisma

@jacek-prisma jacek-prisma commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

ORM-1056

Starts running tests against MSSQL with the query compiler.
I've had to refactor some code to utilize RowSink, because there were many edge case plans with missing unique nodes that were causing problems.

/prisma-branch fix/misc-mssql-fixes

@codspeed-hq

codspeed-hq Bot commented Jun 16, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #5483 will not alter performance

Comparing fix/misc-mssql-fixes (8ccfe3b) with main (ab8c8f5)

Summary

✅ 11 untouched benchmarks

@github-actions

github-actions Bot commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.185MiB 2.187MiB -2.926KiB
Postgres (gzip) 875.267KiB 876.578KiB -1.311KiB
Mysql 2.150MiB 2.153MiB -2.914KiB
Mysql (gzip) 860.268KiB 861.435KiB -1.167KiB
Sqlite 2.059MiB 2.062MiB -2.925KiB
Sqlite (gzip) 825.674KiB 827.108KiB -1.434KiB
SQL Server 2.115MiB 2.118MiB -2.935KiB
SQL Server (gzip) 849.400KiB 850.328KiB -950.000B

@jacek-prisma
jacek-prisma force-pushed the fix/misc-mssql-fixes branch 2 times, most recently from 6f6996b to 1a4c112 Compare June 16, 2025 18:03
@jacek-prisma
jacek-prisma force-pushed the fix/misc-mssql-fixes branch from 1a4c112 to 8ccfe3b Compare June 16, 2025 18:20
@jkomyno jkomyno added this to the 6.10.0 milestone Jun 17, 2025
Comment on lines +1 to +12
new::interactive_tx::interactive_tx::batch_queries_failure
new::regressions::max_integer::max_integer::unfitted_int_should_fail
new::regressions::max_integer::max_integer::unfitted_int_should_fail_mssql
new::regressions::prisma_7434::not_in_chunking::not_in_batch_filter
queries::aggregation::group_by::aggregation_group_by::group_by_ordering_sum_aggregation
queries::chunking::chunking::order_by_aggregation_should_fail
queries::filters::self_relation_regression::sr_regression::all_categories
raw::sql::typed_output::typed_output::unknown_type_mssql
writes::data_types::bytes::bytes::using_bytes_field
writes::data_types::decimal::decimal::using_decimal_as_id
writes::data_types::native_types::sql_server::sql_server::native_decimal_type
writes::nested_mutations::already_converted::nested_connect_inside_update::connect_inside_update::p1_c1req_rel_child_idempotent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we plan to do with these failures?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkomyno most of these failures affect all databases in the same way so they'll be tackled when we fix them for other databases, I think only 4 failures are specific to MSSQL:

  • raw::sql::typed_output::typed_output::unknown_type_mssql - we raise a slightly different error that we're supposed to, we will likely need a new custom error variant
  • writes::data_types::bytes::bytes::using_bytes_field - the test works fine until it hits SET field = null on a bytes field, I've tried multiple workarounds but it keeps failing, will need to be investigated more
  • writes::data_types::decimal::decimal::using_decimal_as_id - it works fine except at the end of the test the values gets read as 1000000000.0000000000000001 instead of 1000000000
  • native_decimal_type - minor different in number formatting

Comment on lines +183 to +184
// TODO: investigate why the adapter raises a different error
CONFIG.connector_version() == Some("mssql.js.wasm")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please create a new task for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jacek-prisma jacek-prisma Jun 17, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for raw::sql::typed_output::typed_output::unknown_type_mssql, I think we should just cover it under a non-db specific ticket where go through all error-related tests and make sure all error messages are aligned (the main difficulty is that DA QE and DA QC currently use the same snapshots and it's difficult to align them perfectly - the error messages get formatted properly, they just don't always match 1:1)

@jacek-prisma
jacek-prisma merged commit 39043d8 into main Jun 17, 2025
162 checks passed
@jacek-prisma
jacek-prisma deleted the fix/misc-mssql-fixes branch June 17, 2025 09:29
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