Skip to content

MySQL/MariaDB perform a floating point division for operands of any type #1957

Open
@lauxjpn

Description

MySQL/MariaDB perform a floating point division for operands of any type (which is not the .NET behavior), while different DBMS' (SQL Server, Sqlite, PostgreSQL) perform an integer division if both operands are integer based types (which is the .NET behavior).

To make the behavior work in the same way as .NET (and other DBMS') does, we need to make use of the integer division operator DIV when translating queries.

Exposing the integer division operator as an explicit EF.Function extension method is tracked by #1932.

Investigative work has been done in dotnet/efcore#35295.

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions