Jump to content
Sign in to follow this  
bull_a

ExtDB3 calling stored procedures

Recommended Posts

Hi all,

 

I have already created a ticket for this on the ExtDB3 BitBucket issues page, but I just wanted to run this past the community as well. The problem I am getting is that when I try to call multiple stored procedures (one after the other) the first one executes and returns the expected results, however when the second (next) request is sent off it returns the following error message:

[0,"Error MariaDBQueryException Exception"]

I ran the ExtDB3 plugin with the debug .dll and .exe and I get the following messages in the debug files

[21:06:08:265003 +00:00] [Thread 8196] extDB3: Input from Server: 0:SQL:CALL SPFNC_TESTING()
[21:06:08:265073 +00:00] [Thread 8196] extDB3: SQL: Trace: Input: CALL SPFNC_TESTING()
[21:06:08:265135 +00:00] [Thread 8196] extDB3: SQL: Error MariaDBQueryException: Commands out of sync; you can't run this command now
[21:06:08:265148 +00:00] [Thread 8196] extDB3: SQL: Error MariaDBQueryException: Input: CALL SPFNC_TESTING()
[21:06:08:265159 +00:00] [Thread 8196] extDB3: Output to Server: [0,"Error MariaDBQueryException Exception"] 

 (The source files are on the Issue page here)

 

Has anyone come across this issue before, and know why this is happening? My initial though is that the CALL command is starting a new thread and is not ending when the procedure has returned/ended meaning that new calls to the extension will always return an error.

 

When I pass the following code (please see below) to the extension, it resets the protocols and database connection and I can again send off a CALL command.

9:RESET

Any help or a point in the right direction is appreciated,

 

Bull

Share this post


Link to post
Share on other sites

I don't have this kind of problems using extDB2.

Are you trying to call them in a single query ?

Share this post


Link to post
Share on other sites

Hi harmdhast,

 

thanks for having a look, I have attached the source to the issue in the external link. This is how it looks in the script file:

_return = "extdb3" callExtension "0:SQL:CALL SPFNC_TESTING()";
_return = call compile _return;

_return params [
  ["_key",0,[0]],
  ["_result",[],[]]
];

if (_key isEqualTo 0) exitWith {
  diag_log "ERROR/fnc_log: 'CALL SPFNC_TESTING()' ended in error";
  nil; // returns nothing
};

// attempts to call again
_return = "extdb3" callExtension "0:SQL:CALL SPFNC_TESTING()";
_return = call compile _return;

_return params [
  ["_key",0,[0]],
  ["_result",[],[]]
];

if (_key isEqualTo 0) exitWith {
  diag_log "ERROR/fnc_log: 'CALL SPFNC_TESTING()' ended in error";
  nil; // returns nothing
};

(This is an edit/testing script - it is designed to return a result set from a SELECT query)

 

 

The second query is what is returning the errors and log entry.

 

Bull

Share this post


Link to post
Share on other sites
Commands out of sync

 

Its purely a c++ code issue, just have some patience will have a look at the issue over the weekend.

  • Like 3

Share this post


Link to post
Share on other sites

Thanks for the update  :) Be sure to let me know if you want some more files and log information on the ticket

 

Bull

Share this post


Link to post
Share on other sites

Thanks torndeco :) really appreciate you looking into, and fixing this issue so quickly

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
Sign in to follow this  

×