mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 09:12:28 +02:00
#3317: Data::MySQL MySQL headers and library search paths
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include "Poco/Data/MySQL/SessionImpl.h"
|
||||
#include "Poco/Data/SessionFactory.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@@ -46,7 +46,7 @@ const std::string& Connector::name() const
|
||||
Poco::AutoPtr<Poco::Data::SessionImpl> Connector::createSession(const std::string& connectionString,
|
||||
std::size_t timeout)
|
||||
{
|
||||
return Poco::AutoPtr<Poco::Data::SessionImpl>(new SessionImpl(connectionString, timeout));
|
||||
return Poco::AutoPtr<Poco::Data::SessionImpl>(new SessionImpl(connectionString, timeout));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
#include "Poco/Data/MySQL/MySQLException.h"
|
||||
#include <mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
//
|
||||
|
||||
|
||||
#include <mysql.h>
|
||||
#include "Poco/Data/MySQL/StatementExecutor.h"
|
||||
#include "Poco/Format.h"
|
||||
#include <mysql/mysql.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@@ -52,7 +52,7 @@ void StatementExecutor::prepare(const std::string& query)
|
||||
_state = STMT_COMPILED;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int rc = mysql_stmt_prepare(_pHandle, query.c_str(), static_cast<unsigned int>(query.length()));
|
||||
if (rc != 0)
|
||||
{
|
||||
@@ -119,7 +119,7 @@ bool StatementExecutor::fetch()
|
||||
int res = mysql_stmt_fetch(_pHandle);
|
||||
|
||||
// we have specified zero buffers for BLOBs, so DATA_TRUNCATED is normal in this case
|
||||
if ((res != 0) && (res != MYSQL_NO_DATA) && (res != MYSQL_DATA_TRUNCATED))
|
||||
if ((res != 0) && (res != MYSQL_NO_DATA) && (res != MYSQL_DATA_TRUNCATED))
|
||||
throw StatementException("mysql_stmt_fetch error", _pHandle, _query);
|
||||
|
||||
return (res == 0) || (res == MYSQL_DATA_TRUNCATED);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
#include "Poco/Data/MySQL/Utility.h"
|
||||
#include <mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
Reference in New Issue
Block a user