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

\OCP\DB\QueryBuilder\IExpressionBuilder::eq and the $type param #20598

Open
ChristophWurst opened this issue Apr 22, 2020 · 4 comments
Open

\OCP\DB\QueryBuilder\IExpressionBuilder::eq and the $type param #20598

ChristophWurst opened this issue Apr 22, 2020 · 4 comments
Labels
1. to develop Accepted and waiting to be taken care of 26-feedback bug

Comments

@ChristophWurst
Copy link
Member

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Join two tables on a.x = b.y where a.x is an int and b.y is a varchar

Expected behaviour

Using an explicit type for \OCP\DB\QueryBuilder\IExpressionBuilder::eq I might expect the expressions to be type cased so the comparison works.

Actual behaviour

This blows up on postgres (at least, possibly also on strict mysql).

Ref nextcloud/mail#2970
Ref nextcloud/mail#2796

cc @nickvergessen

@ChristophWurst ChristophWurst added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Apr 22, 2020
@nickvergessen
Copy link
Member

There is code in OCIExpressionBuilder that could be copied. Might also be necessary for mysql strict mode. Quite dangerous so let's experiment after stable19

@szaimen

This comment was marked as resolved.

@nickvergessen nickvergessen added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels May 31, 2021
@szaimen

This comment was marked as resolved.

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 9, 2023
@nickvergessen
Copy link
Member

Type is still not used here:
https://github.com/nextcloud/server/blob/master/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php#L142-L146
And the function not overwritten in the PgSqlExpressionBuilder.

@nickvergessen nickvergessen added 1. to develop Accepted and waiting to be taken care of 26-feedback and removed needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of 26-feedback bug
Projects
None yet
Development

No branches or pull requests

3 participants