Corrected order of pre-use execution steps.

This commit is contained in:
Maciej Sobczak
2010-01-21 23:57:11 +01:00
parent 7472d9bc75
commit a638c3155c
+5 -2
View File
@@ -285,6 +285,11 @@ bool statement_impl::execute(bool withDataExchange)
fetchSize_ = initialFetchSize_;
// pre-use should be executed before inspecting the sizes of use
// elements, as they can be resized in type conversion routines
pre_use();
std::size_t bindSize = uses_size();
if (bindSize > 1 && fetchSize_ > 1)
@@ -293,8 +298,6 @@ bool statement_impl::execute(bool withDataExchange)
"Bulk insert/update and bulk select not allowed in same query");
}
pre_use();
// looks like a hack and it is - row description should happen
// *after* the use elements were completely prepared
// and *before* the into elements are touched, so that the row