maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #06332
Re: Change case with unique constraint
Hey,
Was it tested with a non ci collate?
Eliezer
----
Eliezer Croitoru
NgTech, Tech Support
Mobile: +972-5-28704261
Email: ngtech1ltd@xxxxxxxxx
Web: https://ngtech.co.il/
My-Tube: https://tube.ngtech.co.il/
-----Original Message-----
From: Maria-discuss <maria-discuss-bounces+ngtech1ltd=gmail.com@xxxxxxxxxxxxxxxxxxx> On Behalf Of Sergei Golubchik
Sent: Monday, 22 August 2022 9:49
To: Keith Edmunds <kae@xxxxxxxxxxxxxxx>
Cc: maria-discuss@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Maria-discuss] Change case with unique constraint
Hi, Keith,
Thanks, it's a bug.
Reported as https://jira.mariadb.org/browse/MDEV-29345
Until it's fixed, you can as a workaround update your column to
something else and then to "Test". Or you can reduce the column length.
On Aug 21, Keith Edmunds wrote:
> I can't change the case of a column with a unique index, example below.
>
> MariaDB [test]> show columns in kae;
> +-------+---------------+------+-----+---------+----------------+
> | Field | Type | Null | Key | Default | Extra |
> +-------+---------------+------+-----+---------+----------------+
> | id | int(11) | NO | PRI | NULL | auto_increment |
> | name | varchar(2048) | NO | UNI | NULL | |
> +-------+---------------+------+-----+---------+----------------+
> 2 rows in set (0.001 sec)
>
> MariaDB [test]> select * from kae;
> +----+------+
> | id | name |
> +----+------+
> | 1 | test |
> +----+------+
> 1 row in set (0.001 sec)
>
> MariaDB [test]> update kae set name="Test" where id=1;
> ERROR 1062 (23000): Duplicate entry 'Test' for key 'unique_name'
> MariaDB [test]>
>
Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-discuss
More help : https://help.launchpad.net/ListHelp
References