Skip to content

Commit ca7af88

Browse files
Copilotrenemadsen
andcommitted
Document MariaDB JSON NULL comparison limitation - skip CAST maintains SQL compatibility
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
1 parent c566c43 commit ca7af88

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/EFCore.MySql.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonStructuralEqualityMySqlTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
namespace Pomelo.EntityFrameworkCore.MySql.FunctionalTests.Query.Associations.ComplexJson;
88

99
// Re-enabled to test JSON functionality for complex types
10+
//
11+
// TODO: The test Nested_associate_with_inline_null fails on MariaDB because MariaDB stores JSON as LONGTEXT
12+
// and doesn't support CAST(... AS json). When comparing JSON to NULL, we need to distinguish between database
13+
// NULL vs JSON null value ("null"), which requires CAST AS json on MySQL but isn't supported on MariaDB. This
14+
// causes incorrect result counts (returns 7 instead of 1) because the NULL comparison semantics differ without
15+
// the CAST. The test should be skipped for MariaDB until proper JSON-null-vs-database-NULL handling is
16+
// implemented for LONGTEXT-based JSON storage.
17+
// See: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/151
1018
public class ComplexJsonStructuralEqualityMySqlTest : ComplexJsonStructuralEqualityRelationalTestBase<ComplexJsonStructuralEqualityMySqlTest.ComplexJsonStructuralEqualityMySqlFixture>
1119
{
1220
public ComplexJsonStructuralEqualityMySqlTest(ComplexJsonStructuralEqualityMySqlFixture fixture, ITestOutputHelper testOutputHelper)

0 commit comments

Comments
 (0)