Re: [REL] MySQL Plugin (Now on github!) -
IstuntmanI - 07.03.2014
Nice one ! Thanks !
Re: [REL] MySQL Plugin (Now on github!) -
iZN - 07.03.2014
Thanks maddinat0r.
Re: [REL] MySQL Plugin (Now on github!) -
iBeast - 07.03.2014
Thanks.
Re: [REL] MySQL Plugin (Now on github!) -
kristo - 09.03.2014
What should I replace mysql_free_result with after updating from R37 to R38?
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 09.03.2014
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.
Re: [REL] MySQL Plugin (Now on github!) -
kurta999 - 09.03.2014
What about re-adding mysql_ping() but for get the real time ping between mysql server and the samp server?
Re: [REL] MySQL Plugin (Now on github!) -
kristo - 09.03.2014
Quote:
Originally Posted by maddinat0r
|
Ohh... I hadn't looked at the include at all.
Re: [REL] MySQL Plugin (Now on github!) -
Calgon - 09.03.2014
Quote:
Originally Posted by maddinat0r
|
Do results clear automatically now?
Re: [REL] MySQL Plugin (Now on github!) -
Kyle - 09.03.2014
Quote:
Originally Posted by Calgon
Do results clear automatically now?
|
Afaik they have done for awhile, atleast R26+.
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 09.03.2014
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.
Re: [REL] MySQL Plugin (Now on github!) -
KovaNovik - 09.03.2014
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?
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 09.03.2014
Quote:
Originally Posted by KovaNovik
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".
Re: [REL] MySQL Plugin (Now on github!) -
Admigo - 10.03.2014
@ 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
Re: [REL] MySQL Plugin (Now on github!) -
DobbysGamertag - 12.03.2014
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).
Re: [REL] MySQL Plugin (Now on github!) -
Kar - 12.03.2014
thats because of your pool size
Re: [REL] MySQL Plugin (Now on github!) -
Arjanz - 12.03.2014
R5 was best
Re: [REL] MySQL Plugin (Now on github!) -
DobbysGamertag - 12.03.2014
So my issue is nothing to worry about? Or should I change pool size?
Re: [REL] MySQL Plugin (Now on github!) -
iZN - 12.03.2014
Quote:
Originally Posted by Arjanz
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
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.
Re: [REL] MySQL Plugin (Now on github!) -
maddinat0r - 12.03.2014
Quote:
Originally Posted by DobbysGamertag
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.
|
Re: [REL] MySQL Plugin (Now on github!) -
Kar - 19.03.2014
@maddinat0r, why did you start field indexes at 0 and not 1?