Quote:
Originally Posted by OciXCrom
When you have the time to continue reviewing, I would like to ask you to make a more in-depth review of the SQL part of the code, since this is my first time using SQL in a plugin and I have been getting some reports of SQL throwing errors. Here's one here.
I need to know if this is a problem from my plugin or something else. Thanks again.
|
I never worked with the mysql amxx api, but I read the docs before reviewing and it looked pretty straightforward.
Quote:
Originally Posted by mi0epro
It did fix it.
|
I really doubt that.
https://github.com/alliedmodders/amx...e/sqlx.inc#L36 states that freeing/not freeing this has no effect over the connection, it just cleans the cached information. I would say to free it regardless tho.
I can't say for sure why it's not working for some people, but here are a few things you may try:
Look at line 239. If the query fails it will never reach
PHP Code:
SQL_FreeHandle(iQueries)
SQL_FreeHandle(iSqlConnection)
Freeing the handles should be done even if the code enters in the if check body.
I do not know if this is the source of the problem reported before, but it certainly can be a problem when/if a query fails.
(this applies to all places where you are doing that, not gonna list them all).
Also, did you manage to reproduce the issue?
__________________