[MDEV-20387] COLLATE option not accepted in generated column definition Created: 2019-08-19  Updated: 2019-08-19  Resolved: 2019-08-19

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Data Definition - Create Table
Affects Version/s: 10.3.17
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Konrad Androsch Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Server: MariaDB
Server version: 10.3.17-MariaDB-1:10.3.17+maria~stretch-log mariadb.org binary distribution
Debian 9.9


Issue Links:
Duplicate
duplicates MDEV-12161 Can't specify collation for virtual c... Closed

 Description   

This bug fixed in MySQL 5.7.6 onwards also happens in MariaDB 10.3.17:

https://bugs.mysql.com/bug.php?id=76329

Inital Report from Mario Beck:

[15 Mar 2015 21:07] Mario Beck

Description:
When defining a generated column and the datatype is CHAR or VARCHAR (TEXT probably as well?) it is possible to define a character set but it is not possible to define a collation.

How to repeat:
CREATE TABLE bla (i int);
ALTER TABLE bla ADD COLUMN t CHAR(42) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar");

Same statement without the COLLATE option works fine.


Generated at Thu Feb 08 08:59:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.