From bae6ada688e0b09c773edc9b9f7e54f98b019cad Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 10 Feb 2012 15:27:01 +0200 Subject: Don't allocate unnecessary entries in container truncation array --- odb/pgsql/container-statements.txx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'odb/pgsql/container-statements.txx') diff --git a/odb/pgsql/container-statements.txx b/odb/pgsql/container-statements.txx index cc9594d..74948f2 100644 --- a/odb/pgsql/container-statements.txx +++ b/odb/pgsql/container-statements.txx @@ -41,9 +41,7 @@ namespace odb container_statements_impl (connection_type& conn) : base (conn) { - this->data_image_truncated_ = data_image_truncated_array_; - this->select_image_truncated_ = data_image_truncated_array_ + - traits::id_column_count; + this->select_image_truncated_ = select_image_truncated_array_; this->cond_image_binding_.bind = cond_image_bind_; this->cond_image_binding_.count = traits::cond_column_count; @@ -68,12 +66,13 @@ namespace odb std::memset (cond_image_bind_, 0, sizeof (cond_image_bind_)); std::memset (data_image_bind_, 0, sizeof (data_image_bind_)); - std::memset (data_image_truncated_array_, + std::memset (select_image_truncated_array_, 0, - sizeof (data_image_truncated_array_)); + sizeof (select_image_truncated_array_)); for (std::size_t i (0); i < traits::data_column_count; ++i) - data_image_bind_[i].truncated = data_image_truncated_array_ + i; + data_image_bind_[i + traits::id_column_count].truncated = + select_image_truncated_array_ + i; this->insert_one_name_ = traits::insert_one_name; this->insert_one_text_ = traits::insert_one_statement; -- cgit v1.1