[MDEV-11193] CONVERT_TZ adds subsecond digits when converting from CHAR/VARCHAR column value Created: 2016-10-31 Updated: 2017-02-20 Resolved: 2017-02-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Temporal Types, Time zones |
| Affects Version/s: | 5.5.48, 10.0.26, 10.1.18 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Hartmut Holzgraefe | Assignee: | Alexander Barkov |
| Resolution: | Not a Bug | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Linux |
||
| Description |
|
When using CONVERT_TZ() to convert a date string stored in a CHAR or VARCHAR column the result is correct, but extra sub second digits are added. This does not happen when the argument is from a DATETIME column or is a string constant. Make sure that you have timezone tables populated, e.g. with
Then execute the following to reproduce:
Result:
Expected result: same for VARCHAR and string constant
|
| Comments |
| Comment by Alexander Barkov [ 2016-12-15 ] | ||||||||||||||||||||||||
|
The version of the same script that does not need timezone tables to be populated:
Note, it works this way by design.
|