Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPATIALITE: fix insert incompatible geometry types #54734

Merged
merged 6 commits into from
Sep 30, 2023

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Sep 25, 2023

Fix #54662

Logic shamelessly copied from potgres provider.

@elpaso elpaso added Bug Either a bug report, or a bug fix. Let's hope for the latter! backport queued_ltr_backports Queued Backports labels Sep 25, 2023
@github-actions github-actions bot added this to the 3.34.0 milestone Sep 25, 2023
@elpaso elpaso force-pushed the bugfix-gh54662-spatialite-multisurface branch from 0a457af to 3b04f8d Compare September 25, 2023 11:13
@elpaso
Copy link
Contributor Author

elpaso commented Sep 28, 2023

@rouault all changes done

@elpaso
Copy link
Contributor Author

elpaso commented Sep 30, 2023

@rouault the oapif and wfs providers are using spatialite in a separate thread, which was hitting the thread check here https://github.com/qgis/QGIS/blob/master/src/core/vector/qgsvectordataprovider.cpp#L899

Now, the only instance method called is a read-only wkbType(), wkb type is not supposed to be changed by the provider so the implementation should be thread safe but for extra safety I decided to create a new static version of the method and proxy the instance method to the static call.

Can you please please review my last changes?

@elpaso elpaso merged commit 4934029 into qgis:master Sep 30, 2023
30 checks passed
@qgis-bot
Copy link
Collaborator

The backport to queued_ltr_backports failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply ed64f37b51... SPATIALITE: fix insert incompatible geometry types
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

stdout
Auto-merging src/providers/spatialite/qgsspatialiteprovider.cpp
Auto-merging src/providers/spatialite/qgsspatialiteprovider.h
Auto-merging tests/src/python/test_provider_spatialite.py
CONFLICT (content): Merge conflict in tests/src/python/test_provider_spatialite.py

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-54734-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick ed64f37b51bdf4b5024d2251b4fe5020de14f50d,30cd5124484b258f9054ad1e41487c87c415ab25,d462078894b8edd7312a2eab78b96ec13b807498,d98fb4d2cf682a448a48f6e1abf6d65f742d1538,3cac4c0b0be793a3eb18a9b8a51d4ed5f9fa5de2,7bd457b2bdd8cdd1dcfe247f70b70e89b7f073cd
# Push it to GitHub
git push --set-upstream origin backport-54734-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports

Then, create a pull request where the base branch is queued_ltr_backports and the compare/head branch is backport-54734-to-queued_ltr_backports.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Sep 30, 2023
elpaso added a commit to elpaso/QGIS that referenced this pull request Oct 5, 2023
Manual backport of qgis#54734

Fix qgis#54662

Logic shamelessly copied from potgres provider.
@elpaso elpaso mentioned this pull request Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport queued_ltr_backports Queued Backports Bug Either a bug report, or a bug fix. Let's hope for the latter! failed backport The automated backport attempt failed, needs a manual backport PostGIS data provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Geometry Error SpatiaLite Database
3 participants