From 68a5c554923bcb1ac223908aefd0181870c6d47f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 12 Jan 2012 08:55:19 +0200 Subject: Cosmetic changes --- odb/oracle/object-result.txx | 8 ++++++++ odb/oracle/oracle-types.hxx | 7 +++++-- odb/oracle/query.cxx | 2 +- odb/oracle/view-result.txx | 4 ++++ 4 files changed, 18 insertions(+), 3 deletions(-) (limited to 'odb') diff --git a/odb/oracle/object-result.txx b/odb/oracle/object-result.txx index 1153534..6cd994b 100644 --- a/odb/oracle/object-result.txx +++ b/odb/oracle/object-result.txx @@ -152,6 +152,10 @@ namespace odb else *r->image_copy_ = im; + // Increment binding version since we may have "stolen" some + // descriptors (LOB, date-time) from the image. Re-bind will + // reallocate them and update the binding. + // r->statements_.select_image_binding ().version++; im.change_callback_.callback = 0; @@ -270,6 +274,10 @@ namespace odb else *r->image_copy_ = im; + // Increment binding version since we may have "stolen" some + // descriptors (LOB, date-time) from the image. Re-bind will + // reallocate them and update the binding. + // r->statements_.select_image_binding ().version++; im.change_callback_.callback = 0; diff --git a/odb/oracle/oracle-types.hxx b/odb/oracle/oracle-types.hxx index 6e01bf7..f2e5792 100644 --- a/odb/oracle/oracle-types.hxx +++ b/odb/oracle/oracle-types.hxx @@ -122,8 +122,11 @@ namespace odb }; // An instance of this structure specifies the function to invoke and - // the context to pass just prior to the image associated with a query - // being modified. + // the context to pass when the object/view image is about to be + // modified. This mechanism is used by the query machinery to save the + // image between result iteration and dereferencing if something gets + // executed between these two operations that would overwrite the + // image. // struct change_callback { diff --git a/odb/oracle/query.cxx b/odb/oracle/query.cxx index 60c83d8..f561a63 100644 --- a/odb/oracle/query.cxx +++ b/odb/oracle/query.cxx @@ -203,7 +203,7 @@ namespace odb optimize () { // Remove a single TRUE literal or one that is followe by one of - // the other clauses. This avoids usless WHERE clauses like + // the other clauses. This avoids useless WHERE clauses like // // WHERE TRUE GROUP BY foo // diff --git a/odb/oracle/view-result.txx b/odb/oracle/view-result.txx index 1d34503..9b9b0c9 100644 --- a/odb/oracle/view-result.txx +++ b/odb/oracle/view-result.txx @@ -116,6 +116,10 @@ namespace odb else *r->image_copy_ = im; + // Increment binding version since we may have "stolen" some + // descriptors (LOB, date-time) from the image. Re-bind will + // reallocate them and update the binding. + // r->statements_.image_binding ().version++; im.change_callback_.callback = 0; -- cgit v1.1