Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by MySQL R28 changelog
[...]
- edited threading design: plugin uses one thread fewer; connections to the MySQL server are now established/closed in real-time
- added optional parameter "autoreconnect" to mysql_connect to control whether the plugin should reconnect automatically if connection is lost
[...]
|
Added that yesterday. The only mysql functions executed in a separate thread are mysql_connect and mysql_close, which are also called only if autoreconnect = true.
Oh, and
Quote:
Originally Posted by MySQL R28 changelog
- re-added our old and beloved native mysql_errno
|
inb4 why didn't you did this earlier
inb4 you said it isn't possible
Sorry :/
Posts: 845
Threads: 3
Joined: Jun 2010
Remove "#include <YSI\y_inline>" from your code.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
13.07.2013, 06:56
(
Last edited by MP2; 13/07/2013 at 09:31 AM.
)
I've been using R7 since it was released and haven't upgraded, because things seem to be going backwards. Why was mysql_ping removed? How can you check if the connection is a success..? Why remove stuff that isn't broken? For fuck's sake. At least make mysql_connect return -1 if the connection failed..
Posts: 29
Threads: 6
Joined: Sep 2012
Reputation:
0
Thanks For R29 ! Good Revision !
I have discovered a bug , and my server doesn't working with R29.
In my Database I have 'id' and I load 'id' column as :
cache_get_field_content_int( 0, "Id" );
not
cache_get_field_content_int( 0, "id" );
And it causes crash .
Now I am asking why with R27 =< versions can load cache_get_field_content_int( 0, "Id" ); not
cache_get_field_content_int( 0, "id" ); . Can you explain this ?
But i solved that problem .
Posts: 1,801
Threads: 27
Joined: Mar 2009
Reputation:
0
Really good releases, thanks for your work. :P
Posts: 845
Threads: 3
Joined: Jun 2010
16.07.2013, 13:20
(
Последний раз редактировалось maddinat0r; 16.07.2013 в 14:03.
)
Quote:
Originally Posted by MP2
Why was it removed in the first place?
|
Because of the multi-threading. At first the mysql_errno call in the plugin was not protected with a mutex (which is the main reason for not having a mysql_errno native). Then I saw in R26 that it caused problems with the OnQueryError callback and protected the call. And finally while developing R28 I realized that some things were quite unnecessary, changed some code and reimplemented mysql_errno.
Quote:
Originally Posted by Kar
My server locked up here (Windows)
pawn Код:
[02:22:39] [DEBUG] Calling callback "Thread_OnPlayerDrugPlantsLoad".. [02:22:39] [DEBUG] cache_get_data - connection handle: 1 [02:22:39] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [02:23:03] [DEBUG] mysql_tquery - connection handle: 1 [02:23:03] [DEBUG] mysql_tquery - scheduling query "UPDATE `Houses` SET `LastVisitDate` = UNIX_TIMESTAMP() WHERE `Houseid` = 5 LIMIT 1".. [02:23:03] [DEBUG] ExecuteT[()] - starting query execution [02:23:04] [DEBUG] ExecuteT[()] - query was successful [02:23:04] [DEBUG] ExecuteT[()] - no callback specified, skipping result saving
I've been getting issues since r28 with NPCS (debug is on)
pawn Код:
[16/07/2013 02:29:48] NPC Connect: Bad player ID (127.0.0.1) [16/07/2013 02:29:48] NPC Connect: Bad player ID (127.0.0.1) [16/07/2013 02:29:48] NPC Connect: Bad player ID (127.0.0.1)
|
I'll take a look at it.
Quote:
Originally Posted by MP2
Could you add 'fake natives' for mysql_function_query etc. (function macros) so they show up in pawno? Thanks. (define them as a native function inside a comment block (not sure if single lines work))
|
Sure, no problem.
Quote:
Originally Posted by []Allex[]
I have discovered a bug , and my server doesn't working with R29.
In my Database I have 'id' and I load 'id' column as :
cache_get_field_content_int( 0, "Id" );
not
cache_get_field_content_int( 0, "id" );
And it causes crash .
Now I am asking why with R27 =< versions can load cache_get_field_content_int( 0, "Id" ); not
cache_get_field_content_int( 0, "id" ); . Can you explain this ?
But i solved that problem .
|
You should treat MySQL as case sensitive (well it actually ignores case sensitivity on Windows, but does not on Linux).
EDIT:
Quote:
Originally Posted by GiamPy.
New crash when using "exit" on server disconnection.
|
Thanks for reporting, this crash is now fixed in R30.
Quote:
Originally Posted by Drake1994
I think found the crash reason. I set the player name when it's logged like this:
[...]
E1.: I don't know why, but if i create a local variable, and fill it with cache_get_field_content, it work fine, but if i use an array, like: PlayerInfo[playerid][pNev] to store, it does not fill up.
|
This is a well known "bug" with enum-arrays (like your PlayerInfo array) which exists since R8. Just specify the max_len in the native (it's an optional parameter) or use the method you already said (storing it into a temporary variable and then copy the content of the temporary variable into the enum-array).
Posts: 845
Threads: 3
Joined: Jun 2010
16.07.2013, 14:48
(
Последний раз редактировалось maddinat0r; 16.07.2013 в 15:32.
)
Are you using R29?
EDIT:
@Kar, are you sure the MySQL plugin causes this?
Posts: 845
Threads: 3
Joined: Jun 2010
Okay, your crashdetect report says that the datatype conversion is the problem. I changed the datatype conversion again, so that shouldn't happen anymore. I'll release R30 with that bugfix when I've dealt with Kar's problem.
Posts: 913
Threads: 70
Joined: Apr 2009
Reputation:
0
16.07.2013, 19:04
(
Последний раз редактировалось kurta999; 16.07.2013 в 19:39.
)
Okey thanks.
Anyway if I log into mysql the chat and commands then this shouldn't cause any laggs, shouldn't? (ex. 2chat msg, 2cmdtext per 1sec)
Because the plugin uses multithread.
And example, if I want to send 1000queries then I should use sleep() before them or can I send it at the same time?
EDIT: About Kar's locked up problem, I get very often lag on my server and it's now unplayable. So If this caused by plugin, then I can confirn it. With the r28 no lagg, but when I updated to r29 i get lagg very often. I think this is host problem, but if Kar says this caused by the plugin then not.
Posts: 845
Threads: 3
Joined: Jun 2010
16.07.2013, 19:39
(
Последний раз редактировалось maddinat0r; 16.07.2013 в 23:13.
)
It shouldn't cause any lags.
You can send 1000 queries at the same time, but prepare for small lags (like 1sec or so).
EDIT:
Kar said he has a complete lockdown, you just seem to have some lags. These laggs should be also fixed in R30.
EDIT2:
R30 is released.
Changes:
- changed datatype conversion again (method in R29 was slow and still bugging)
- fixed some log messages
- fixed crash when unloading the plugin
- code improvements
Posts: 1,190
Threads: 196
Joined: Dec 2011
Reputation:
0
thanks but what are the best kind of queries? threaded or unthreaded cuz i don't know nothing about mysql.