Skip to content
Permalink
Browse files

FIX #34482, clear values for piecewise read mode (otherwise it concat…

…enates current default value with default value of the previous row in result)
  • Loading branch information
speillet authored and nyalldawson committed Jun 2, 2020
1 parent 4094d18 commit 3f2fb5a3c4855488f6653b2544742da05f5b4164
Showing with 4 additions and 0 deletions.
  1. +3 −0 src/providers/oracle/ocispatial/qsql_ocispatial.cpp
  2. +1 −0 tests/src/python/test_provider_oracle.py
@@ -3432,7 +3432,10 @@ bool QOCISpatialResult::gotoNext( QSqlCachedResult::ValueCache &values, int inde

// need to read piecewise before assigning values
if ( r == OCI_SUCCESS && piecewise )
{
values.clear();
r = d->cols->readPiecewise( values, index );
}

if ( r == OCI_SUCCESS )
d->cols->getValues( values, index );
@@ -234,6 +234,7 @@ def testDateInsertion(self):
def testDefaultValue(self):
self.assertEqual(self.source.defaultValue(1), NULL)
self.assertEqual(self.source.defaultValue(2), "'qgis'")
self.assertEqual(self.source.defaultValue(3), "'qgis'")

def testPoints(self):
vl = QgsVectorLayer('%s table="QGIS"."POINT_DATA" (GEOM) srid=4326 type=POINT sql=' %

0 comments on commit 3f2fb5a

Please sign in to comment.
You can’t perform that action at this time.