You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// the default MySQL Server value for max_allowed_packet (in MySQL 5.7) is 4MiB: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_allowed_packet
69
+
// use "decimal megabytes" (to round up) when creating the exception message
70
+
intmegabytes=payload.ArraySegment.Count/1000000;
71
+
thrownewMySqlException("Error submitting {0}MB packet; ensure 'max_allowed_packet' is greater than {0}MB.".FormatInvariant(megabytes),ex);
varqueryResult=(awaitm_database.Connection.QueryAsync<byte[]>(Invariant($"select `{column}` from datatypes_blobs where rowid = {lastInsertId}")).ConfigureAwait(false)).Single();
534
-
TestUtilities.AssertEqual(data,queryResult);
549
+
if(!shouldFail)
550
+
{
551
+
varqueryResult=(awaitconnection.QueryAsync<byte[]>(Invariant($"select `{column}` from datatypes_blobs where rowid = {lastInsertId}")).ConfigureAwait(false)).Single();
552
+
TestUtilities.AssertEqual(data,queryResult);
535
553
536
-
awaitm_database.Connection.ExecuteAsync(Invariant($"delete from datatypes_blobs where rowid = {lastInsertId}")).ConfigureAwait(false);
554
+
awaitconnection.ExecuteAsync(Invariant($"delete from datatypes_blobs where rowid = {lastInsertId}")).ConfigureAwait(false);
555
+
}
556
+
}
537
557
}
538
558
539
559
[Theory]
@@ -543,27 +563,44 @@ public async Task InsertLargeBlobAsync(string column, int size)
0 commit comments