[MCOL-442] Default date value doesn't allow zero date Created: 2016-12-06  Updated: 2016-12-06  Resolved: 2016-12-06

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.0.4
Fix Version/s: 1.0.6

Type: Bug Priority: Major
Reporter: Andrew Hutchings (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: community

Sprint: 2016-23, 2016-24

 Description   

This create table statement errors:

CREATE TABLE `DIFSN__odc__performance_nl` (
  `date_clic_nl` date NOT NULL DEFAULT '0000-00-00'
) DEFAULT CHARSET=utf8

It is due to a special clause I missed when increasing the date ranges.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2016-12-06 ]

After patch:

MariaDB [test]> create table t5 (a int, d date not null default '0000-00-00') engine=columnstore;
Query OK, 0 rows affected (0.35 sec)
 
MariaDB [test]> insert into t5 set a=1;
Query OK, 1 row affected (0.61 sec)
 
MariaDB [test]> select * from t5;
+------+------------+
| a    | d          |
+------+------------+
|    1 | 0000-00-00 |
+------+------------+
1 row in set (0.53 sec)

Comment by Daniel Lee (Inactive) [ 2016-12-06 ]

Build verified: Source from Github
[root@localhost columnstore]# cd mariadb-columnstore-server/
[root@localhost mariadb-columnstore-server]# git show
commit 8592d353c5477940f9600566639302de9fa994c7
Merge: 3795bd4 7af4e57
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Tue Dec 6 09:49:03 2016 -0600
Merge pull request #20 from mariadb-corporation/MCOL-441
MCOL-441 Fix segfault on SP error
[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit d4a601b4fbc81a5929ed5b36890e70514b96803a
Merge: cb8ffed fe381ab
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Tue Dec 6 12:26:09 2016 -0600
Merge pull request #68 from mariadb-corporation/MCOL-442
MCOL-442 Allow default zero date/datetime

Verified by repeating mentioned test case.

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