[MDEV-19892] LEAD and LAG return binary data on text fields Created: 2019-06-27 Updated: 2019-06-27 Resolved: 2019-06-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.3.7 |
| Fix Version/s: | 10.3.16 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Cristian Scutaru | Assignee: | Anel Husakovic |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | lag, lead, | ||
| Environment: |
Windows 10 |
||
| Description |
|
Repro: try a LEAD(field, 1) or LAG(field, 1) OVER(), where field is text, not number --> the result will likely be some BINARY data, instead of some legit text field values, as expected. |
| Comments |
| Comment by Alice Sherepa [ 2019-06-27 ] | ||||||||||||||||||||||||||||||||||
|
I could not repeat it on 10.3.7, ubuntu 16.04. It might be also dependent on configuration. Please note also that LEAD and LAG should have ORDER BY. On 10.3.16 such query returns "ERROR 4018 (HY000): No order list in window specification for 'lead'"
| ||||||||||||||||||||||||||||||||||
| Comment by Cristian Scutaru [ 2019-06-27 ] | ||||||||||||||||||||||||||||||||||
|
yes, it had ORDER BY. I also tried this: https://dbfiddle.uk/?rdbms=mariadb_10.3&fiddle=b10144c945758b92ba02dd37e3bc67de it says MariaDB 10.3 and it worked. with t1 as (select 'a1' AS "name" SELECT lag(name, 1) over (order by name) from t1; ------------------------------------------------------------------- I'll close the issue if no repro. | ||||||||||||||||||||||||||||||||||
| Comment by Cristian Scutaru [ 2019-06-27 ] | ||||||||||||||||||||||||||||||||||
|
ok, so on the same Windows 10 with v10.3.16 I got the same wrong result. but v10.3.16 newly installed on a Windows 7 computer worked fine. it could be a config issue on my Win 10 computer, I'd love to find out what... but anyway, I'd say no repro and close the issue. | ||||||||||||||||||||||||||||||||||
| Comment by Anel Husakovic [ 2019-06-27 ] | ||||||||||||||||||||||||||||||||||
|
Hi cristiscu, | ||||||||||||||||||||||||||||||||||
| Comment by Cristian Scutaru [ 2019-06-27 ] | ||||||||||||||||||||||||||||||||||
|
because we determined this happened only on my computer, so it's not Critical anymore. ...I don't know how to close it anyway, do I have the rights? could someone do it? | ||||||||||||||||||||||||||||||||||
| Comment by Anel Husakovic [ 2019-06-27 ] | ||||||||||||||||||||||||||||||||||
|
Ok thank you, I will close it for you. |