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

This is a client crash not a server crash. The MySQL plugin doesn't crash clients, so your problem is not related to this plugin.
Reply

Quote:
Originally Posted by Mellnik
Посмотреть сообщение
This is a client crash not a server crash. The MySQL plugin doesn't crash clients, so your problem is not related to this plugin.
so whats the solution please ?
any tips ?
Reply

Would be very good, if plugin would use logtimeformat from server.cfg for logging into mysql_log. Log only h:m is useless for me.
Reply

Quote:
Originally Posted by Mellnik
Посмотреть сообщение
This is a client crash not a server crash. The MySQL plugin doesn't crash clients, so your problem is not related to this plugin.
I think it's from crashinfo.txt and his problem actually is related to the plugin. This is what he PMed me:
Quote:
Originally Posted by Tidzii
alright this what gives
in server log.

Quote:

[20:28:34] [debug] Server crashed while executing NXRP.amx
[20:28:34] [debug] AMX backtrace:
[20:28:34] [debug] #0 native mysql_connect () [614edf10] from mysql.DLL
[20:28:34] [debug] #1 0038392c in ?? () from NXRP.amx
[20:28:34] [debug] #2 005319d0 in ?? () from NXRP.amx
[20:28:34] [debug] #3 0000d9ec in public Itter_OnGameModeInit () from NXRP.amx
[20:28:34] [debug] #4 native CallLocalFunction () [00472ad0] from samp-server.exe
[20:28:34] [debug] #5 00008c08 in public ScriptInit_OnGameModeInit () from NXRP.amx
[20:28:34] [debug] #6 00007b8c in public SSCANF_OnGameModeInit () from NXRP.amx
[20:28:34] [debug] #7 00001ee8 in public zcmd_OnGameModeInit () from NXRP.amx
[20:28:34] [debug] #8 native CallLocalFunction () [00472ad0] from samp-server.exe
[20:28:34] [debug] #9 000018dc in public OnGameModeInit () from NXRP.amx

after he got the R38 loading.

@Kar: The query is problably with INSERT clause.
Reply

Quote:
Originally Posted by Kar
Посмотреть сообщение
This is really hard to debug.

[21:27:06] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[21:27:09] [ERROR] CMySQLQuery::Execute[] - (error #1136) Column count doesn't match value count at row 1

Using LOG_ALL
There must be a "mysql_tquery" function call logged some lines above those log lines with a part of the query shown in the log line.

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I think it's from crashinfo.txt and his problem actually is related to the plugin. This is what he PMed me:


after he got the R38 loading.
Can he reproduce that crash? Also it would be helpful if he could show the content of the mysql_log.txt (with LOG_ALL of course).
Reply

Quote:
Originally Posted by Gigi-The-Beast
Посмотреть сообщение
Hey madd could you explain this a bit more please?
https://github.com/pBlueG/SA-MP-MySQL/issues/18
R40 will include a re-worked logging system. That means that errors and warnings will provide more useful information, like the line of code where the error/warning occurred.
Reply

Excellent man!
Keep up the good work
Reply

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
Using LOG_ALL and LOG_TYPE_HTML, still couldn't reproduce it.
Well here is a picture, it doesn't seem to show for some reason, even though I refresh the browser, or close the tab and open again nothing is printed, the picture explains everything.

Reply

When I start my server I get this...


Started server on port: 7777, with maxplayers: 500 lanmode is OFF.

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::except ion_detail::error_info_injector<boost::thread_reso urce_error> >'
what(): boost::thread_resource_error: Resource temporarily unavailable

[3] Aborted ./samp03svr

This happens when the mysql begins to load. Any clue why?
Reply

I have a problem...

My server is CentOS 6.4 64bits ... host use xampp software

when i start server, server successfully connect mysql database

but server don't load any data... why?

not srcipt problem... because it can work Windows.
Reply

Quote:
Originally Posted by Patrick_
Посмотреть сообщение
Well here is a picture, it doesn't seem to show for some reason, even though I refresh the browser, or close the tab and open again nothing is printed, the picture explains everything.
Huh, unbelievable, this is indeed a bug (and also a very stupid mistake on my side). Now I also reproduced it. The problem is, that there are two semicolons too much in the function name of every "invalid connection" log message (and also in the ORM counterpart message too). JavaScript doesn't like this and stops executing, that's why nothing is shown.

Quote:
Originally Posted by JavaunMiller
Посмотреть сообщение
When I start my server I get this...


Started server on port: 7777, with maxplayers: 500 lanmode is OFF.

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::except ion_detail::error_info_injector<boost::thread_reso urce_error> >'
what(): boost::thread_resource_error: Resource temporarily unavailable

[3] Aborted ./samp03svr

This happens when the mysql begins to load. Any clue why?
What's your OS? Please give a detailed answer (name of distribution, architecture).

Quote:
Originally Posted by sony112502
Посмотреть сообщение
I have a problem...

My server is CentOS 6.4 64bits ... host use xampp software

when i start server, server successfully connect mysql database

but server don't load any data... why?

not srcipt problem... because it can work Windows.
Check your mysql_log.txt, it should hint you where the mistake is at. I hardly doubt that the server just doesn't load any data without any error or warning message.
Reply

Well, I can see that some people have strange problems with it.

After two years of starting to use the plugin I can say, that there were only FEW problems.
Reply

Yesterday I upgraded from R17 to R39-2 and I have a few questions about this new update.

1) I've decided to go with the rewritten multi-thread system, but how does the pool_size option work exactly? I understand that it regulates the amount of threads. Are there any consequences if you set this to a high number? Are pools and connection handles the same thing?

2) Since mysql_ping has been removed I tried reaching a similar effect by using OnQueryError. However, it does not seem to work. I receive no print in my console.

pawn Код:
public OnQueryError(errorid, error[], callback[], query[], connectionHandle)
{
    if(errorid == 2003*) return print("No reacho MySQLlo servo");
   
    return printf("[MYSQL]: Error in query: (%s)\nError ID %d: %s.", query, errorid, error);
}
Am I doing something wrong here?

* And yes, I used this site for the error code.

3) Can you tell me for sure that all crashing problems regarding the %e-parameter in mysql_format have been fixed?
This was a real pain in the ass a year or so ago, and if I remember correctly the fix was rather problematic.
Reply

1) These pools are only for mysql_pquery as far as I know. Just leave it the default setting.

2) Check if mysql_errno returns 0 after mysql_connect, if yes connection was successful.

3) Yes, the entire R39 plugin is safe to use.
Reply

Can you add callback OnMySQLConnect/OnMySQLReconnect?
Reply

Quote:
Originally Posted by Danny
Посмотреть сообщение
Yesterday I upgraded from R17 to R39-2 and I have a few questions about this new update.

1) I've decided to go with the rewritten multi-thread system, but how does the pool_size option work exactly? I understand that it regulates the amount of threads. Are there any consequences if you set this to a high number? Are pools and connection handles the same thing?
[...]
Mellnik already summed it up pretty well. However, I want to give you a more detailed answer on 1):
The multi-thread system holds a pool of several direct connections to the MySQL server. Usually, there are only two direct connections: the threaded one (mysql_tquery) and the unthreaded one (mysql_query). However, there is also mysql_pquery, which concurrently sends queries over several direct connections, which are in the pool mentioned earlier. You can adjust that number of connections via the pool_size parameter in mysql_connect.
The MySQL server limits the number of direct connections (I think 10 by default), so settings the pool size to a high number is very bad and will possibly prevent other programs from accessing the MySQL server.

Quote:
Originally Posted by =KempeR=
Посмотреть сообщение
Can you add callback OnMySQLConnect/OnMySQLReconnect?
Why? Just use mysql_errno or the automatic reconnect feature (which is enabled by default anyway).
Reply

Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
Why? Just use mysql_errno or the automatic reconnect feature (which is enabled by default anyway).
I am setting charset after mysql_connect and charset sets to default after reconnect
Код:
	mysql_tquery(DBH, "SET NAMES cp1251;", "", "");
	mysql_tquery(DBH, "SET SESSION character_set_server='utf8';", "", "");
Reply

Quote:
Originally Posted by Mellnik
Посмотреть сообщение
1) These pools are only for mysql_pquery as far as I know. Just leave it the default setting.

2) Check if mysql_errno returns 0 after mysql_connect, if yes connection was successful.

3) Yes, the entire R39 plugin is save to use.
Quote:
Originally Posted by maddinat0r
Посмотреть сообщение
Mellnik already summed it up pretty well. However, I want to give you a more detailed answer on 1):
The multi-thread system holds a pool of several direct connections to the MySQL server. Usually, there are only two direct connections: the threaded one (mysql_tquery) and the unthreaded one (mysql_query). However, there is also mysql_pquery, which concurrently sends queries over several direct connections, which are in the pool mentioned earlier. You can adjust that number of connections via the pool_size parameter in mysql_connect.
The MySQL server limits the number of direct connections (I think 10 by default), so settings the pool size to a high number is very bad and will possibly prevent other programs from accessing the MySQL server.
Thank you both for your response, it really helped me!
Reply

I am here again to report a bug. 3 bugs reported in 1 week! Am I the only one who gets this error on mysql_tquery_inline? Someone please confirm this, basically the problem is every time I use mysql_tquery_inline it produces arguement mismatch error, I have also reported this on Github (https://github.com/pBlueG/SA-MP-MySQL/issues/26)

even this 6 lines code produces argument mismatch
pawn Код:
inline FetchAccountData(inline_playerid)
{
    #pragma unused inline_playerid
    printf("inline function called ply_id: %i", playerid);
}
mysql_tquery_inline(dbHandle, "SELECT Username FROM Accounts WHERE Username = 'pds2k12'", using inline FetchAccountData, "i", playerid);
FIXED: Solution on reply #2 (https://github.com/pBlueG/SA-MP-MySQL/issues/26)
Reply

The server crashes when log files cannot be created (no permissions etc), at least make the plugin print something about it.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)