Skip to content

Commit 6b49ea2

Browse files
committed
Merge remote-tracking branch 'origin/master' into copilot/fix-assert-equal-failure-one-more-time
2 parents 2c11e89 + e38b033 commit 6b49ea2

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

src/EFCore.MySql/Storage/Internal/MySqlJsonTypeMapping.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected override void ConfigureParameter(DbParameter parameter)
131131
/// </summary>
132132
public override MethodInfo GetDataReaderMethod()
133133
{
134-
Console.WriteLine($"[DEBUG] MySqlJsonTypeMapping.GetDataReaderMethod() called - ClrType: {ClrType.Name} - returning DbDataReader.GetString");
134+
// Console.WriteLine($"[DEBUG] MySqlJsonTypeMapping.GetDataReaderMethod() called - ClrType: {ClrType.Name} - returning DbDataReader.GetString");
135135
return _getString;
136136
}
137137

@@ -142,7 +142,7 @@ public override MethodInfo GetDataReaderMethod()
142142
/// </summary>
143143
public override Expression CustomizeDataReaderExpression(Expression expression)
144144
{
145-
Console.WriteLine($"[DEBUG] MySqlJsonTypeMapping.CustomizeDataReaderExpression() called - ClrType: {ClrType.Name} - no conversion");
145+
// Console.WriteLine($"[DEBUG] MySqlJsonTypeMapping.CustomizeDataReaderExpression() called - ClrType: {ClrType.Name} - no conversion");
146146
// For regular JSON columns, no conversion needed - just return the string
147147
return base.CustomizeDataReaderExpression(expression);
148148
}

src/EFCore.MySql/Storage/Internal/MySqlStructuralJsonTypeMapping.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@ private static readonly ConstructorInfo _memoryStreamConstructor
3636
public MySqlStructuralJsonTypeMapping(string storeType)
3737
: base(storeType, typeof(JsonTypePlaceholder), dbType: null)
3838
{
39-
Console.WriteLine($"[DEBUG] MySqlStructuralJsonTypeMapping created - StoreType: {storeType}, ClrType: JsonTypePlaceholder, DbType: null");
39+
// Console.WriteLine($"[DEBUG] MySqlStructuralJsonTypeMapping created - StoreType: {storeType}, ClrType: JsonTypePlaceholder, DbType: null");
4040
}
4141

4242
protected MySqlStructuralJsonTypeMapping(RelationalTypeMappingParameters parameters)
4343
: base(parameters)
4444
{
45-
Console.WriteLine($"[DEBUG] MySqlStructuralJsonTypeMapping cloned - StoreType: {parameters.StoreType}");
45+
// Console.WriteLine($"[DEBUG] MySqlStructuralJsonTypeMapping cloned - StoreType: {parameters.StoreType}");
4646
}
4747

4848
/// <summary>
4949
/// MySQL stores JSON as strings, so we read using GetString.
5050
/// </summary>
5151
public override MethodInfo GetDataReaderMethod()
5252
{
53-
Console.WriteLine("[DEBUG] MySqlStructuralJsonTypeMapping.GetDataReaderMethod() called - returning DbDataReader.GetString");
53+
// Console.WriteLine("[DEBUG] MySqlStructuralJsonTypeMapping.GetDataReaderMethod() called - returning DbDataReader.GetString");
5454
return _getStringMethod;
5555
}
5656

@@ -60,7 +60,7 @@ public override MethodInfo GetDataReaderMethod()
6060
/// </summary>
6161
public override Expression CustomizeDataReaderExpression(Expression expression)
6262
{
63-
Console.WriteLine("[DEBUG] MySqlStructuralJsonTypeMapping.CustomizeDataReaderExpression() called - converting string to MemoryStream");
63+
// Console.WriteLine("[DEBUG] MySqlStructuralJsonTypeMapping.CustomizeDataReaderExpression() called - converting string to MemoryStream");
6464
return Expression.New(
6565
_memoryStreamConstructor,
6666
Expression.Call(

src/EFCore.MySql/Update/Internal/MySqlModificationCommandBatch.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ public override void Complete(bool moreBatchesExpected)
120120
ApplyPendingBulkInsertCommands();
121121

122122
base.Complete(moreBatchesExpected);
123-
123+
124124
// DEBUG: Log the complete SQL command
125-
var sqlText = SqlBuilder.ToString();
126-
Console.WriteLine($"[DEBUG SQL COMPLETE] SQL Text Length: {sqlText.Length}");
127-
Console.WriteLine($"[DEBUG SQL COMPLETE] SQL Text: {sqlText}");
125+
// var sqlText = SqlBuilder.ToString();
126+
// Console.WriteLine($"[DEBUG SQL COMPLETE] SQL Text Length: {sqlText.Length}");
127+
// Console.WriteLine($"[DEBUG SQL COMPLETE] SQL Text: {sqlText}");
128128
}
129129

130130
/// <summary>

src/EFCore.MySql/Update/Internal/MySqlUpdateSqlGenerator.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ public override ResultSetMapping AppendInsertReturningOperation(
6363
AppendInsertCommandHeader(commandStringBuilder, name, schema, writeOperations);
6464
AppendValuesHeader(commandStringBuilder, writeOperations);
6565
AppendValues(commandStringBuilder, name, schema, writeOperations);
66-
66+
6767
// RETURNING is not supported by MySQL. MariaDB supports INSERT/DELETE RETURNING but not UPDATE RETURNING,
6868
// so we disable it for both databases to ensure consistent behavior across all DML operations.
6969
if (_options.ServerVersion.Supports.Returning && readOperations.Count > 0)
7070
{
7171
AppendReturningClause(commandStringBuilder, readOperations);
7272
}
73-
73+
7474
commandStringBuilder.AppendLine(SqlGenerationHelper.StatementTerminator);
7575

7676
requiresTransaction = false;
@@ -183,17 +183,17 @@ public override ResultSetMapping AppendUpdateOperation(
183183
int commandPosition,
184184
out bool requiresTransaction)
185185
{
186-
var startLength = commandStringBuilder.Length;
186+
// var startLength = commandStringBuilder.Length;
187187
var result = _options.ServerVersion.Supports.Returning
188188
? AppendUpdateReturningOperation(commandStringBuilder, command, commandPosition, out requiresTransaction)
189189
: base.AppendUpdateOperation(commandStringBuilder, command, commandPosition, out requiresTransaction);
190-
190+
191191
// Debug: Log the generated SQL
192-
var generatedSql = commandStringBuilder.ToString(startLength, commandStringBuilder.Length - startLength);
193-
Console.WriteLine($"[DEBUG SQL Generated] AppendUpdateOperation:");
194-
Console.WriteLine(generatedSql);
195-
Console.WriteLine($"[DEBUG SQL Generated] Table: {command.TableName}, Columns: {command.ColumnModifications.Count}");
196-
192+
// var generatedSql = commandStringBuilder.ToString(startLength, commandStringBuilder.Length - startLength);
193+
// Console.WriteLine($"[DEBUG SQL Generated] AppendUpdateOperation:");
194+
// Console.WriteLine(generatedSql);
195+
// Console.WriteLine($"[DEBUG SQL Generated] Table: {command.TableName}, Columns: {command.ColumnModifications.Count}");
196+
197197
return result;
198198
}
199199

@@ -226,14 +226,14 @@ protected override ResultSetMapping AppendUpdateReturningOperation(
226226

227227
AppendUpdateCommandHeader(commandStringBuilder, name, schema, writeOperations);
228228
AppendWhereClause(commandStringBuilder, conditionOperations);
229-
229+
230230
// RETURNING is not supported by MySQL. MariaDB supports INSERT/DELETE RETURNING but not UPDATE RETURNING,
231231
// so we disable it for both databases to ensure consistent behavior across all DML operations.
232232
if (_options.ServerVersion.Supports.Returning)
233233
{
234234
AppendReturningClause(commandStringBuilder, readOperations, anyReadOperations ? null : "1");
235235
}
236-
236+
237237
commandStringBuilder.AppendLine(SqlGenerationHelper.StatementTerminator);
238238

239239
return anyReadOperations
@@ -272,14 +272,14 @@ protected override ResultSetMapping AppendDeleteReturningOperation(
272272

273273
AppendDeleteCommandHeader(commandStringBuilder, name, schema);
274274
AppendWhereClause(commandStringBuilder, conditionOperations);
275-
275+
276276
// RETURNING is not supported by MySQL. MariaDB supports INSERT/DELETE RETURNING but not UPDATE RETURNING,
277277
// so we disable it for both databases to ensure consistent behavior across all DML operations.
278278
if (_options.ServerVersion.Supports.Returning)
279279
{
280280
AppendReturningClause(commandStringBuilder, [], "1");
281281
}
282-
282+
283283
commandStringBuilder.AppendLine(SqlGenerationHelper.StatementTerminator);
284284

285285
return ResultSetMapping.LastInResultSet | ResultSetMapping.ResultSetWithRowsAffectedOnly;

0 commit comments

Comments
 (0)