Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database Issue #15

Closed
rcon420 opened this issue Mar 30, 2021 · 6 comments
Closed

Database Issue #15

rcon420 opened this issue Mar 30, 2021 · 6 comments
Labels
bug Something isn't working fixed This bug has been fixed

Comments

@rcon420
Copy link
Contributor

rcon420 commented Mar 30, 2021

Describe the bug
A clear and concise description of what the bug is as well as how to reproduce it.
MYSQL Database table isn't created

my config:

"driver_default" "mysql"

"no_dupe_account"
{
	"driver"			"default"
	"host"				"privateinfo"
	"database"			"privateinfo"
	"user"				"privateinfo"
	"pass"				"privateinfo"
	//"timeout"			"0"
	"port"				"3306"
}

Error logs
If any error log, paste it here or screenshot it.

L 03/30/2021 - 14:14:05: [SM] Blaming: anticheat/no_dupe_account.smx
L 03/30/2021 - 14:14:05: [SM] Call stack trace:
L 03/30/2021 - 14:14:05: [SM] [0] SQL_FetchInt
L 03/30/2021 - 14:14:05: [SM] [1] Line 1712, D:\Perso\GitHub\sm-no-dupe-account\scripting\no_dupe_account.sp::OnCheckSQLPlayer2
L 03/30/2021 - 14:42:25: [SM] Exception reported: Current result set has no fetched rows

@rcon420 rcon420 added the bug Something isn't working label Mar 30, 2021
@azalty
Copy link
Owner

azalty commented Mar 30, 2021

From what I see, the plugin didn't detect that the DB didn't exist, and failed because no rows were retrieved...

Are you sure the plugin didn't create tables into the database?

I was pretty sure I added checks to see if rows were found...

I'll have a look, thanks

@azalty
Copy link
Owner

azalty commented Mar 30, 2021

Okay now this is very particuliar

It seems like the previous data "last_check" was found but no other columns was found, which should be impossible since they are all set to "NOT NULL" and they are all added and removed at the same time...

Does that issue occur with every player?

@rcon420
Copy link
Contributor Author

rcon420 commented Mar 31, 2021

From what I see, the plugin didn't detect that the DB didn't exist, and failed because no rows were retrieved...

Are you sure the plugin didn't create tables into the database?

I was pretty sure I added checks to see if rows were found...

I'll have a look, thanks

Yes I'm pretty sure that table isn't made

@azalty
Copy link
Owner

azalty commented Mar 31, 2021

Yes I'm pretty sure that table isn't made

Could you please try to connect to your database and do show tables; and select * from players;? Or if you have a web interface, make sure they don't exist?

I don't have a testing MySQL database and I don't really know the language, but from what I tested, all websites said my syntax was correct, and the plugin didn't stop due to an error while creating the tables 🤔

@rcon420
Copy link
Contributor Author

rcon420 commented Apr 2, 2021

Yes I'm pretty sure that table isn't made

Could you please try to connect to your database and do show tables; and select * from players;? Or if you have a web interface, make sure they don't exist?

I don't have a testing MySQL database and I don't really know the language, but from what I tested, all websites said my syntax was correct, and the plugin didn't stop due to an error while creating the tables

uhm not sure if I can do that I don't have full access to the DB since its under my game host

@azalty azalty added the help wanted Extra attention is needed label Apr 3, 2021
@azalty azalty closed this as completed in 5390653 Apr 9, 2021
@azalty azalty added fixed This bug has been fixed and removed help wanted Extra attention is needed labels Apr 9, 2021
@azalty
Copy link
Owner

azalty commented Apr 9, 2021

Found the problem. A specific function wasn't called, and seems like it wasn't necessary for SQLite but it was for MySQL.

The fix is available on the beta 'main' branch, but it should be stable as of now (even though it is untested).

It'll be available on the next stable release as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed This bug has been fixed
Projects
None yet
Development

No branches or pull requests

2 participants