1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-09-11 08:50:45 +03:00
Files
Leonid Fedorov 7a2ca9d6bc MCOL-4480: TEXT type added (#3142)
* TEXT type added
* tests
2024-03-21 00:26:35 +04:00

20 lines
855 B
Plaintext

DROP DATABASE IF EXISTS `mcol_4758`;
CREATE DATABASE `mcol_4758`;
USE `mcol_4758`;
CREATE TABLE src (c0 INT, cLB LONGBLOB, cLT LONGTEXT)engine=columnstore default charset utf8mb4;
SELECT column_name, data_type, column_length FROM information_schema.columnstore_columns WHERE hex(table_schema)=hex('mcol_4758') and hex(table_name)=hex('src');
column_name data_type column_length
c0 int 4
clb blob 16777215
clt text 16777215
INSERT INTO src VALUES (1, "Pretty Bloby Thing", "This is some text");
select * from src where c0=1 and substr(cLT, 1, 4)="This";
c0 cLB cLT
1 Pretty Bloby Thing This is some text
ALTER TABLE src ADD COLUMN (cLT2 LONGTEXT);
UPDATE src SET cLT2="My Friday Night" where c0=1;
select * from src where c0=1 and substr(cLT, 1, 4)="This";
c0 cLB cLT cLT2
1 Pretty Bloby Thing This is some text My Friday Night
DROP DATABASE `mcol_4758`;