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

test: Rebind Log Output Query for PostgreSQL #876

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented Dec 17, 2024

While debugging a totally unrelated issue, I stumbled over the following PostgreSQL output:

[97] ERROR:  syntax error at or near "ORDER" at character 173
[97] STATEMENT:  SELECT h.event_time, h.event_type FROM history h
                 JOIN host ON host.id = h.host_id
                 LEFT JOIN downtime_history d ON d.downtime_id = h.downtime_history_id
                 WHERE host.name = ?
                 ORDER BY h.event_time

The relevant code misses a db.Rebind as the "?" character is for MySQL.

While debugging a totally unrelated issue, I stumbled over the following
PostgreSQL output:

> [97] ERROR:  syntax error at or near "ORDER" at character 173
> [97] STATEMENT:  SELECT h.event_time, h.event_type FROM history h
>                  JOIN host ON host.id = h.host_id
>                  LEFT JOIN downtime_history d ON d.downtime_id = h.downtime_history_id
>                  WHERE host.name = ?
>                  ORDER BY h.event_time

The relevant code misses a db.Rebind as the "?" character is for MySQL.
@oxzi oxzi added bug Something isn't working area/tests labels Dec 17, 2024
@oxzi oxzi added this to the 1.2.1 milestone Dec 17, 2024
@oxzi oxzi requested a review from lippserd December 17, 2024 10:52
@cla-bot cla-bot bot added the cla/signed label Dec 17, 2024
@lippserd lippserd merged commit accf30b into main Dec 17, 2024
32 checks passed
@lippserd lippserd deleted the history-test-rebind-log branch December 17, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests bug Something isn't working cla/signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants