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

Quote:
Originally Posted by Egoxper
Посмотреть сообщение
Hi, i need help w/ this plugin on Ubuntu.

I tried last Debian and last CentOS version (i read on internet Debian is closer to Ubuntu) and in server log shows me this :



What can i do with that?
I can see that you are using R40 or beyond, whenever you are using any version that is R40 or higher you'll need to use CentOS 7 due to dependencies not being available on CentOS 6.

This should fix your issue and install the dependencies: yum install -y mariadb-libs.i686 libstdc++.i686
Reply

And can i use it on Ubuntu?
Reply

Quote:
Originally Posted by dusk
Посмотреть сообщение
Hey, good job on the R40. I'm loving it!

I see it finally supports multiple statements in one query. So if I execute multiple select statements, will all of the results be available in one cache?
Yes, all of them are stored in a single cache which has sub-caches for each result.
Reply

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Yes, all of them are stored in a single cache which has sub-caches for each result.
Sub-caches? Are they accessed in a different way?
Reply

Not really, cache_set_active for the main cache and cache_set_result to retrieve the data of the appropriate query (in the order they were sent).
Reply

Thanks! As for cache_set_active, I've seen people explicitly calling it after every query. Does it need to be done, even for simple queries?
Reply

If you retrieve the data of all the SELECT queries (in that set) in the specified callback (non-threaded queries wouldn't be recommended at all for that), you don't need cache_set_active function. I assumed you wanted to save the cache for later use, that's its only purpose - to be used anywhere.
Reply

Hey again, I'm unable to connect to mysql on windows.

I'm running a 32 bit MySQL server. I checked the Task Manager and the process mysqld.exe is running. I created a database which I specify in my mysql.ini file(I use mysql_connect_file). I am able to connect to mysql from the command line.

SAMP log error:
Код:
[14:41:18] Could not connect to mysql database, check if mysql server is running and contains the database specified in mysql.ini file
Reply

What is written in logs\plugins.txt file?
Reply

Oh I didn't even notice the cool new logging system! Now I see.. it was just a typo
Reply

Hmm...
https://sampforum.blast.hk/showthread.php?tid=620310
Reply

Quote:
Originally Posted by KessMan
Посмотреть сообщение
Irrelevant. Your question has been answered in that thread, so there's absolutely no reason to post it all over the forum. You'll end up just getting the same answers here as you got there.
Reply

Hello. What is the difference between cache_get_row_count and cache_get_result_count?
Reply

cache_get_result_count is used for multi-statements. You don't really need it unless all the queries you sent are equivalent and you call the same exact cache functions with the same parameters (same number of columns etc).
pawn Код:
mysql_tquery(MYSQL_DEFAULT_HANDLE, "SELECT 'query 1'; SELECT 'query 2'; SELECT 'query 3';", "OnSomethingLoad", "");

forward OnSomethingLoad();
public OnSomethingLoad()
{
    new tmp[8], results;
   
    cache_get_result_count(results);
    for (new i; i != results; i++)
    {
        cache_set_result(i);
       
        cache_get_value(0, 0, tmp);
        print(tmp);
    }
}
Reply

The old mysql is best version
Reply

I have proplem with mysql_set_option(); This function don't work

PHP код:
  new MySQLOpt:options mysql_init_options();
  
mysql_set_option(optionsAUTO_RECONNECTfalse);
  
mysql_connection_id mysql_connect(MYSQL_HOSTMYSQL_USERMYSQL_PASSWORDMYSQL_DATABASE); 
Код:
[20:29:59] [plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #2003 'Can't connect to MySQL server on 'localhost' (10061)'
[20:30:01] [plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #2003 'Can't connect to MySQL server on 'localhost' (10061)'
[20:30:03] [plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #2003 'Can't connect to MySQL server on 'localhost' (10061)'
[20:30:05] [plugins/mysql] CConnection::CConnection - establishing connection to MySQL database failed: #2003 'Can't connect to MySQL server on 'localhost' (10061)'
Reply

https://sampwiki.blast.hk/wiki/MySQL/R40#mysql_set_option

You need to pass "options" variable as argument in mysql_connect function.
Reply

Great work, i really needed this one to my server!

- Thanks
Reply

R41-2 has been released.
Changes:
  • all builds from now on prefer the MariaDB C connector
  • log improvements:
    • R41-2 uses the latest log-core version, which supplies call info traces (especially useful when using includes that call plugin functions)
    • several bug fixes
Download as always here: https://github.com/pBlueG/SA-MP-MySQL/releases
Reply

all builds from now on prefer the MariaDB C connector"

I don't understand what you want to say.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)