Skip to content

Commit

Permalink
Merge pull request #150 from alliedmodders/fix-dbi
Browse files Browse the repository at this point in the history
Fix DBI after AMTL changes.
  • Loading branch information
dvander committed Sep 4, 2014
2 parents a1dc110 + 448c55c commit 8da4179
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/mysql/mysql/MyDatabase.cpp
Expand Up @@ -101,6 +101,9 @@ MyDatabase::MyDatabase(MYSQL *mysql, const DatabaseInfo *info, bool persistent)
m_Info.driver = NULL;
m_Info.maxTimeout = info->maxTimeout;
m_Info.port = info->port;

// DBI, for historical reasons, guarantees an initial refcount of 1.
AddRef();
}

MyDatabase::~MyDatabase()
Expand Down
2 changes: 2 additions & 0 deletions extensions/sqlite/driver/SqDatabase.cpp
Expand Up @@ -36,6 +36,8 @@
SqDatabase::SqDatabase(sqlite3 *sq3, bool persistent) :
m_sq3(sq3), m_Persistent(persistent)
{
// DBI, for historical reasons, guarantees an initial refcount of 1.
AddRef();
}

SqDatabase::~SqDatabase()
Expand Down

0 comments on commit 8da4179

Please sign in to comment.