From e51bed25201e89b2fed36e45e1642812d88f6398 Mon Sep 17 00:00:00 2001
From: znone <glyc@sina.com.cn>
Date: Tue, 07 Mar 2017 11:06:28 +0000
Subject: [PATCH] 增加对ODBC的支持。
---
include/qtl_database_pool.hpp | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/qtl_database_pool.hpp b/include/qtl_database_pool.hpp
index 68e31c6..1d04e2f 100644
--- a/include/qtl_database_pool.hpp
+++ b/include/qtl_database_pool.hpp
@@ -79,7 +79,7 @@
std::thread m_background_thread;
bool m_stop_thread;
- virtual bool open_database(Database& db)=0;
+ virtual Database* new_database() throw()=0;
void recovery(Database* db)
{
if(db==NULL) return;
@@ -101,9 +101,8 @@
Database* create_database()
{
- Database* db=new Database;
- if(open_database(*db))
- return db;
+ Database* db=new_database();
+ if(db) return db;
{
std::lock_guard<std::mutex> lock(m_pool_mutex);
--
Gitblit v1.9.3