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

Quote:
Originally Posted by DarkSlyder
View Post
Is there any chance to get the sizeof() thing fixed in string functions?
It's a pawno bug.
Reply

Quote:
Originally Posted by DarkSlyder
View Post
Is there any chance to get the sizeof() thing fixed in string functions?
There is a tweak how to bypass that somewhere floating around in this thread.
Reply

A question i continue to wonder about, which MySQL version does this plugin or do these MySQL plugins use!?
Reply

It would be interesting to see someone use y_inline to have inline threaded queries with this. There are some instances where it could be quite beneficial to me to have inline threading (even though it would be pointless for them to be threaded because the inline function would need to wait for a response from the server, ultimately hanging the server). Instead of passing a bunch of different variables and even (possibly) being forced to make new global variables/(P/G)vars just to send information to another callback.

I think that's the only reason why non-threaded queries would be nice to have at least usable. For example, I could do something like this with non-threaded queries:

pawn Code:
"SELECT `id` FROM `accounts` WHERE `username` =  'RealCop228'"
cache_get_data(rows, fields);
if(rows > 0) // yes, the account exists
else // no, the account doesn't exist
So I would have the ability to make a function like "DoesAccountExist". However, I understand the reasoning behind removing threaded queries.

Nonetheless, if there was a way to have queries where I didn't need to pass them to another callback... it would be beneficial to me. Even though that kind of ignores the whole "threaded" part...
Reply

Quote:
Originally Posted by RealCop228
View Post
It would be interesting to see someone use y_inline to have inline threaded queries with this. There are some instances where it could be quite beneficial to me to have inline threading (even though it would be pointless for them to be threaded because the inline function would need to wait for a response from the server, ultimately hanging the server). Instead of passing a bunch of different variables and even (possibly) being forced to make new global variables/(P/G)vars just to send information to another callback.

I think that's the only reason why non-threaded queries would be nice to have at least usable. For example, I could do something like this with non-threaded queries:

pawn Code:
"SELECT `id` FROM `accounts` WHERE `username` =  'RealCop228'"
cache_get_data(rows, fields);
if(rows > 0) // yes, the account exists
else // no, the account doesn't exist
So I would have the ability to make a function like "DoesAccountExist". However, I understand the reasoning behind removing threaded queries.

Nonetheless, if there was a way to have queries where I didn't need to pass them to another callback... it would be beneficial to me. Even though that kind of ignores the whole "threaded" part...
@ second part
huh?

pawn Code:
//OnPlayerConnect
format(gQuery, sizeof(gQuery), "SELECT `pSaveSkin` FROM `Accounts` WHERE `Username` = '%s' LIMIT 0,1", pName[playerid]);
        mysql_function_query(McHandle, gQuery, true, "Thread_DoesAccountExist", "i", playerid);

THREAD:DoesAccountExist(playerid)
{
//
}
Gets called before OnPlayerRequestClass as i want it too. Maybe if I select * it would take longer

I know you want this other players, just add the rest of the code in it
Reply

Quote:
Originally Posted by Kar
View Post
Kinda missed me
Oh sorry, 5.1.
EDIT:
Hm, I'm actually not that sure, however, it supports all currently available versions.

Quote:
Originally Posted by Typhome
View Post
What you mean "laggy"? Ofcourse it's remote MySQL database. (It's hosted on web service)
R15 or below that I had never connection timeout, and after switching this R26 have so many connection timeout.
Hm, I'll look into it.
EDIT: Did you also updated the libmysql.dll?
Reply

Quote:
Originally Posted by Pain123
View Post
Hm, I'll look into it.
EDIT: Did you also updated the libmysql.dll?
Oh, that's why. Now it works. I forgot to replace this one.
Reply

Why 5.1? Why can't you update to 5.5?
Reply

Quote:
Originally Posted by IstuntmanI
View Post
It's a pawno bug.
Well, I've never had that issue before the project was moved to ****** Code (R6/7).
Reply

Quote:
Originally Posted by DarkSlyder
View Post
Well, I've never had that issue before the project was moved to ****** Code (R6/7).
The default sizeof parameter was introduced in R8.

Quote:
Originally Posted by Kar
View Post
Why 5.1? Why can't you update to 5.5?
The connector says that the MySQL version is 6.0.0, so I think it supports all MySQL versions under 6.0.0
Reply

pretty good work, thanks
Reply

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
R26 hasn't crashed once on Windows yet, so good job!
Agreed; had problems from R20-25ish but ever since R26 came out, stable as a rock for me
Reply

When I try to connect to mysql server, an error occured...
[11:47:44] [ERROR] CMySQLHandle::ConnectT - (error #2003) Can't connect to MySQL server on 'localhost' (10061)
[11:47:44] [ERROR] ExecuteT[()] - (error #2006) MySQL server has gone away
[11:47:44] [WARNING] ExecuteT[()] - lost connection, requesting reconnect
[11:47:44] [ERROR] ExecuteT[()] - (error #2006) MySQL server has gone away
[11:47:44] [WARNING] ExecuteT[()] - lost connection, requesting reconnect
[11:47:44] [ERROR] ExecuteT[()] - (error #2006) MySQL server has gone away
[11:47:44] [WARNING] ExecuteT[()] - lost connection, requesting reconnect
[11:47:45] [ERROR] CMySQLHandle::ConnectT - (error #2003) Can't connect to MySQL server on 'localhost' (10061)

But with previous versions everything was fine...
Did something extremly change with using mysql_function_query?
Reply

You likely forgot to update the libmysql.dll.
Reply

Unfortunately not, I updated every file which is concerned in mysql.
Of course the libmysql.dll too.

And on a linux server everythings works fine.

I use Windows 8, XAMPP and CPU is Dual Core (2x 3GHz) (There is a Message with No Multi-Threading due to bad CPU... ?! 6 GHz is bad CPU?)
Reply

Multi-Threading activates if the CPU has at least 3 cores. Try to use the IP (127.0.0.1) instead of 'localhost'. What MySQL server version do you use?
Reply

Worked with 127.0.0.1
Problem was this localhost.

I don't know why but this could be a bug in this version...
If so, then better fix it DDDD

Thanks Pain123
Reply

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?
Reply

Quote:
Originally Posted by DeathKing
View Post
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?
You don't want multi-threading enabled if your CPU cannot handle it. Believe me, putting the strain like that on a bad CPU is just asking for crashes.
Reply

No, the plugin determines if it's better with multi-threading or without. It activates multi-threading if the CPU has 3 or more cores.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)