Core/Database: Fixes file to large when trying to apply sql files. (ex: full db)
This commit is contained in:
@@ -224,8 +224,9 @@ namespace Framework.Database
|
|||||||
if (query.IsEmpty())
|
if (query.IsEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Encoding.UTF8.GetByteCount(query) > 1048576) //Default size limit of querys
|
var byteCount = Encoding.UTF8.GetByteCount(query);
|
||||||
Apply("SET GLOBAL max_allowed_packet=1073741824;");
|
if (byteCount > 1048576) //Default size limit of querys
|
||||||
|
Apply($"SET GLOBAL max_allowed_packet={byteCount};");
|
||||||
|
|
||||||
using (var connection = _connectionInfo.GetConnection())
|
using (var connection = _connectionInfo.GetConnection())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user