Core/SQL: Fixes a crash when a update file is empty.

This commit is contained in:
hondacrx
2021-02-13 19:53:29 -05:00
parent 68c3e0c241
commit 353acf83b8
+4 -1
View File
@@ -220,7 +220,10 @@ namespace Framework.Database
{
try
{
string query = File.ReadAllText(path);
string query = File.ReadAllText(path);
if (query.IsEmpty())
return false;
if (Encoding.UTF8.GetByteCount(query) > 1048576) //Default size limit of querys
Apply("SET GLOBAL max_allowed_packet=1073741824;");