delahaye / dlh_googlemaps

Google Maps Extension für Contao
20 stars 26 forks source link

Fix UpgradeHandler for Contao 4.9+ #124

Open fritzmg opened 2 years ago

fritzmg commented 2 years ago

Since Contao 4.9.0 the result within \Contao\Database\Result is buffered. This leads to the following error when updating from an older version of the extension to a newer one:

Cannot execute queries while other unbuffered queries are active.

This is because MySQL does not allow you to execute an UPDATE or INSERT on the same table where a result from a SELECT is still buffered. To fix this we first need to fetch all the records of the previous SELECT and then traverse these fetched records instead.

fGuix commented 2 years ago

@delahaye any chance this pull requests might be merge ?