[MCOL-298] Inconsistent value saturation behavior for DATE and DATETIME between INSERT and UPDATE, cpimport Created: 2016-09-14 Updated: 2016-09-16 Resolved: 2016-09-16 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | cpimport |
| Affects Version/s: | 1.0.3 |
| Fix Version/s: | 1.0.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Lee (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 1.0.3 |
| Description |
|
Build tested: mscadmin> getsoft Name : mariadb-columnstore-platform There are couple tickets in this release make changes related to DATE and DATETIME
Columnstore 1.0.2 value saturation behavior Columnstore 1.0.3 value saturation behavior Note: The mininum supported year value for DATE and DATETIME has been changed from 1400 to 1000, matching standard MySQL INSERT saturates to 0000-00-00 Standard MySQL DML statements saturates to NULL so I suggest we fix both UPDATE and cpimport to do the same. Changes also needed in the Syntax Guide. Page 8 Need to update the supported value range for DATE and DATETIME datatypes. Page 10 For the date and datetime datatypes, a value outside of the supported range (1400-01-01 to 9999-12-31) will be stored as NULL in InfiniDB needs to be updated to For the date and datetime datatypes, a value outside of the supported range (1000-01-01 to 9999-12-31) will be stored as 0000-00-00 in ColumnStore |
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2016-09-14 ] | |||||||||||||||||||||||||||||||||||||
|
Pull request for this available at: https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/10 Note: this should probably go into 1.0.3 since this is sort-of a regression. | |||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2016-09-15 ] | |||||||||||||||||||||||||||||||||||||
|
Build tested: mscadmin> getsoft Name : mariadb-columnstore-platform When updated DATETIME, out of range values are not being saturated and column values are not updated. MariaDB [mytest]> select * from t1;
-----------
----------- [1:09] [1:09] MariaDB [mytest]> select * from t1;
-----------
----------- | |||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2016-09-15 ] | |||||||||||||||||||||||||||||||||||||
|
Build tested: mscadmin> getsoft Name : mariadb-columnstore-platform We still have an issue with cpimport. When source file contains empty values (""), DATE and DATETIME saturated to NULL. Source file has 3 rows. [root@mcsce7 datatypes]# cat /tmp/t1.txt MariaDB [mytest]> truncate t1; MariaDB [mytest]> load data infile '/tmp/t1.txt' into table t1 fields terminated by "|"; MariaDB [mytest]> show warnings;
--------
-------- MariaDB [mytest]> select * from t1;
-----------
----------- MariaDB [mytest]> quit Using table OID 62932 as the default JOB ID [root@mcsce7 datatypes]# mcsmysql mytest Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [mytest]> select * from t1;
-----------
----------- MariaDB [mytest]> LDI ran ok, but cpimport did not. The last row should be | 0000-00-00 | 0000-00-00 00:00:00 |. | |||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2016-09-15 ] | |||||||||||||||||||||||||||||||||||||
|
BTW, the update issue was fixed. | |||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-09-16 ] | |||||||||||||||||||||||||||||||||||||
|
cpimport treats all empty values as NULL, even integers. For non-char/varchar that is probably correct behaviour. | |||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-09-16 ] | |||||||||||||||||||||||||||||||||||||
|
No changes, as discussed cpimport empty string handling will be in | |||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2016-09-16 ] | |||||||||||||||||||||||||||||||||||||
|
The remaining inconsistency will be covered by |