Jump to content
torndeco

extDB (arma3 extension linux/windows)

Recommended Posts

@RimBlock

Grab an Sqlitebrowser or similar app and just take a look @ the included SQLite Database file...

But to be honest, i would just forget about DB_BASIC_V2.

Don't think anyone uses it since no-one ever reported any bugs for it (been a-few).

You should just use DB_CUSTOM_V2, it gives you freedom of running any SQL Queries (you define them in an .ini file),

while still maintaining some sense of security.

Share this post


Link to post
Share on other sites

Thanks, that is really my area of interest with this DB connector. I want to run canned sql against the DB, predefined in a text file.

I see that the DB_CUSTOM_V2 is not available in the stable branch though.

How 'DEV' is that functionality in the dev branch and is it likely to make it to stable anytime soon ?.

I have been doing a couple of basic tests with stored procedures, which was the other way I wanted open execution on the DB with Server owner control, and it seems to work fine. Saying that my testing has been very simplistic (supply an objectUID, get an objectID back).

Share this post


Link to post
Share on other sites

@RimBlock

DB_CUSTOM_V2 is in the stable branch.

Just checked its been in stable branch since v15 (29 days ago)

I need to go over the wiki and update it, including adding instructions for static extDB linux installs etc...

----------------------------

Anyway your best bet is to use DB_CUSTOM_V2.

extDB currently can't retrieve results from Procedures, it can only call them to run something.

This isn't an easy fix atm.

Note:

You can just call a Procedure via a normal SQL Statement using DB_CUSTOM_V2 / DB_RAW_V2 etc...

DB_PROCEDURE_V2 is just some legacy code, keeping around for whenever Poco Library 1.5 is more stable

Edited by Torndeco

Share this post


Link to post
Share on other sites
@RimBlock

DB_CUSTOM_V2 is in the stable branch.

Just checked its been in stable branch since v15 (29 days ago)

I need to go over the wiki and update it, including adding instructions for static extDB linux installs etc...

----------------------------

Anyway your best bet is to use DB_CUSTOM_V2.

extDB currently can't retrieve results from Procedures, it can only call them to run something.

This isn't an easy fix atm.

Note:

You can just call a Procedure via a normal SQL Statement using DB_CUSTOM_V2 / DB_RAW_V2 etc...

DB_PROCEDURE_V2 is just some legacy code, keeping around for whenever Poco Library 1.5 is more stable

:confused:

I downloaded the zip from Github (stable branch) on the 7th Sept.

Welcome to extDB Test Application :
   This application has 4096 char limited input.
        Extension doesn't have this problem
To exit type 'quit'

extDB: Found extdb-conf.ini
extDB: Creating Worker Thread +1
extDB: Creating Worker Thread +1
extDB: Creating Worker Thread +1
extDB: Creating Worker Thread +1
extDB: Creating Worker Thread +1
extDB: Creating Worker Thread +1
extDB: Creating Worker Thread +1
extDB: Creating Worker Thread +1
extDB: Loading Log Settings
9:DATABASE:Database2
extDB: Database Type: MySQL
extDB: Database Session Pool Started
extDB: [1]
9:ADD:DB_CUSTOM_V2:DB:testsql
extDB: [0,"Failed to Load Protocol"]

The file with the canned sql is called testsql.ini and I have placed it in both extDB\db_custom_conf and extDB\db_custom.

I am also getting returns from my SP

9:ADD:DB_PROCEDURE_V2:PROC
extDB: [1]
0:PROC:1|"GetObjectID"|1207271266730206292|1
extDB: DB_PROCEDURE_V2: Trace: 1|"GetObjectID"|1207271266730206292|1
extDB: DB_PROCEDURE_V2: Trace: Result: 1|"GetObjectID"|1207271266730206292|1
extDB: [1, [1, [ [789]]]]

The 789 is the DB ObjectID for that object.

The sql is very simple in the SP.

DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetObjectID`(
        IN inpObjectUID bigint(24),
        OUT retObjectID int(11))
BEGIN
   SELECT od.objectID
into retObjectID
   FROM object_data od
   WHERE od.objectUID = inpObjectUID;
END$$
DELIMITER ;

The SP fails with multi-line returns though :).

Oh and version info

9:VERSION
extDB: 17

RB

Share this post


Link to post
Share on other sites

@RimBlock

Yeah stop trying to get results from Procedures its gonna be broken.

Its an issue with the Poco Library i am using for Database Connection.

Anyway try use v16 for DB_CUSTOM_V2 its working there.

There is an issue with it checking if extdb-conf.ini exists instead of the sql template file,

otherwise it should be good.

Looks like i broke it in v17 when i fixed it :j: , swore i checked / tested it beforehand.

Note: the tbb + tbbmalloc dll's are different for v16 + v17, so don't forget to replace them

Am normally on Skype if u run into other issues etc

Disclaimer: Atlis Life Admins should post on Atlis Life Forums, i look on the forums there thanks

Edited by Torndeco

Share this post


Link to post
Share on other sites

Thanks for the info.

I will wait for an updated version as I have no urgent need at this time. Have a couple of other mods to complete before I start working on the project this would be used for.

Share this post


Link to post
Share on other sites

Version 18

Mainly just a bug fix + optimize return output release

Also nearly forgot V1 Protocols got removed.

  • MAJOR: Removed V1 Protocols, been over a month. <--------
  • ADDED: 9:OUTPUTSIZE debug command, returns outputsize for armaextension. Also logs this info to extdb logfile.
  • ADDED: config option "Error Database Kill Server" to enable/disable killing server if Database Connection Fails.
  • FIXED: Fixed (+ Tested) Template File Check for DB_CUSTOM_V2
  • FIXED: Killing Server if Database Config Section Missing. (If killing server == enabled see above)
  • FIXED: Removed some arma2 code from compiling for linux builds. (Randomized Config Option)
  • FIXED: Test App Input Limit: by MaHuJa https://github.com/MaHuJa
  • MISC: Removed White-space Padding from Returned Results.
  • MISC: Various small Logic Fixes to code + more error outputs i.e like if you try to 9:ADD:Database Twice etc...
  • MISC: Misc Fixes for DB_BASIC

Note:

I still need to compile Linux Builds + Test Applications...

Will be done in a hour or 2...

Just gonna grab a coffee etc first.

Edited by Torndeco

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

==================================================

You are not registered on Armaholic, or at least not that we are aware of. In the future we offer the possibility to authors to maintain their own pages.

If you wish to be able to do this as well please register on Armaholic and let me know about it.

This is not mandatory at all! Only if you wish to control your own content you are welcome to join, otherwise we will continue to follow your work like we have always done ;)

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites
Version 18

Mainly just a bug fix + optimize return output release

Also nearly forgot V1 Protocols got removed.

  • MAJOR: Removed V1 Protocols, been over a month. <--------
  • ADDED: 9:OUTPUTSIZE debug command, returns outputsize for armaextension. Also logs this info to extdb logfile.
  • ADDED: config option "Error Database Kill Server" to enable/disable killing server if Database Connection Fails.
  • FIXED: Fixed (+ Tested) Template File Check for DB_CUSTOM_V2
  • FIXED: Killing Server if Database Config Section Missing. (If killing server == enabled see above)
  • FIXED: Removed some arma2 code from compiling for linux builds. (Randomized Config Option
  • MISC: Removed White-space Padding from Returned Results.
  • MISC: Various small Logic Fixes to code + more error outputs i.e like if you try to 9:ADD:Database Twice etc...
  • MISC: Misc Fixes for DB_BASIC

Note:

I still need to compile Linux Builds + Test Applications...

Will be done in a hour or 2...

Just gonna grab a coffee etc first.

Hello,

thanks for you extdb, its a rly nice tool. We have some strange issuses about extdb.

I run a Arma 3 Altis Life Server (i know Altis life... ^^) with 100 people. User can join on the server without a problem, but if the server get up to 80... 90 players, so got the user the message "setup up client, please wait" the database works, the user on the server can play without any issues.

The user must be reconnect 3 or 4 times to get into the game. extdb log = no error. RPT log = no error (rly nor error) client rpt log = no errors

We are despair atm, why we think its a problem from extdb? We are setting up a altis life server with arma2net... and look we dont have this problem.

So if you have any ideas, please tell us that.

Thanks and BR

PS: Do you have a FAQ for the extdb.ini with more information about the setting? the wiki doesnt have a anwser for me ^^

Share this post


Link to post
Share on other sites

Why cross post issue ???

I was answering your post in Altis Life Thread

The last thing i told you to grab debug version of extDB + turn on trace in the logging options.

At the very least it will help you out last call to extDB.

Regardless someone else was helping you, according to their post.

http://www.altisliferpg.com/topic/6282-setup-client-please-wait-problem/?p=41190

Your clients are never getting loaded into server, they are getting stuck inside.

waitUntil {!isNull player && player == player};

https://community.bistudio.com/wiki/player

https://github.com/TAWTonic/Altis-Life/blob/master/extDB-Build/Altis_Life.Altis/core/init.sqf#L14

Thats is an arma issue not extDB, maybe related to groups (i don't know off hand, since i never messed around with SQF Code + High Player Counts)

Your clients are getting stuck well before server even asks extDB anything at all.

---------- Post added at 22:42 ---------- Previous post was at 22:34 ----------

Anyone using DB_CUSTOM_V2 ?

Anything in particular you like to see get added in the next version.

New DB_CUSTOM_V3 in v19.

Planned Changes are

[Default] Option Field to define default values i.e sanotizie check, number of inputs etc...

Strip Chars = true
Strip Chars List = '/\|;,{}-

Also new option for stripping chars from input values. Saves you having todo this in SQF Code.

Note if ":" char is in any input values (it is used as Protocol Divider), it will cause fail with error message

So you may still want to strip this char or just add SQF Logic to handle this error message.

[0,"Error Incorrect Number of Inputs"]

Last thing is SQL_x will have space added between values.

SQL = SQL_1 + " " + SQL_2 + " " + SQL_3

Instead of currently with DB_CUSTOM_V2

SQL = SQL_1 + SQL_2 + SQL_3

Share this post


Link to post
Share on other sites
Why cross post issue ???

I was answering your post in Altis Life Thread

The last thing i told you to grab debug version of extDB + turn on trace in the logging options.

At the very least it will help you out last call to extDB.

Regardless someone else was helping you, according to their post.

http://www.altisliferpg.com/topic/6282-setup-client-please-wait-problem/?p=41190

Your clients are never getting loaded into server, they are getting stuck inside.

waitUntil {!isNull player && player == player};

https://community.bistudio.com/wiki/player

https://github.com/TAWTonic/Altis-Life/blob/master/extDB-Build/Altis_Life.Altis/core/init.sqf#L14

Thats is an arma issue not extDB, maybe related to groups (i don't know off hand, since i never messed around with SQF Code + High Player Counts)

Your clients are getting stuck well before server even asks extDB anything at all.

---------- Post added at 22:42 ---------- Previous post was at 22:34 ----------

Anyone using DB_CUSTOM_V2 ?

Anything in particular you like to see get added in the next version.

New DB_CUSTOM_V3 in v19.

Planned Changes are

[Default] Option Field to define default values i.e sanotizie check, number of inputs etc...

Strip Chars = true
Strip Chars List = '/\|;,{}-

Also new option for stripping chars from input values. Saves you having todo this in SQF Code.

Note if ":" char is in any input values (it is used as Protocol Divider), it will cause fail with error message

So you may still want to strip this char or just add SQF Logic to handle this error message.

[0,"Error Incorrect Number of Inputs"]

Last thing is SQL_x will have space added between values.

SQL = SQL_1 + " " + SQL_2 + " " + SQL_3

Instead of currently with DB_CUSTOM_V2

SQL = SQL_1 + SQL_2 + SQL_3

sry dude. i dont know you are on altisliferpg.com too. i found this thread and think its better to write you here (i found more from you here in this forum), but i crosslink the thread so we can talk over one plattform

Share this post


Link to post
Share on other sites

Version 19

Haven't had motivation to-do much lately, so only afew small changes...

Been meaning todo update for abit.

  • ADDED: DB_Custom_V3 Protocol, config file is abit more cleaner.
    Multiple SQL_x lines when added together have space added between them i.e SQL_1 + " " + SQL_2 + " " + SQL_3 etc
    Ability to set Default Settings
    Strip List of Characters Option for Input Values
  • ADDED: New Get Results Method. 4:<Unique ID>
  • FIXED: Trace Log, showing input instead of result info in logs.
  • MISC: Added warning if trying to use Trace Setting in normal extDB.

4:<Unique ID>

Most of the time, you will be query Databases for small info like player stats / inventory etc...

So the current method of calling 5:<Unique ID>.

Until you get an empty string is abit overkill.

+ 1 extra callExtension for fetching results.

You can now retrieve results by calling 4:<Unique ID>.

If result fits into single message (i.e <= armaoutputsize), extDB will return [1,<result>].

+ 0 extra callExtension.

If result doesn't fit into a single message (i.e > armaoutputsize), extDB will return [5].

This means you need to use 5:<Unique ID> to fetch results.

+ 2 extra callExtension

Best part with this change is it doesn't break any SQF code, you can choose to ignore it if you like.

Or you could use both methods in your code, if you want to optimize usage abit.

Getting Player Info could use 4:<Unique ID> (since most of the time it will fit into armaoutputsize)

Getting All Vehicles could use 5:<Unique ID> (since it doesn't happen much + it will prob be greater than armaoutputsize).

Share this post


Link to post
Share on other sites
Version 19

Haven't had motivation to-do much lately, so only afew small changes...

Been meaning todo update for abit.

  • ADDED: DB_Custom_V3 Protocol, config file is abit more cleaner.
    Multiple SQL_x lines when added together have space added between them i.e SQL_1 + " " + SQL_2 + " " + SQL_3 etc
    Ability to set Default Settings
    Strip List of Characters Option for Input Values
  • ADDED: New Get Results Method. 4:<Unique ID>
  • FIXED: Trace Log, showing input instead of result info in logs.
  • MISC: Added warning if trying to use Trace Setting in normal extDB.

4:<Unique ID>

Most of the time, you will be query Databases for small info like player stats / inventory etc...

So the current method of calling 5:<Unique ID>.

Until you get an empty string is abit overkill.

+ 1 extra callExtension for fetching results.

You can now retrieve results by calling 4:<Unique ID>.

If result fits into single message (i.e <= armaoutputsize), extDB will return [1,<result>].

+ 0 extra callExtension.

If result doesn't fit into a single message (i.e > armaoutputsize), extDB will return [5].

This means you need to use 5:<Unique ID> to fetch results.

+ 2 extra callExtension

Best part with this change is it doesn't break any SQF code, you can choose to ignore it if you like.

Or you could use both methods in your code, if you want to optimize usage abit.

Getting Player Info could use 4:<Unique ID> (since most of the time it will fit into armaoutputsize)

Getting All Vehicles could use 5:<Unique ID> (since it doesn't happen much + it will prob be greater than armaoutputsize).

Nice to see you decided to add the space between the SQL lines in the ini after all. Will make the code in the ini files a bit more readable and less prone to issues with splitting it up.

When I fire queries with v18, I ether get a return of [1,[[results]]] or [1,<Unique ID>] if the results are too big. Not sure what the advantage of a '4' call is.

Welcome to extDB Test Application :

OutputSize is set to 80 for Test Application, to be readable
OutputSize for Arma3 is more like 10k in size
To exit type 'quit'

9:DATABASE:dominiondb
extDB: [1]
9:ADD:DB_CUSTOM_V2:custom_sql:testsql
extDB: [1]
0:custom_sql:GetcharacterData:10:1
extDB: [1, [1,[[0]]]]

I am also a little confused why there are so many [] around the results rather than just [1,[result set]]. I don't see any explanation on the Wiki (may well have missed it).

The banned char list is very nice. I had presumed that these would be taken care of by the sanatize option but this allows me to make doubly sure.

Would be nice to be able to do a select * from in the customSQL.ini file rather than having to list all the fields one by one. Would make the SQL a lot shorter for queries where you need to pull a lot of fields back (character / object load for example).

I am guessing views do not cause an issue. I am just about to try reading from one so I guess I will find out shortly.

Thanks for the great work on this. It is so much better than the very limited (deliberately so) hiveext.dll used on the Dayz mods.

Share this post


Link to post
Share on other sites

[1, [1,[[0]]]]

[1, --------] = OK from extDB retrieving Result, other values include 0 = error / 3 = wait / 5 multi-part message

--- [1, ----] = OK from Protocol, other values include 0 = error

------ [[0]]] = Result

Basicly extDB can return error messages i.e MySQL Server crashed... or if you had another process using SQLite alot + it failed run SQL Statement due to file locking.

Its possible to code SQF to handle errors if you want to, most people prob don't need todo this. But can be nice for debugging in SQF.

Also the code for Protocols is abstracted / seperated from extDB main code, makes it easier to add / change / remove Protocols.

[[0]]

[[Row 0],[Row 1]]

[[Row 0 Column 0, Column 1],[Row 1]]

You have to remember SQL Query could return multi-row sql results.

So you got 2d arrays, array of row results, containing array of column values.

------------------

You are using SYNC method to get results from Database. This will block arma engine until SQL Statement is complete = bad.

I would only use SYNC method for Server Startup it avoids overhead of worker threads... even then i don't like it / recommend it.

Use ASYNC method to get results from Database. This wont block arma engine as much, since work is done in a different thread.

1:<.....> ASYNC + no results returned i.e for Update / Insert etc

2:<.....> ASYNC + return results via unique_id i.e for Select

Then you use 4:<Unique ID> / 5:<Unique ID> to get the results

You can use Select *, you more than likely have a typo mistake... try run the command in a program like MySQL Workbench to make sure its correct.

------------------

Sanitize Check, only checks the values uses same code as DayZ Epoch Hive etc, returns an error if bad value (i.e won't run sql statement).

Strip Chars will actually remove the offending chars and then do Sanitize Check (if enabled) and then it will run the sql statement.

Edited by Torndeco

Share this post


Link to post
Share on other sites
[1, [1,[[0]]]]

[1, --------] = OK from extDB retrieving Result, other values include 0 = error / 3 = wait / 5 multi-part message

--- [1, ----] = OK from Protocol, other values include 0 = error

------ [[0]]] = Result

Basicly extDB can return error messages i.e MySQL Server crashed... or if you had another process using SQLite alot + it failed run SQL Statement due to file locking.

Its possible to code SQF to handle errors if you want to, most people prob don't need todo this. But can be nice for debugging in SQF.

Also the code for Protocols is abstracted / seperated from extDB main code, makes it easier to add / change / remove Protocols.

[[0]]

[[Row 0],[Row 1]]

[[Row 0 Column 0, Column 1],[Row 1]]

You have to remember SQL Query could return multi-row sql results.

So you got 2d arrays, array of row results, containing array of column values.

------------------

You are using SYNC method to get results from Database. This will block arma engine until SQL Statement is complete = bad.

I would only use SYNC method for Server Startup it avoids overhead of worker threads... even then i don't like it / recommend it.

Use ASYNC method to get results from Database. This wont block arma engine as much, since work is done in a different thread.

1:<.....> ASYNC + no results returned i.e for Update / Insert etc

2:<.....> ASYNC + return results via unique_id i.e for Select

Then you use 4:<Unique ID> / 5:<Unique ID> to get the results

You can use Select *, you more than likely have a typo mistake... try run the command in a program like MySQL Workbench to make sure its correct.

------------------

Sanitize Check, only checks the values uses same code as DayZ Epoch Hive etc, returns an error if bad value (i.e won't run sql statement).

Strip Chars will actually remove the offending chars and then do Sanitize Check (if enabled) and then it will run the sql statement.

Thanks for the explaination.

The data I needed back from the DB was during server load so SYNC made most sense. Having the new code for ASYNC calls makes more sense as there is less need to check if / or with the type of return (just store the return code and spawn a process to check now and then for the results).

I will check the the select *. I did try a while ago and got an error then changed the * to the field names and it worked. It is possible it may have been witht he proc call rather than the custom SQL call though (which we have already discussed).

Do you know if the sanity checks are documented anywhere so I may be able to read what is being checked without having to try and work it out from the C++ code ?. THe strip function is a great addition. Any possibility of having the extension reject the request with an error code if the 'strip' characters are found so we can code the game can log the issue / hack attempt in the server logs (i.e. a reject if found' option) ?. Stripping is ok but then you have the possibility of firing unknown code at the DB if stuff is incorrectly stripped out (bad strip config or sql code).

Another thought for new feature (if it is not already available).

Can you setup connections to multiple DBs on different servers which can be called from a mission ?.

Example use case. I have a prod db used for the game which I do not want exposed to the world. I have another DB which I would like to dump basic data in to (player kills, number of players on the server etc) which is not used by the game. Can extDB currently be used to update both DBs on different servers from the same mission ?. I am aware there are other possible solutions like DB replication, triggers etc that can achieve the same thing but being able to do it from the extDB extention may be easier for people without so much SQL and DB server knowledge.

Share this post


Link to post
Share on other sites

The strip code is only ran against the $INPUT_ values...

But i will look at adding options to log / return error out if it encounters a bad character.

Not sure if will make it into next version or not (would need to make / use a different function).

Sanity Checks is code from DayZ Epoch Hive https://github.com/Torndeco/extdb/blob/stable/src/sanitize.cpp

Basicly a-z A-Z 0-9 wrapping in quotes / [1,2] / "test" / ["omg",[1,2],0] / 12345 etc...

Try out the sanitize app if your are curious if a value will pass.

Afew more features coming to DB_CUSTOM_V3 in next release WIP Changelog @ https://github.com/Torndeco/extdb/blob/dev/Changelog.txt

Should be a release sometime tomorrow with a test version of a3wasteland using DB_CUSTOM_V3

Edited by Torndeco

Share this post


Link to post
Share on other sites

Version 20

Plenty of code changes / fixes...

Going to Split the List here into 2 Sections, since most of the changes are for DB_CUSTOM_V3.

Noticed afew areas lacking, while i be working on added extDB support for A3Wasteland.

General Changes

  • FIXED: extDB will now use empty string "" for value when value in Database is Null. Before returned string wouldn't compiled.
  • FIXED: mutex Lock issue for MISC:BEGUID
  • FIXED: SegFault when Data Supplied to some Protocols was empty.
  • REMOVED: DB_CUSTOM_V2, will take less than 5/10 minutes to update config file to new format / features.
  • REMOVED: DB_BASIC_V2, don't know of anyone using this Protocol.
    Its now obsolete with Multi-SQL Support in DB_CUSTOM_V3.
    If anyone needs a hand, give me a shout and will help you update to DB_CUSTOM_V3

DB_CUSTOM_V3 Changes

  • ADDED: DB_CUSTOM_V3 Mult-SQL Statement Support.. you can now define multiple SQL Statements to run in sequence after each other.
    Only result from last SQL Statement is returned.
  • ADDED: DB_CUSTOM_V3 $INPUT_STRING_x which will add "" around input values. This is integrated with Sanitize Value Check.
  • ADDED: DB_CUSTOM_V3 $INPUT_BEGUID_x which will convert Player UID -> BeGUID + wrap it with "".
  • ADDED: DB_CUSTOM_V3 'Option String Datatype Check' To disable / enable adding quotation around results. Was old behaviour for DB_CUSTOM
  • FIXED: DB_CUSTOM_V3 were you have more than 9 Inputs, Max Inputs is now 999
  • CHANGED: DB_CUSTOM_V3 Renamed some options look @ example-a3wasteland.ini.

Example of new DB_CUSTOM_V3

https://github.com/Torndeco/ArmA3_Wasteland.Altis/blob/revive_beta/extdb/db_custom/a3wasteland.ini

Notice the following call

[insertPlayerInfo+Save]
SQL1_1 = INSERT INTO PlayerInfo (UID, Name, BattlEyeGUID)
SQL1_2 = VALUES ('$INPUT_2', '$INPUT_STRING_3', '$INPUT_BEGUID_2');
SQL2_1 = INSERT INTO PlayerSave
SQL2_2 = (ServerID, PlayerUID, CreationDate, LastModified)
SQL2_3 = VALUES ('$INPUT_1', '$INPUT_2', NOW(), NOW());
Number of Inputs = 3

"extDB" callExtension ("1:DB:insertPlayerInfo+Save:" + _server_id + _player_name + _player_guid)

With the above example can run 2 sql statements with a single callExtension.

Also Player GUID is converted to BEGUID automatically aswell.

A3Wasteland version with extDB still WIP, but showing nice performance gains etc...

Share this post


Link to post
Share on other sites

Hello,

I got an issue with the extDB.so on Linux (Ubuntu 14.04.1).

I'm getting a SegmentationFault error just after start (when the first user joins).

How would I be able to solve it ? Is there somewhere a FAQ or anything containing this answer ?

Thanks for your help.

Share this post


Link to post
Share on other sites

Look @ extDB/logs there will be an error log entry there.

More than likely it will be complaining about bad Database Settings or cant find config file.... in both scenarios extDB will kill the server by default.

Share this post


Link to post
Share on other sites

Thank you Torndeco for all of your help with adding in ExtDB support to A3Wasteland. Your help and explanations have been spot on with a neutral demeanor. Your extension has unleashed the performance within the A3Wasteland mission. All of your work is so much appreciated from me, toparma.com and a3wasteland.com.

I look forward to your future work and if there is anything that I can provide to help you, I'm here.

Rating 5/5

Share this post


Link to post
Share on other sites

i think there is a typo in the log feature

my log says

[2014-Oct-22 00:00:27.334630]: ThreadID 0x00001fe4: Extension Input from Server: 9:DATABASE:Database
[2014-Oct-22 00:00:27.334630]: ThreadID 0x00001fe4: extDB: Database Type: MySQL
[2014-Oct-22 00:00:27.520640]: ThreadID 0x00001fe4: extDB: Database Session Pool Started
[2014-Oct-22 00:00:27.533641]: ThreadID 0x00001fe4: Extension Input from Server: 9:ADD:DB_CUSTOM_v3:EWDB:EWDB
[2014-Oct-22 00:00:27.552642]: ThreadID 0x00001fe4: Extension Input from Server: 9:ADD:MISC:MISC
[2014-Oct-22 00:00:27.553642]: ThreadID 0x00001fe4: Extension Input from Server: 9:VERSION
[2014-Oct-22 00:00:27.615646]: ThreadID 0x00001fe4: Extension Input from Server: 0:EWDB:ResetVehicles
[2014-Oct-22 00:00:27.615646]: ThreadID 0x00001fe4: extDB: DB_CUSTOM_V2: Trace: Input:ResetVehicles
[2014-Oct-22 00:00:28.164677]: ThreadID 0x00001fe4: extDB: DB_CUSTOM_V2: Trace: Result: [1,[]]
[2014-Oct-22 00:00:29.441750]: ThreadID 0x00001fe4: Extension Input from Server: 0:EWDB:GetPlayer:0000
[2014-Oct-22 00:00:29.441750]: ThreadID 0x00001fe4: extDB: DB_CUSTOM_V2: Trace: Input:GetPlayer:0000
[2014-Oct-22 00:00:29.480752]: ThreadID 0x00001fe4: extDB: DB_CUSTOM_V2: Trace: Result: [1,[[1,"0000","v1.3","v1.1","0","0","0","0","0","","SERVER","0","0","",0,0]]]

even tho im using DB_CUSTOM_V3

Share this post


Link to post
Share on other sites

Looks like you have v19 of extDB

It has a typo/bug in v19 https://github.com/Torndeco/extdb/tree/stable/release/windows/20%20Debug%20Logging

Its loading DB_CUSTOM_V2 instead of DB_CUSTOM_V3 :(

Also there are some new / nicer features in DB_CUSTOM_V3 in v20

Example of new db_conf file with the features

https://github.com/Torndeco/ArmA3_Wasteland.Altis/blob/revive_beta/extdb/db_custom/a3wasteland.ini

https://github.com/Torndeco/extdb/blob/stable/Changelog.txt

Edited by Torndeco

Share this post


Link to post
Share on other sites

ok got a strange bug when using V20 logging

when requesting it only returns

[2014-Oct-23 04:47:55.143945]: ThreadID 0x00002ea8: extDB: Version: 20
[2014-Oct-23 04:47:55.144945]: ThreadID 0x00002ea8: extDB: Found extdb-conf.ini
[2014-Oct-23 04:47:55.144945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.145945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.145945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.145945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.145945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.145945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.145945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.145945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.145945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.145945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.146945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.146945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.146945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.146945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.146945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:55.146945]: ThreadID 0x00002ea8: extDB: Creating Worker Thread +1
[2014-Oct-23 04:47:59.571198]: ThreadID 0x00002ea8: Extension Input from Server: 9:VERSION
[2014-Oct-23 04:48:10.386817]: ThreadID 0x00002ea8: Extension Input from Server: 9:DATABASE:Database
[2014-Oct-23 04:48:10.386817]: ThreadID 0x00002ea8: extDB: Database Type: MySQL
[2014-Oct-23 04:48:10.392817]: ThreadID 0x00002ea8: extDB: Database Session Pool Started
[2014-Oct-23 04:48:28.180835]: ThreadID 0x00002ea8: Extension Input from Server: 9:ADD:DB_CUSTOM_V3:EWDB:EWDB
[2014-Oct-23 04:48:39.292470]: ThreadID 0x00002ea8: Extension Input from Server: 0:EWDB:GetPlayer:0000
[2014-Oct-23 04:48:39.293470]: ThreadID 0x00002ea8: extDB: DB_CUSTOM_V3: Trace: Input:GetPlayer:0000
[2014-Oct-23 04:48:39.293470]: ThreadID 0x00002ea8: extDB: DB_CUSTOM_V3: Trace: Result: [1,[]]

but v19 would return

09:07.242357]: ThreadID 0x00001f94: Extension Input from Server: 0:EWDB:GetPlayer:0000
[2014-Oct-22 11:09:07.242357]: ThreadID 0x00001f94: extDB: DB_CUSTOM_V2: Trace: Input:GetPlayer:0000
[2014-Oct-22 11:09:07.296360]: ThreadID 0x00001f94: extDB: DB_CUSTOM_V2: Trace: Result: [1,[[1,"0000","v1.3","v1.1","0","0","0","0","0","","SERVER","0","0","",0,0]]]

the .ini file i havent change since v19 and below is the line i am requesting both game and test version dont work on both $INPUT and $INPUT_STRING

[GetPlayer]
SQL_1 = SELECT * FROM `players` FORCE INDEX (`playerid`) WHERE `playerid` = $INPUT_1

Number of Inputs = 1

Sanitize Input = true
Sanitize Output = true

---------- Post added at 04:46 ---------- Previous post was at 03:55 ----------

hmm fixed seems i forgot the change in v20 from SQL_# to SQL#_#

Edited by bph192

Share this post


Link to post
Share on other sites

Yeah sorry about that, normally i wait abit before i break something i.e different Protocol Version.

But there were a couple bugs i fixed + its relatively quick changes to config file to make it work...

If you run into any other issues give me a shout or send me a msg on Skype .

Note you could prob reduce the amount of threads extDB is using (these are worker threads and most of the time will be doing nothing anyways)

Edit your extdb-conf.ini and try change the Threads to 4->8.

Should have no real impact on extDB performance, think i might change the max default value in next version to 4.

edit: Also will add warning when it detects no SQL Statement in db_conf file, looks like i overlooked that

Edited by Torndeco

Share this post


Link to post
Share on other sites

ye 8 threads a a bit overkill but i like thing like that it future proofs it tryed pushing it to the limit the other day seeing how many threads i could get in use and only got to about 5 seems the cycle time is very low wich is good :P

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×