[MCOL-3846] conv() may truncate Created: 2020-02-28  Updated: 2020-03-02  Resolved: 2020-03-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr, MDB Plugin
Affects Version/s: 1.4.2
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: David Hall (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MCOL-3596 conv() returns less chars in the resu... Closed

 Description   

Consider
select si, conv(si, 16, 8) from dtypes limit 1; //si = -9

Columnstore returns 177777777777777777776
InnoDB returns 1777777777777777777767

Internally, we calculate the correct value, but in fetchNextRow(), we call
f2->store((const char*)row.getStringPointer(s), row.getStringLength(s), f2->charset());
This function looks at the max string length set in f2 (63 in this case) and divides it by the max number of bytes per char as set in f2 (not that passed in as the last param) – in this case 3. This results in 21 as the max number of chars to copy.

What can we do to increase the max string length or not use utf8 for this single case?



 Comments   
Comment by David Hall (Inactive) [ 2020-03-02 ]

Duplicates MCOL-3596

Generated at Thu Feb 08 02:45:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.