AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can I use both SQL plugins (mysql, sqlite) at the same time? (https://forums.alliedmods.net/showthread.php?t=62248)

Bor 10-21-2007 16:32

Can I use both SQL plugins (mysql, sqlite) at the same time?
 
I need answer on this question

I try use
amxbans with mysql connect
and
own plugin with sqlite connect

I tested own plugin - it works fine standalone

but when I try enable in modules.ini - mysql and sqlite
and enable this plugins - my server dies :(

on amd64 and x86 - it dies if I enable my own plugin

How I can fix ?
It can be fixed ?

YamiKaitou 10-21-2007 20:33

Re: Can I use both SQL plugins (mysql, sqlite) at the same time?
 
It should work fine granted they are not both using the sql.cfg for their info. What version of AmxX are you using? Steam, No-Steam, or LAN?

Bor 10-22-2007 13:55

Re: Can I use both SQL plugins (mysql, sqlite) at the same time?
 
Certainly DB info get from different sources

amxmodx-1.76d
No-Steam

First loaded amxbans
after load own plugin (amxx_access)
and I use
SQL_SetAffinity("sqlite")
for make sure to use SQLite

YamiKaitou 10-22-2007 14:16

Re: Can I use both SQL plugins (mysql, sqlite) at the same time?
 
We don't support No-Steam.

Bor 10-22-2007 17:51

Re: Can I use both SQL plugins (mysql, sqlite) at the same time?
 
Ok I understand

But somebody have success story to use both mysql and sqlite modules with use SQL_SetAffinity ?
I search all forum and not find it :(


I found a problem
server die after SQL_SetAffinity("sqlite")

L 10/23/2007 - 00:38:28: -------- Mapchange to de_dust --------

Admin Spectator ESP v1.3, Copyright (C) 2006 by KoST

[Access Manager] 1

Program received signal SIGSEGV, Segmentation fault.
0x00000001 in ?? ()
(gdb) bt
#0 0x00000001 in ?? ()
#1 0xf4f3a4f5 in ?? () from cstrike/addons/amxmodx/modules/mysql_amxx_i386.so
#2 0xf4f04740 in ?? () from cstrike/addons/amxmodx/modules/sqlite_amxx_i386.so
#3 0xf513b9c0 in ?? () from /opt/halflife/addons/amxmodx/dlls/amxmodx_mm_i386.so
#4 0x00000000 in ?? ()

Bor 10-25-2007 03:36

Re: Can I use both SQL plugins (mysql, sqlite) at the same time?
 
ok

I try to use LAN server and get same error :(

I have lead experiment
in modules.ini set sqlite before mysql (so it load first and set as default)
after this in my script I add this code

server_print("[Access Manager] try SetAffinity to sqlite");
SQL_SetAffinity("sqlite");
server_print("[Access Manager] try SetAffinity to mysql");
SQL_SetAffinity("mysql");
server_print("[Access Manager] try SetAffinity to sqlite again");
SQL_SetAffinity("sqlite");

and run server from gdb

homeland halflife # gdb hlds_i686
GNU gdb 6.7
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run -game cstrike -heapsize 131072 -insecure -noipx -nojoy -nomaster -pingboost 2 +map de_dust +maxplayers 20 +port 27015 +sv_lan 1 +servercfgfile server_3.cfg
Starting program: /opt/halflife/hlds_i686 -game cstrike -heapsize 131072 -insecure -noipx -nojoy -nomaster -pingboost 2 +map de_dust +maxplayers 20 +port 27015 +sv_lan 1 +servercfgfile server_3.cfg
warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4

Console initialized.
scandir failed:/opt/halflife/./valve/SAVE
scandir failed:/opt/halflife/./platform/SAVE
Protocol version 47
Exe version 1.1.2.5/Stdio (cstrike)
Exe build: 20:02:49 Oct 24 2006 (3651)
STEAM Auth Server
couldn't exec language.cfg
Server IP address 127.0.0.1:27015

Metamod version 1.19p32 Copyright (c) 2001-2006 Will Day
Patch: Metamod-P (mm-p) v32 Copyright (c) 2004-2007 Jussi Kivilinna
Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `meta gpl' for details.


AMX Mod X version 1.76d Copyright (c) 2004-2006 AMX Mod X Development Team
AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
This is free software and you are welcome to redistribute it under
certain conditions; type 'amxx gpl' for details.

scandir failed:/opt/halflife/./valve/SAVE
scandir failed:/opt/halflife/./platform/SAVE
L 10/25/2007 - 10:29:16: -------- Mapchange to de_dust --------

Admin Spectator ESP v1.3, Copyright (C) 2006 by KoST

[Access Manager] try SetAffinity to sqlite
[Access Manager] try SetAffinity to mysql
[Access Manager] try SetAffinity to sqlite again

Program received signal SIGSEGV, Segmentation fault.
0x00000001 in ?? ()
(gdb) bt
#0 0x00000001 in ?? ()
#1 0xf4eea4f5 in ?? () from cstrike/addons/amxmodx/modules/mysql_amxx_i386.so
#2 0xf50e8740 in ?? () from cstrike/addons/amxmodx/modules/sqlite_amxx_i386.so
#3 0xf51659c0 in ?? () from /opt/halflife/addons/amxmodx/dlls/amxmodx_mm_i386.so
#4 0x00000000 in ?? ()
(gdb)


so if can see server die after swith from mysql to sqlite driver
I think it is a bug

Any ideas ?

Bor 10-25-2007 05:28

Re: Can I use both SQL plugins (mysql, sqlite) at the same time?
 
So I open a bug report
http://bugs.alliedmods.net/index.php...s&task_id=1067


All times are GMT -4. The time now is 01:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.