Re: [REL] MySQL Plugin (****** Project) -
IstuntmanI - 22.06.2013
Quote:
Originally Posted by DeathKing
Code:
[23:02:05] Loading plugin: mysql
[23:02:05] >> plugin.mysql: Multi-Threading is deactivated due to bad CPU.
[23:02:05] >> plugin.mysql: R26 successfully loaded.
[23:02:05] Loaded.
how am i suppose to multi thread  any other ways?
|
Multi-Threading is just to improve the speed of queries, it isn't obligatory to have it enabled, the speed is still good without it. You should read above, Pain123 said that Multi-Threading is enabled when you have 3+ cores at CPU.
EDIT: Didn't saw Pain123's reply, I didn't refreshed this page few minutes. xD
Re: [REL] MySQL Plugin (****** Project) - Riddy - 22.06.2013
Code:
[23:02:05] >> plugin.mysql: Multi-Threading is deactivated due to bad CPU.
A 2 core CPU isn't always bad, so you can have the error message as "Incompatible CPU for Multi-threading (3 cores and above required)".
Anyways, it isn't required, just saying.
AW: [REL] MySQL Plugin (****** Project) -
maddinat0r - 22.06.2013
Yep, I'll change the message.
Has anyone any other suggestions? R27 has now y_inline support, but only this as feature seems quite boring.
A preview:
pawn Code:
public OnPlayerConnect(playerid) {
inline Test2(d1, d2) {
new
Rows,
Fields;
cache_get_data(Rows, Fields, SQL);
printf("Rows: %d; Fields: %d", Rows, Fields);
}
mysql_tquery_inline(SQL, Query, using inline Test2, "dd", 22, 42);
return 1;
}
Re: [REL] MySQL Plugin (****** Project) - Riddy - 23.06.2013
Any idea why this wouldn't be working at all. Not been paying a attention of updates since R20.
Code:
mysql_function_query(dbHandle, "SELECT * FROM properties", true, "LoadProp", "", "");
Code has came to a complete halt. Doesn't even work, ju took a somewhat big leap from r20 to r26.
I don't need to go any further, as LoadProp is not called.
Re: [REL] MySQL Plugin (****** Project) -
maddinat0r - 23.06.2013
Are any errors or warnings logged?
Re: AW: [REL] MySQL Plugin (****** Project) -
Richie© - 23.06.2013
Quote:
Originally Posted by Pain123
Yep, I'll change the message.
Has anyone any other suggestions? R27 has now y_inline support, but only this as feature seems quite boring.
A preview:
pawn Code:
public OnPlayerConnect(playerid) { inline Test2(d1, d2) { new Rows, Fields; cache_get_data(Rows, Fields, SQL); printf("Rows: %d; Fields: %d", Rows, Fields); }
mysql_tquery_inline(SQL, Query, using inline Test2, "dd", 22, 42); return 1; }
|
This looks like non-threaded, will it benefit performance in any way? Or just be easier to use?
Re: AW: [REL] MySQL Plugin (****** Project) -
Kyle - 23.06.2013
Quote:
Originally Posted by Richie©
This looks like non-threaded, will it benefit performance in any way? Or just be easier to use?
|
It isn't, I thought it was too.
Basically it just allows the callback to be put in the function where you call the query.
Re: AW: [REL] MySQL Plugin (****** Project) -
Richie© - 23.06.2013
Quote:
Originally Posted by KyleSmith
It isn't, I thought it was too.
Basically it just allows the callback to be put in the function where you call the query.
|
Its called exactly from inline is used?
Re: [REL] MySQL Plugin (****** Project) -
magnusburton - 24.06.2013
This might look like a noob-question but I get the error
error 017: undefined symbol "mysql_query_callback" and in the include there's this define which uses the mysql_function_query() function which leads to the question - what causes this error?
AW: [REL] MySQL Plugin (****** Project) -
maddinat0r - 24.06.2013
I removed that define is a previous revision, what version are you using? (R8, R14, ...)
And why don't you just use mysql_function_query?
Re: [REL] MySQL Plugin (****** Project) -
cray1100 - 24.06.2013
I cant load it, it says This application has failed to start because LIBMYSQL.dll was not found. PLEASE HELP?
Re: [REL] MySQL Plugin (****** Project) -
Pooh7 - 24.06.2013
libmysql.dll is located on the exact same page from which you've downloaded the plugin. You can find it at the end of the first post, too.
Re: [REL] MySQL Plugin (****** Project) -
im - 25.06.2013
I'm using mysql r7 and the server crashes when using mysql_ping(), mysql_format() and mysql_stats().
Also, when I restart my server there are a lot of players connecting in less than one minute (200-300) so there are a lot of queryes that are executed (to check passwords, bans and stuff). When that happens, sometimes the players get the login box twice (the login box appears at the end of a query), some don't get it at all. That only happens after the server starts and there are a lot of players connecting so I think that there's a problem with the plugin and not with my gamemode .
I'm planning to use a timer and let x number of players connect every minute and have the rest of them wait for a minute or two if this problem can't be solved by upgrading to mysql r8.
Is mysql R8 solving any of those problems?
Is mysql R8 as stable as mysql R7?
Re: [REL] MySQL Plugin (****** Project) -
maddinat0r - 25.06.2013
Why not upgrading to R26? It seems pretty stable and has AFAIK no bugs in it. It's also way faster than R7 or R8.
Re: [REL] MySQL Plugin (****** Project) - Riddy - 25.06.2013
Is it MySQL R8 or MySQL R7 REV 26? Pretty confused.
Re: [REL] MySQL Plugin (****** Project) -
Dan.. - 25.06.2013
Quote:
Originally Posted by Riddy
Is it MySQL R8 or MySQL R7 REV 26? Pretty confused.
|
When I was developing this plugin I got rid of the Rx REVy naiming because it was confusing. The latest version of this plugin is "sa-mp-mysql-plugin r26".
Re: [REL] MySQL Plugin (****** Project) -
im - 26.06.2013
Upgraded to r26 today. Same problem.
Quote:
when I restart my server there are a lot of players connecting in less than one minute (200-300) so there are a lot of queryes that are executed (to check passwords, bans and stuff). When that happens, sometimes the players get the login box twice (the login box appears at the end of a query), some don't get it at all. That only happens after the server starts and there are a lot of players connecting so I think that there's a problem with the plugin and not with my gamemode.
|
AW: Re: [REL] MySQL Plugin (****** Project) -
maddinat0r - 27.06.2013
Quote:
Originally Posted by im
Upgraded to r26 today. Same problem.
|
I tried to reproduce this with sending a big query 1000 times and fetching the result with 2 different methods. Every time the callback was called once. If this would be a problem with the plugin there would be far more complaints. So it's likely a problem with your gamemode or server (maybe huge lags? 200-300 players shouldn't cause a too big lag). Try optimizing your gamemode, like sending only one query per player to load data, for example
PHP Code:
SELECT a.*, b.* FROM players AS a, inventory AS b WHERE a.ID = b.PID AND a.ID = '3'
instead of multiple queries to load data out of different tables.
AW: [REL] MySQL Plugin (****** Project) -
Mellnik - 27.06.2013
When i use "AS" in a query in which var will be the result?
AW: [REL] MySQL Plugin (****** Project) -
maddinat0r - 27.06.2013
pawn Code:
cache_get_field_content_int(0, "ID");
will give you the ID of field 'a.ID'. If there is a field in table b with the same name you will always get only one result (most likely the one from the first table, in our example this would be 'players'). The only solution is to rename the field directly in the table or to use an alias in the query:
PHP Code:
SELECT a.ID AS IDa, b.ID AS IDb FROM ...