SuperiorServers / dash

Collection of libraries, utilities, and core Garry's Mod changes intended to improve development of addons and gamemodes
Other
66 stars 20 forks source link

Error with mysql wrapper. #4

Closed AMD-NICK closed 7 years ago

AMD-NICK commented 7 years ago

image

Happens after DB:Disconnect() Attempted to call Query on a disconnected database

aStonedPenguin commented 7 years ago

I don't think you should be calling query after you disconnect the database. It should throw an error as the module did, the module causing a crash however isn't exactly good.

AMD-NICK commented 7 years ago

The thing is that after the connection to the database is lost, the utf8mb4 encoding is lost and the Cyrillic symbols start appearing as question marks. A forced DB:SetCharacterSet("utf8mb4") after reconnection doesn't work, so I thought that if I disconnect from the a DB manually and connect again, and set the needed character set, everything will be fixed.

Maybe you could process the error "Attempted to call Query on a disconnected database", and make it so all the queries would be added to the table, but not executed?

aStonedPenguin commented 7 years ago

That also sounds a lot like a module issue. Being that tmysql isn't maintained the best route would be to move the wrapper over to a different module if no one wants to pick up maintaining tmysql.

AMD-NICK commented 7 years ago

Ok, thanks. Which module you recommend to use?

aStonedPenguin commented 7 years ago

I've been using tmysql exclusively the past two years. I think mysqloo is the only relevant alternative. I've been meaning to see if performance is as shit as it used to be.