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

SQL query from DB Manager is executed twice #45318

Closed
2 tasks done
nextstopsun opened this issue Sep 29, 2021 · 3 comments · Fixed by #45351
Closed
2 tasks done

SQL query from DB Manager is executed twice #45318

nextstopsun opened this issue Sep 29, 2021 · 3 comments · Fixed by #45351
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin Feedback Waiting on the submitter for answers

Comments

@nextstopsun
Copy link

What is the bug or the crash?

When executing a query in DB Managers SQL Window, it's being sent to database twice.

Steps to reproduce the issue

Testing on postgres:

  1. Open DB Manager SQL Window dialog.
  2. Enter SQL query:
SELECT 'test'
  1. Look into the database log.
2021-09-29 09:04:30.608 UTC [64] LOG:  statement: SET application_name='QGIS'
2021-09-29 09:04:30.610 UTC [64] LOG:  statement: SET extra_float_digits=3
2021-09-29 09:04:30.613 UTC [64] LOG:  statement: SELECT 'test'
2021-09-29 09:04:30.615 UTC [64] LOG:  statement: SELECT oid, typname FROM pg_type WHERE oid IN (25)
2021-09-29 09:04:30.626 UTC [64] LOG:  statement: SELECT 'test'
2021-09-29 09:04:30.628 UTC [64] LOG:  statement: SELECT oid, typname FROM pg_type WHERE oid IN (25)

Versions

Tested on 3.20.
Looks like 3.16 and above are affected.

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@nextstopsun nextstopsun added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 29, 2021
@Gustry
Copy link
Contributor

Gustry commented Sep 29, 2021

Linked to #45204 ?

@Gustry Gustry added the Feedback Waiting on the submitter for answers label Sep 29, 2021
@gioman
Copy link
Contributor

gioman commented Sep 29, 2021

Linked to #45204 ?

I had the same thought.

@nextstopsun
Copy link
Author

Linked to #45204 ?

Not only this slows down queries, but causes constraint violations in some cases.

@elpaso elpaso added the DB Manager Relating to the DB Manager core plugin label Oct 1, 2021
@elpaso elpaso self-assigned this Oct 1, 2021
elpaso added a commit to elpaso/QGIS that referenced this issue Oct 1, 2021
nyalldawson pushed a commit that referenced this issue Oct 1, 2021
qgis-bot pushed a commit that referenced this issue Oct 1, 2021
nyalldawson pushed a commit that referenced this issue Oct 1, 2021
nyalldawson pushed a commit that referenced this issue Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin Feedback Waiting on the submitter for answers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants