dbaccess/source/core/api/BookmarkSet.cxx      |    2 ++
 dbaccess/source/core/api/WrappedResultSet.cxx |    2 ++
 2 files changed, 4 insertions(+)

New commits:
commit 5d64bdf62af91a896644424c55c28f57e0923cdf
Author:     prrvchr <prrv...@gmail.com>
AuthorDate: Fri Aug 29 02:52:28 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Sep 29 09:40:28 2025 +0200

    tdf#168145 Base must come out of the insert row
    
    If you use ResultSets with the XRowLocate interface, Base moves to the 
insertion row in the WrappedResultSet.cxx file, line 73.
    
    And it never returns. Normally, this shouldn't happen, after the insert is 
done you must go away from the insertion row to continue.
    At least that's what it seems to me?
    
    The same scenario happens in the file BookmarkSet.cxx line 78 and so this 
has also been corrected.
    
    Change-Id: I169fd0a32441922025b3cc5531b32166b4c54be0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190349
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/dbaccess/source/core/api/BookmarkSet.cxx 
b/dbaccess/source/core/api/BookmarkSet.cxx
index 75b369885e3b..a11cbbd5fe7c 100644
--- a/dbaccess/source/core/api/BookmarkSet.cxx
+++ b/dbaccess/source/core/api/BookmarkSet.cxx
@@ -84,6 +84,8 @@ void OBookmarkSet::insertRow( const ORowSetRow& 
_rInsertRow,const connectivity::
             updateColumn(i,xUpdRow,*aIter);
         }
         xUpd->insertRow();
+        // We must go away from the insert row when the insert is finish
+        xUpd->moveToCurrentRow();
         (*_rInsertRow->begin()) = m_xRowLocate->getBookmark();
     }
     else
diff --git a/dbaccess/source/core/api/WrappedResultSet.cxx 
b/dbaccess/source/core/api/WrappedResultSet.cxx
index a4ad9f363cae..275a0061cff7 100644
--- a/dbaccess/source/core/api/WrappedResultSet.cxx
+++ b/dbaccess/source/core/api/WrappedResultSet.cxx
@@ -79,6 +79,8 @@ void WrappedResultSet::insertRow( const ORowSetRow& 
_rInsertRow,const connectivi
         updateColumn(i,m_xUpdRow,*aIter);
     }
     m_xUpd->insertRow();
+    // We must go away from the insert row when the insert is finish
+    m_xUpd->moveToCurrentRow();
     (*_rInsertRow->begin()) = getBookmark();
 }
 

Reply via email to