[MDEV-7301] Unknown column quoted with backticks in HAVING clause when using function. Created: 2014-12-10 Updated: 2015-03-23 Resolved: 2015-03-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 5.1.67, 5.2.14, 5.3.12, 5.5, 10.0 |
| Fix Version/s: | 5.5.43, 10.0.18 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jan Kopp | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream-fixed | ||
| Environment: |
12.04.5 LTS (GNU/Linux 3.13.0-40-generic x86_64) - replacement of MySQL 5.6 |
||
| Attachments: |
|
| Description |
|
Error occurs when using backticks in HAVING clause with function (e.g. UPPER, CONCAT, DATE_FORMAT, etc...). Views are afected by this behavior - forcing backticks. How to simulate
Works well on:
Throws an error code with unknown column:
|
| Comments |
| Comment by Elena Stepanova [ 2015-01-09 ] | |||||||||||||||||||||||||||||||
|
I assume "Works well on MySQL 5.5" is a typo, you meant 5.6? | |||||||||||||||||||||||||||||||
| Comment by Jan Kopp [ 2015-01-09 ] | |||||||||||||||||||||||||||||||
|
Both versions ... tested on 5.5, 5.6 (just for sure) as I mentioned. | |||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-01-10 ] | |||||||||||||||||||||||||||||||
|
It's a bit strange because it is reproducible on the current MySQL 5.5 tree and on older versions as well; but it's unimportant really, I was just trying to clarify some details. It used to be an upstream bug which was fixed in 5.6.11 by the revision below, but is still present in all MariaDB versions.
Test case (exactly the same as in the description, just put together for more convenient copy-paste):
The bug is that the last SELECT fails with ER_BAD_FIELD_ERROR. | |||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-01-13 ] | |||||||||||||||||||||||||||||||
|
revno: 4552 Merged upstream fix to Bug#16221433 MYSQL REJECTS QUERY DUE TO BAD See attached patch, for some reason my bzr commits trigger or my emails to commits list do not work. | |||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2015-02-18 ] | |||||||||||||||||||||||||||||||
|
sanja has better knowledge of VIEWs and Item_refs. Sanja, please review. | |||||||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2015-03-22 ] | |||||||||||||||||||||||||||||||
|
1) why it is not 5.5? | |||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-03-23 ] | |||||||||||||||||||||||||||||||
|
1) Patch moved to 5.5 http://lists.askmonty.org/pipermail/commits/2015-March/007659.html |