From 74cb6074710e2f4dc483fe03fe8518fabdcc3066 Mon Sep 17 00:00:00 2001 From: Rangel Reale Date: Sun, 11 Nov 2012 11:54:38 -0200 Subject: [PATCH] * BUGFIX: SQLiteStatement was return affected rows even when there were none * Allows binding of null Poco::Any. --- Data/SQLite/src/SQLiteStatementImpl.cpp | 4 ++-- Data/src/AbstractBinder.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Data/SQLite/src/SQLiteStatementImpl.cpp b/Data/SQLite/src/SQLiteStatementImpl.cpp index 58be0f3053..56b83b7acd 100644 --- a/Data/SQLite/src/SQLiteStatementImpl.cpp +++ b/Data/SQLite/src/SQLiteStatementImpl.cpp @@ -194,12 +194,12 @@ void SQLiteStatementImpl::bindImpl() if (_bindBegin != bindings().end()) { - _affectedRowCount = (*_bindBegin)->numOfRowsHandled(); + std::size_t boundRowCount = (*_bindBegin)->numOfRowsHandled(); Bindings::iterator oldBegin = _bindBegin; for (std::size_t pos = 1; _bindBegin != bindEnd && (*_bindBegin)->canBind(); ++_bindBegin) { - if (_affectedRowCount != (*_bindBegin)->numOfRowsHandled()) + if (boundRowCount != (*_bindBegin)->numOfRowsHandled()) throw BindingException("Size mismatch in Bindings. All Bindings MUST have the same size"); (*_bindBegin)->bind(pos); diff --git a/Data/src/AbstractBinder.cpp b/Data/src/AbstractBinder.cpp index 09358df007..de71ed4f29 100644 --- a/Data/src/AbstractBinder.cpp +++ b/Data/src/AbstractBinder.cpp @@ -458,6 +458,8 @@ void AbstractBinder::bind(std::size_t pos, const Any& val, Direction dir) bind(pos, RefAnyCast