[Release] MySQL Async Library - 3.3.2

this one is using old plate system: https://github.com/snyx95/esx_eden_garage/

this one with the new plate system: https://github.com/manups4e/esx_eden_garage_updated

1 Like

The C# one has issues with the buffer, which eventually will lead to stupid hitches and slow response times. Furthermore you cannot use ssl which is kinda not nice. All current versions of mysql-connector, the underlying library use ssl by default which makes it rather tricky to update this one when bugs are discovered.

The node.js one has not a single one of those issues.

Currently it only runs well on servers compiled this month, so the linux version should not really work at the moment.

1 Like

Perfect, great summary. I figured there was a reason to transition. Thanks for your work on this!

1 Like

Currently it only runs well on servers compiled this month, so the linux version might not be working properly (yet)? No idea about it. Though someone said it was working, no idea about it though. So I am sorry.

I fear I do not see what is wrong, you might need to run it with

set mysql_debug 1

to see what it is executing.

i did not know about this one ^^ i’ll try asap and let you know

" UPDATE owned_vehicles SET state =false WHERE plate=‘UO224AV’ " seems to be working (i’m using the new plate system)

that user inventory query though. takes quite a while.

I see an issue though. 7th line from the bottom does nothing. The plate is not pushed through to the query string somehow. This seems to be an issue with the resource.

with the classic mysql-async it works flawlessly

It does not. It should error on this, to be honest. Because the query is faulty.

edit: It should mysql-async did not, and never did.

i’m actually using it in the real server XD that’s weird

that’s the code

AddEventHandler('eden_garage:modifystate', function(vehicleProps, state)
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	if xPlayer ~= nil then
		local vehicules = getPlayerVehicles(xPlayer.getIdentifier())
		local plate = vehicleProps.plate
		local state = state

		for _,v in pairs(vehicules) do
			MySQL.Sync.execute("UPDATE owned_vehicles SET state =@state WHERE plate=@plate",{['@state'] = state , ['@plate'] = plate})
			break		
		end
		
	end
end)	

vehicleProps.plate was null/nil at some point. Maybe it was a bike? I got no idea about this. Should definately check though if plate is nil or something.

This is an issue with the resource though. Are you in discord?

I will probably update so it shows the result of the query too.

yeah i am :slight_smile:

added, print(plate) in the function

don’t use excessive prints unless necessary. See pm for discord. should be better there than spamming the topic, as I would like to find out whether this is related to the implementation or just shitty resource writing.

i actually added 1 is my server that done like this XD

It seems mysqljs is rendering tinyint(1) not as true or false but as 1 or 0, which caused the issue; as the script is based on a boolean. But lua treats 0 as true.

Updated the node variant with an fix to the issue:

Tinyint(1) is now automatically converted to true/false. Should no further issues arise by Friday, it will go to master.

Download from:

Node Variant Branch or from Releases

And test out the node.js version.

Thanks @manups4e for helping identify this issue.

Hello!

Since yesterday i work for the first time on a server for the game FiveM.

I wanted to install Cops_FiveM what also needed MySQL.

This error i cannot figure out what i did wrong.

Already one time i delete all database.

[ERROR] [MySQL] An error happens on MySQL for query "SELECT rank,dept FROM police WHERE identifier = 'steam:1100001006a4aef' {@identifier=steam:1100001006a4aef}": 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 ',dept FROM police WHERE identifier = 'steam:1100001006a4aef'' at line 1