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

character length of varchar values are calculated incorrectly for some characters #3233

Closed
jennifersp opened this issue Apr 14, 2022 · 0 comments · Fixed by dolthub/go-mysql-server#964
Assignees
Labels
dumps Deals with dumping to and from mysql

Comments

@jennifersp
Copy link
Contributor

character length of San Pedro de Macorís = 20, but len() function returns 21 as len("í") = 2

CREATE TABLE `city` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `Name` char(35) NOT NULL DEFAULT '',
  `CountryCode` char(3) NOT NULL DEFAULT '',
  `District` char(20) NOT NULL DEFAULT '',
  `Population` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
);

INSERT INTO `city` VALUES (1,'San Pedro de Macorís','DOM','San Pedro de Macorís',124735);

error message : string is too large for column

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dumps Deals with dumping to and from mysql
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant