[Plugin] [REL] MySQL Plugin (Now on github!)

Nice one ! Thanks !
Reply

Thanks maddinat0r.
Reply

Thanks.
Reply

What should I replace mysql_free_result with after updating from R37 to R38?
Reply

Quote:
Originally Posted by kvann
Посмотреть сообщение
What should I replace mysql_free_result with after updating from R37 to R38?
Why do you use mysql_free_result at all? mysql_free_result was a PAWN function defined inside the include which did absolutely nothing.
Reply

What about re-adding mysql_ping() but for get the real time ping between mysql server and the samp server?
Reply

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
Ohh... I hadn't looked at the include at all.
Reply

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
Do results clear automatically now?
Reply

Quote:
Originally Posted by Calgon
Посмотреть сообщение
Do results clear automatically now?
Afaik they have done for awhile, atleast R26+.
Reply

Quote:
Originally Posted by Calgon
Посмотреть сообщение
Do results clear automatically now?
They do since R7. You have to delete the cache manually though if you are using "cache_save" or "mysql_query".

EDIT:
Whoops, forgot that there were also uncached queries in R7. Results are cleared automatically since R21.
Reply

My script was working in R37, but now in R38, it isn't.

Now I recompiled it and it says: error 017: undefined symbol "mysql_num_rows".

What I have to do now?
Reply

Quote:
Originally Posted by KovaNovik
View Post
My script was working in R37, but now in R38, it isn't.

Now I recompiled it and it says: error 017: undefined symbol "mysql_num_rows".

What I have to do now?
Replace "mysql_num_rows" with "cache_num_rows" or "cache_get_row_count".
Reply

@ maddinat0r: Can you help with a problem i have with mysql r38? You can find it here:
https://sampforum.blast.hk/showthread.php?tid=499935
Reply

Is there a reason why it spams my logs? or is this normal?

Code:
[03:38:19] [DEBUG] CMySQLHandle::Create - creating new connection..
[03:38:19] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[03:38:19] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[03:38:19] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[03:38:19] [DEBUG] CMySQLConnection::Connect - connection was successful
[03:38:19] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been disabled
[03:38:19] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[03:38:19] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[03:38:19] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[03:38:19] [DEBUG] CMySQLConnection::Connect - connection was successful
[03:38:19] [DEBUG] CMySQLConnection::Connect - connection was successful
[03:38:19] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been disabled
[03:38:19] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been disabled
[03:38:19] [DEBUG] CMySQLConnection::Connect - connection was successful
[03:38:19] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been disabled
Just one mysql_connect() with mysql_log(LOG_ALL,LOG_TYPE_TEXT); in OnGameModeInit(). I think the DB type is InnoDB. Can someone explain this? The last MySQL plugin i used was fine and had none of this (R6).
Reply

thats because of your pool size
Reply

R5 was best
Reply

So my issue is nothing to worry about? Or should I change pool size?
Reply

Quote:
Originally Posted by Arjanz
View Post
R5 was best
How R5 is best? After R6, the MySQL plugin supports threaded queries which are faster than unthreaded queries of MySQL R1 to R6 or R6-2 (which was later moved to R7 with threaded queries support).


Quote:
Originally Posted by DobbysGamertag
View Post
So my issue is nothing to worry about? Or should I change pool size?
What is your pool size set to? It is 2 by default.
Reply

Quote:
Originally Posted by DobbysGamertag
View Post
Is there a reason why it spams my logs? or is this normal?

Code:
[03:38:19] [DEBUG] CMySQLHandle::Create - creating new connection..
[03:38:19] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[03:38:19] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[03:38:19] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[03:38:19] [DEBUG] CMySQLConnection::Connect - connection was successful
[03:38:19] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been disabled
[03:38:19] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[03:38:19] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[03:38:19] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[03:38:19] [DEBUG] CMySQLConnection::Connect - connection was successful
[03:38:19] [DEBUG] CMySQLConnection::Connect - connection was successful
[03:38:19] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been disabled
[03:38:19] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been disabled
[03:38:19] [DEBUG] CMySQLConnection::Connect - connection was successful
[03:38:19] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been disabled
Just one mysql_connect() with mysql_log(LOG_ALL,LOG_TYPE_TEXT); in OnGameModeInit(). I think the DB type is InnoDB. Can someone explain this? The last MySQL plugin i used was fine and had none of this (R6).
You knew, there is a nice F.A.Q. on the Github site with exactly the same question as yours (I don't blame you for not seeing it, just want to say that there is a F.A.Q).

Quote:
Originally Posted by F.A.Q.
Q: I get a ton of debug messages regarding connections even though I'm calling mysql_connect only once, why is that so?
A: That's because the plugin uses multiple direct database connections per connection handle. The number of direct connections (and thus the number of those log messages) is 2+pool_size.
Reply

@maddinat0r, why did you start field indexes at 0 and not 1?
Reply


Forum Jump:


Users browsing this thread: 31 Guest(s)