[MDEV-9147] Character set is ignored in Dynamic Column for saved string Created: 2015-11-17  Updated: 2015-12-15  Resolved: 2015-12-15

Status: Closed
Project: MariaDB Server
Component/s: Dynamic Columns
Affects Version/s: 5.5.46, 10.0.22, 10.1.8
Fix Version/s: 10.0.23, 10.1.10

Type: Bug Priority: Major
Reporter: Illya Byelkin Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None

Sprint: 10.0.23

 Description   

select hex(COLUMN_CREATE(1, "afaf" AS char character set utf8));
hex(COLUMN_CREATE(1, "afaf" AS char character set utf8))
0001000100030861666166

08 above is character set number which is latin1, and 2D is UTF-8



 Comments   
Comment by Oleksandr Byelkin [ 2015-11-17 ]

select hex(COLUMN_CREATE(1, "ЫЫЫЫ" AS char character set utf8));
hex(COLUMN_CREATE(1, "ЫЫЫЫ" AS char character set utf8))
00010001000308D0ABD0ABD0ABD0AB

i.e. the same

Comment by Elena Stepanova [ 2015-11-17 ]

sanja, please make sure that the KB has the option character set clause in syntax for dynamic column functions whereever it is applicable https://mariadb.com/kb/en/mariadb/dynamic-columns/ . If it's applicable everywhere along with char types, you can mention it in the datatypes section.

Comment by Oleksandr Byelkin [ 2015-12-14 ]

revision-id: c2f2d50e376dfeadcf4c37afe51dc4bb0c32bbc4 (mariadb-10.0.22-41-gc2f2d50)
parent(s): 537c750e328cd080365e465acd4f0383bf0febf3
committer: Oleksandr Byelkin
timestamp: 2015-12-14 15:02:39 +0100
message:

MDEV-9147: Character set is ignored in Dynamic Column for saved string

Fixed moving charset from definition to the value.

Comment by Alexander Barkov [ 2015-12-15 ]

Ok to push with an additional test:

SET NAMES utf8;
SELECT COLUMN_GET(COLUMN_CREATE(1, 0xC2A2 AS CHAR CHARACTER SET latin1), 1 AS CHAR CHARACTER SET utf8) AS a;
SELECT COLUMN_GET(COLUMN_CREATE(1, 0xC2A2 AS CHAR CHARACTER SET utf8), 1 AS CHAR CHARACTER SET utf8) AS a; 

Generated at Thu Feb 08 07:32:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.