Skip to content

Commit

Permalink
Issue #233: Fix erratic prepared execute
Browse files Browse the repository at this point in the history
  • Loading branch information
irodushka committed Nov 17, 2024
1 parent 0c08ce7 commit fbdfe6e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions ChangeLog_v3.0
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* EXECUTE STATEMENT changed for the worse in ODBC 3.0
#233 opened by Fabio-LV

* Abnormal termination in SQLFetch()
#229 by fdcastel

Expand Down
13 changes: 8 additions & 5 deletions IscDbc/Sqlda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ Sqlda::~Sqlda()
void Sqlda::init()
{
meta = nullptr;
metaBackup = meta;
sqlvar.clear();
dataStaticCursor = nullptr;
columnsCount = 0;
Expand Down Expand Up @@ -456,10 +455,14 @@ Sqlda::ExecBuilder::ExecBuilder(Sqlda& sqlda) : _sqlda{sqlda}, _localMeta { null

Sqlda::ExecBuilder::~ExecBuilder()
{
//release meta
if (_localMeta) _localMeta->release();
//restore original sql vars
for (auto& var : _sqlda.sqlvar) *static_cast<SqlProperties*>(&var) = var.orgSqlProperties;
//save new meta
if (_localMeta)
{
for (auto& var : _sqlda.sqlvar) var.orgSqlProperties = *static_cast<SqlProperties*>(&var);
if(_sqlda.meta) _sqlda.meta->release();
_sqlda.meta = _localMeta;
_sqlda.buffer = _localBuffer;
}
}

void Sqlda::mapSqlAttributes( IscStatement *stmt )
Expand Down
1 change: 0 additions & 1 deletion IscDbc/Sqlda.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ class Sqlda

IscConnection* connection;
Firebird::IMessageMetadata* meta;
Firebird::IMessageMetadata* metaBackup;

buffer_t buffer;

Expand Down
2 changes: 1 addition & 1 deletion WriteBuildNo.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
// Note - there must be two tabs between BUILDNUM_VERSION and
// the actual number, otherwise the makefile for linux will not
// pick up the value.
#define BUILDNUM_VERSION 13
#define BUILDNUM_VERSION 14

0 comments on commit fbdfe6e

Please sign in to comment.