[MCOL-3762] HEX(<decimal>) gets truncated Created: 2020-02-04 Updated: 2023-11-02 |
|
| Status: | Stalled |
| Project: | MariaDB ColumnStore |
| Component/s: | ExeMgr |
| Affects Version/s: | 1.4.2 |
| Fix Version/s: | 23.10 |
| Type: | Bug | Priority: | Minor |
| Reporter: | David Hall (Inactive) | Assignee: | Leonid Fedorov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 2020-2 | ||||||||||||||||
| Assigned for Testing: | |
||||||||||||||||
| Description |
|
see mysql/queries/working_tpch1/qa_fe_cnxFunctions/hex.sql The query:
should return
But instead returns
This appears to only affect decimal types. I looked in the utils/funcexp/hex.cpp code and no changes there should have caused this. |
| Comments |
| Comment by Gagan Goel (Inactive) [ 2020-02-06 ] | |||||||||||||||||||||||||||||||||||
|
Investigated this issue. ColumnStore creates the correct string with length 16, however the server truncates the field length when the string is sent to it via store() call in fetchNextRow(). There is an open server issue for this: https://jira.mariadb.org/browse/MDEV-20548 Closing this issue. | |||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-03-06 ] | |||||||||||||||||||||||||||||||||||
|
Opened as a notification. | |||||||||||||||||||||||||||||||||||
| Comment by Patrick LeBlanc (Inactive) [ 2020-03-10 ] | |||||||||||||||||||||||||||||||||||
|
changed the fix version to n/a because it was messing up daniel's accounting. Change it to whatever is appropriate once it's fixed. | |||||||||||||||||||||||||||||||||||
| Comment by Gagan Goel (Inactive) [ 2020-04-03 ] | |||||||||||||||||||||||||||||||||||
|
The ref file (mysql/queries/working_tpch1/qa_fe_cnxFunctions/hex.sql.ref.log) is temporarily changed to match (incorrect) output from ColumnStore. We need to revert it back when MDEV-20548 is fixed. | |||||||||||||||||||||||||||||||||||
| Comment by Gregory Dorman (Inactive) [ 2020-07-01 ] | |||||||||||||||||||||||||||||||||||
|
MDEV-20548 is not done, so we cannot do this for 1..5.3. | |||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2020-11-10 ] | |||||||||||||||||||||||||||||||||||
|
How to repeat the problem: First, I create the table:
Now run this query:
Notice, the FFFF in the last column is wrong. Now if I change the engine from ColumnStore to InnoDB, the results become correct:
|