1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-02 17:22:27 +03:00
Files
mariadb-columnstore-engine/mysql-test/columnstore/basic/r/MCOL-5035-update-insert-same-behavior.result
Serguey Zefirov 5780bfa15f 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.
2024-03-19 12:44:22 +03:00

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;