I followed the instructions on replacing mysql-async but now am getting these errors is there something else I have to do?
cfx> Error running system event handling function for resource esx_shops: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/scheduler.lua:655: No such export QueryResultAsync in resource GHMattiMySQL
stack traceback:
[C]: in function 'error'
citizen:/scripting/lua/scheduler.lua:655: in metamethod '__index'
@mysql-async/lib/MySQL.lua:28: in field 'fetchAll'
server/main.lua:8: in upvalue 'handler'
citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
[C]: in function 'error'
citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>
yeah the error is same and theres more errors like the one above related to esx.
Edit: oh yeah I forgot I got this error to.
System.IO.FileNotFoundException: Unable to find the specified file.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at (wrapper cominterop) CitizenFX.Core.IScriptHost:OpenHostFile (string)
at (wrapper cominterop-invoke) CitizenFX.Core.IScriptHost:OpenHostFile (string)
at CitizenFX.Core.MonoScriptRuntime.LoadFile (System.String scriptFile) [0x00007] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\MonoScriptRuntime.cs:91
Failed to load script GHMattiMySQL.net.dll.
Depends do you have mysql_debug set to true? If yes, then it is just a warning that your are doing querys without parameters, which might be prone to injection.
If you have not set mysql_debug then the code supplied is sending something that is not null as parameters, maybe an empty table or so, on a Sync operation, or actually faulty parameters. Async operations do not complain there.
edit: Ideally you want the resource to shut up, because if it is saying nothing it runs a lot faster.
I have this problem, can someone help me about this?
[GHMattiMySQL ERROR] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IF NOT EXISTS plate varchar(10) COLLATE utf8mb4_bin DEFAULT NULL’ at line 1
I tried using this on my servers instead of mysql-async and it works beautifully, much faster and I can say goodbye to most hitch warnings, they are almost extinct!
Congratulations, very good and thanks for the implementation!
Hello,
I still get quite a few hitch warnings, when the server reaches over 20 people the warnings go mental, I followed the guide for those who come from mysql-async.
@NotWhoever The hitch warnings are very likely not from my resource as it happens on a different thread from the server thread. I can send about 50% more queries than the resource can handle (on my 8 core system) and I do not recieve a single hitch.
@Imagic Using prepared statements. Even the MultiRow Inserter, first creates a prepared statement, and then lets the DBCommand add the parameters to prevent injection.
Exception thrown by a task: System.AggregateException: One or more errors occurred. —> System.AggregateException: One or more errors occurred. —> System.InvalidCastException: Unable to convert MySQL date/time to System.DateTime
It popups this error when i try to use a collum wit datetime
This doesn’t help to reproduce that error. It works fine on my end.
I actually handle my bans with DATETIME. My test schema includes DATE.
So unless you make it reproducable for me, I am pretty sure I cannot help you with it.
C#/Lua, Database Version, Query and Schema should be included in such cases.
I had to change to string in order to work, how its your datetime format ? As i was searching in the google i found out that could be a issue wit the format, mine its: yyyy-mm-dd h:i:s