Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message of duplicate primary key is not shown properly #35289

Closed
tangenta opened this issue Jun 10, 2022 · 7 comments · Fixed by #39485
Closed

Error message of duplicate primary key is not shown properly #35289

tangenta opened this issue Jun 10, 2022 · 7 comments · Fixed by #39485
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@tangenta
Copy link
Contributor

Enhancement

Actual:

mysql> CREATE TABLE t1 (a BINARY(16) PRIMARY KEY);
Query OK, 0 rows affected (0.02 sec)

mysql> INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));
Query OK, 1 row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));
ERROR 1062 (23000): Duplicate entry '{ W]�u����.�٧t' for key 'PRIMARY'

Expected:

mysql> CREATE TABLE t1 (a BINARY(16) PRIMARY KEY);
Query OK, 0 rows affected (0.05 sec)

mysql> INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));
Query OK, 1 row affected (0.02 sec)

mysql> INSERT INTO t1 VALUES (AES_ENCRYPT('a','a'));
ERROR 1062 (23000): Duplicate entry '{ W]\xA1\x06u\x9D\xBD\xB1\xA3.\xE2\xD9\xA7t' for key 't1.PRIMARY'
@tangenta tangenta added the type/enhancement The issue or PR belongs to an enhancement. label Jun 10, 2022
@tangenta tangenta self-assigned this Jun 10, 2022
@tangenta tangenta changed the title Error message of duplicate primary key string is not shown properly Error message of duplicate primary key is not shown properly Jun 11, 2022
@tangenta tangenta added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Jun 17, 2022
@3mard
Copy link
Contributor

3mard commented Jun 22, 2022

/assign

@tangenta tangenta removed their assignment Jun 23, 2022
@rahulk789
Copy link
Contributor

hello! I would like this issue to be assigned to me. This would be my first ever contribution on github.
Please give me 2 days of time. Thank you.

@rahulk789
Copy link
Contributor

/assign

@rahulk789
Copy link
Contributor

Quick Update
i have come up with a simple solution which you might like or not, I will describe it in detail in the pr. I'll have to read a ton of stuff just to understand the norms of making a pr into a production grade repository. Glad to be a part of this.

@tangenta
Copy link
Contributor Author

@rahulk789 In case you didn't know, the TiDB development Guide may be helpful to new contributors.

@rahulk789
Copy link
Contributor

okay, looks like i have to think harder. Thanks for the response in the PR.

@75asu
Copy link

75asu commented Sep 29, 2022

Hi @tangenta, I have made a contribution at PR #38254.

please have a look.

thanks.

@tangenta tangenta removed help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Nov 30, 2022
@tangenta tangenta assigned winkyao and unassigned 3mard and rahulk789 Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment