[MCOL-1720] ColumnStoreDateTime(dateTime, format) can not be initialized on Debian 9 Created: 2018-09-13 Updated: 2023-10-26 Resolved: 2018-10-16 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 1.1.6, 1.2.0 |
| Fix Version/s: | 1.1.7, 1.2.0 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Jens Röwekamp (Inactive) | Assignee: | Jens Röwekamp (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian 9 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Sprint: | 2018-17, 2018-18, 2018-19 | ||||||||
| Description |
|
Attached example works on CentOS 7 and Windows 10 but fails with an exception on Debian 9. Exception: Error caught: A valid date/time could not be extracted from the following string with the supplied format: 6 Dec 2001 12:33:45 Linux compiled with: g++ datetime-convert.cpp -o datetime-convert -std=c++11 `pkg-config libmcsapi --cflags --libs` Windows compiled with: cl datetime-convert.cpp "C:\Program Files\MariaDB\ColumnStore Bulk Write SDK\lib\mcsapi.lib" /I "C:\Program Files\MariaDB\ColumnStore Bulk Write SDK\include" target table: test.dt mcsapi's current test cases don't cover this type of ColumnStoreDateTime initialization. |
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2018-09-18 ] |
|
It turns out std::get_time() doesn't always conform to c++11 standards. Will switch to strptime instead. |
| Comment by Andrew Hutchings (Inactive) [ 2018-09-18 ] |
|
For QA: dataconvert-decimal test in API has this additional test added in the patch. So API test suite should pass in Debian 9. |
| Comment by Jens Röwekamp (Inactive) [ 2018-09-21 ] |
|
Tests on CentOS 7 and Debian 9 were fine. On Windows 10 mcsapi doesn't compile any more due to missing strptime() in Windows. I tried to replace it with NetBSD's strptime() implementation as suggested by [1] but got a missing dependency (sys/cdefs.h) error. We might have to use std::get_time() on Windows instead. [1] https://stackoverflow.com/questions/321849/strptime-equivalent-on-windows |
| Comment by Andrew Hutchings (Inactive) [ 2018-09-21 ] |
|
I curse Windows with all the swear words... OK. I'll wrap it in an #ifdef to detect Windows and use std::get_time() for that. |
| Comment by Andrew Hutchings (Inactive) [ 2018-09-24 ] |
|
New commit should fix Windows |