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

Not working with PostgreSQL #4

Closed
eazrael opened this issue Nov 17, 2018 · 2 comments
Closed

Not working with PostgreSQL #4

eazrael opened this issue Nov 17, 2018 · 2 comments
Milestone

Comments

@eazrael
Copy link

eazrael commented Nov 17, 2018

Clicking on the "Issue Support Ranking" Button just gives an error page:
#-2: ERROR: syntax error at or near "sql_mode"
LINE 1: SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GR...
^ für die Abfrage: SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')).

@CasN
Copy link
Collaborator

CasN commented Jan 6, 2019

This indeed is a statement which needs to be adjusted to fit all supported databases. To be fixed

@eazrael
Copy link
Author

eazrael commented Jan 6, 2019

I implemented postgres queries and added a readme.md which I guessed from the code:
https:/eazrael/GaugeSupport
Would be happy if you pull the changes

@dregad dregad added this to the 2.5.0 milestone Sep 8, 2019
dregad added a commit that referenced this issue Sep 8, 2019
The query is a lot more complex than it needs to be. All of the ratings
data aggregated with outer joins is not used anywhere in the plugin's
code, so we might as well remove it.

This removes the MySQL-specific IFNULL() function that was causing
compatibility issues with PostgreSQL.

Fixes #4
dregad added a commit that referenced this issue Sep 8, 2019
Until now, saving a user's vote was relying on MySQL's non-standard
"UPSERT" statement (INSERT INTO ... ON DUPLICATE KEY UPDATE ...). This
prevents using the plugin with other RDBMS.

To avoid this, we always delete the old vote, and insert a new record
with the user's new stance.

Fixes #4
dregad added a commit to dregad/GaugeSupport that referenced this issue Sep 9, 2019
The query is a lot more complex than it needs to be. All of the ratings
data aggregated with outer joins is not used anywhere in the plugin's
code, so we might as well remove it.

This removes the MySQL-specific IFNULL() function that was causing
compatibility issues with PostgreSQL.

Fixes mantisbt-plugins#4
dregad added a commit to dregad/GaugeSupport that referenced this issue Sep 9, 2019
Until now, saving a user's vote was relying on MySQL's non-standard
"UPSERT" statement (INSERT INTO ... ON DUPLICATE KEY UPDATE ...). This
prevents using the plugin with other RDBMS.

To avoid this, we always delete the old vote, and insert a new record
with the user's new stance.

Fixes mantisbt-plugins#4
@dregad dregad closed this as completed in bfa7b92 Sep 9, 2019
dregad added a commit that referenced this issue Sep 9, 2019
Until now, saving a user's vote was relying on MySQL's non-standard
"UPSERT" statement (INSERT INTO ... ON DUPLICATE KEY UPDATE ...). This
prevents using the plugin with other RDBMS.

To avoid this, we always delete the old vote first, and then insert a
new record with the user's new stance.

Fixes #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants