[MCOL-297] CHARACTER_LENGTH(datetime) returns wrong length Created: 2016-09-14 Updated: 2016-10-05 Resolved: 2016-10-05 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.4 |
| Type: | Task | Priority: | Trivial |
| Reporter: | David Hall (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Centos 6.5 |
||
| Issue Links: |
|
||||||||
| Sprint: | 2016-19 | ||||||||
| Description |
|
A date time returns a string similar to "1997-01-01 00:00:00", which has 19 characters, yet the function CHARACTER_LENGTH when passed a date-time object returns 7 fewer. This is because of the following specific code in the function: //adjust for microseconds not counted Not sure why this is there as microseconds have nothing to do with it. |
| Comments |
| Comment by David Hall (Inactive) [ 2016-09-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Removed the offending -7. I would really like to know what was going through the author's mind when s/he wrote that. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2016-10-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 1.0.4-1 mcsadmin> getsoft Name : mariadb-columnstore-platform MariaDB [mytest]> select cdate, character_length(cdate), cdatetime, character_length( cdatetime) from datatypetestm;
-----------
----------- |