You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-11-03 17:13:17 +03:00 
			
		
		
		
	The UPDATE statement wrote NULL when the column set is DATETIME and value is '0000-00-00 00:00:00'. The problem was inside WriteEngine's handling of UPDATE statements and this is where heart of change is. Other changes are related to some obsolete data structures in DML/DDL handling that just hanging around there, doing nothing.
		
			
				
	
	
		
			18 lines
		
	
	
		
			450 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			450 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
DROP DATABASE IF EXISTS MCOL5535;
 | 
						|
CREATE DATABASE MCOL5535;
 | 
						|
USE MCOL5535;
 | 
						|
CREATE TABLE t1(i INTEGER, x DATETIME) ENGINE=COLUMNSTORE;
 | 
						|
INSERT INTO t1 (i, x) VALUES (1, '0000-00-00 00:00:00'), (2, NULL), (3, '2024-01-01 01:01:01');
 | 
						|
SELECT * FROM t1;
 | 
						|
i	x
 | 
						|
1	0000-00-00 00:00:00
 | 
						|
2	NULL
 | 
						|
3	2024-01-01 01:01:01
 | 
						|
UPDATE t1 SET x='0000-00-00 00:00:00' WHERE i = 3;
 | 
						|
SELECT * FROM t1;
 | 
						|
i	x
 | 
						|
1	0000-00-00 00:00:00
 | 
						|
2	NULL
 | 
						|
3	0000-00-00 00:00:00
 | 
						|
DROP DATABASE MCOL5535;
 |