brouznouf / fivem-mysql-async

MySql Async Library for FiveM
MIT License
111 stars 106 forks source link

SELECT does not return? #23

Closed justcfx2u closed 7 years ago

justcfx2u commented 7 years ago

Current master 13d68525e75e287e083e77dc4b4ae36279ae4acb does not return data from SELECTs.

Running FXServer with ONLY the mysql-async resource started and with example.lua enabled yields this failure.

[] [C: 0ms, Q: 0ms, R: 1ms] SELECT "hello1" as world {=}
Error running system event handling function for resource mysql-async: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: example.lua:59: attempt to index a nil value (field '?')
stack traceback:
        example.lua:59: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
        [C]: in function 'coroutine.resume'
        citizen:/scripting/lua/scheduler.lua:33: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>
hitch warning: frame time of 438 milliseconds

This can be replicated using EssentialMode 4 + esplugin_mysql, and fully-custom code, where character selection tends to explode.

Downgrading to https://github.com/brouznouf/fivem-mysql-async/releases/tag/v2.0.0-beta-6 does not exhibit this problem.

Identity-labs commented 7 years ago

+1

FrBillyD commented 7 years ago

Hello, same problem.

https://pastebin.com/2XNSSujR

Herb4t- commented 7 years ago

Yup, same here, @justcfx2u you used Async or Sync ?

TerenceJefferies commented 7 years ago

Same issue - I have tested on both Sync and Async - Both fail to return any data - just an empty table in my tests.

Herb4t- commented 7 years ago

really need a fix for the lib on linux but i don't know if the dev is still aware

justcfx2u commented 7 years ago

He is. Use beta6 until this is resolved.

joelwurtz commented 7 years ago

Should be good, can you test the last version (master) ?

Herb4t- commented 7 years ago

Yup, tell you if something wrong ;)