From 403d6589f17274c77dfc236aa109bac3862ffddb Mon Sep 17 00:00:00 2001 From: Alex Kashchenko Date: Sep 06 2018 11:40:25 +0000 Subject: add sqlite-params-default-init-fix.patch --- diff --git a/soci.spec b/soci.spec index c24e1d5..b9cdde4 100644 --- a/soci.spec +++ b/soci.spec @@ -31,6 +31,8 @@ License: Boost URL: http://%{name}.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Patch0: soci-001-fix-auto_ptr-c++11.patch +Patch1: sqlite-params-default-init-fix.patch + BuildRequires: gcc-c++ BuildRequires: cmake @@ -195,6 +197,7 @@ library. The documentation is the same as at the %{name} web page. %prep %setup -q %patch0 -p1 +%patch1 -p1 # Rename change-log and license file, so that they comply with # packaging standard diff --git a/sqlite-params-default-init-fix.patch b/sqlite-params-default-init-fix.patch new file mode 100644 index 0000000..c48a868 --- /dev/null +++ b/sqlite-params-default-init-fix.patch @@ -0,0 +1,15 @@ +diff --git a/backends/sqlite3/standard-use-type.cpp b/backends/sqlite3/standard-use-type.cpp +index 43ed4f0..123c075 100644 +--- a/backends/sqlite3/standard-use-type.cpp ++++ b/backends/sqlite3/standard-use-type.cpp +@@ -74,7 +74,9 @@ void sqlite3_standard_use_type_backend::pre_use(indicator const * ind) + + if (statement_.useData_[0].size() < static_cast(position_)) + { +- statement_.useData_[0].resize(position_); ++ sqlite3_column empty; ++ empty.isNull_ = true; ++ statement_.useData_[0].resize(position_, empty); + } + + if (ind != NULL && *ind == i_null)