SuperiorServers / gm_tmysql4

MySQL connection module for Garry's Mod servers - SUP has picked up and maintained the module since it was abandoned years ago - Original author: @bkacjios
31 stars 7 forks source link

Odd issue with error handling #11

Open VaasKahnGrim opened 3 years ago

VaasKahnGrim commented 3 years ago

Basically when ever there is an error for tmysql its not displaying the full error for me. I'm currently using the mysql.lua file from Dash along with this version of tmysql.

As for where the error is originating, I know for a fact its in the callback function of DB:Query(), however I can't get any sort of info on where in the callback the error is happening at sql_errors_broken

osiris-plus commented 3 years ago

The handling also majorly broken if you make syntax mistakes in SQL. It will return corrupt error messages (which can signal memory corruption), and it will probably crash your server shortly after error.

KingofBeast commented 3 years ago

There was a difference in behavior for error messages between regular queries and prepared statements that should have been fixed in the latest commit - prepared statements weren't always returning anything useful with their error method