1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Fix MCOL-5035, a difference in INSERT and UPDATE behavior

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.
This commit is contained in:
Serguey Zefirov
2024-02-21 13:48:19 +03:00
committed by Sergey Zefirov
parent 2c44af30c7
commit 2cd8f716c1
5 changed files with 36 additions and 70 deletions

View File

@ -0,0 +1,19 @@
--disable_warnings
DROP DATABASE IF EXISTS MCOL5535;
--enable_warnings
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;
UPDATE t1 SET x='0000-00-00 00:00:00' WHERE i = 3;
SELECT * FROM t1;
DROP DATABASE MCOL5535;