mysql & sqlite combined
I have a problem with two plugins, first one is cheaterSuspect and second one in simple sql ban logger. The ban logs into mysql db on website and cheatersuspects uses sqlite. Now when both module are loaded only one of these plugins works, didnt tested it thoroughly but it looks like it depends on module or plugin load order. Now the simplest solution is to setup cheatersuspect to uses external db and only mysql module but that for some unknown reason to me causes lag spikes on my server which are repeating every 20 sec, they stop when cheatersuspect is disabled. So what i would like is to somehow force ban logger to uses mysql module and cheatersuspect to uses sqlite module, how can i do this ?
|
Re: mysql & sqlite combined
Can i do something with SQL_SetAffinity command, there arent many stuff about it, i found it mentioned only in 3 threads here, and should i use SQL_SetAffinity("mysql") or SQL_SetAffinity ("sqlx") for plugin that connects to external db ?
|
Re: mysql & sqlite combined
I think it's SQL_SetAffinity("mysql") for mysql and SQL_SetAffinity("sqlite") for sqlite.
If you get lag spikes then maybe your plugin is not using threaded queries. |
Re: mysql & sqlite combined
Threaded queries ? cheatersuspect is written with dbi include :P, and i dont feel like rewriting it, and anyway lag ocurred all the time, not just at execution of commands. I did managed it to work, i found out that plugins use modules by their load order (plugin load order is irrelevant) so all plugins will use first module if not otherwise set by SetAffinity. I used SetAffinity in plugin_init, and i wondered can i use it multiple times through plugin to switch at which db query will be executed, something like
SQL_SetAffinity("mysql") SQL_Execute(Query) SQL_SetAffinity("sqlite") |
Re: mysql & sqlite combined
http://www.amxmodx.org/funcwiki.php?go=func&id=1113
Quote:
|
Re: mysql & sqlite combined
Ok tnx, i'll use some workaround ,set cheatersuspect to log its bans to a file and then mysql ban logger to read that file and write to db.
|
| All times are GMT -4. The time now is 07:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.