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

subject column in mysql need be tinyblob #187

Open
lord-alfred opened this issue Sep 15, 2019 · 4 comments
Open

subject column in mysql need be tinyblob #187

lord-alfred opened this issue Sep 15, 2019 · 4 comments

Comments

@lord-alfred
Copy link
Contributor

lord-alfred commented Sep 15, 2019

Need to change this column type in wiki for new users.
With varchar type was getting errors like:

time="2019-08-30T03:39:13+03:00" level=error msg="There was a problem the insert" error="Error 1366: Incorrect string value: '\\xCC\\xE5\\xF4\\xE1\\xF7\\xE5...' for column 'subject' at row 1"
time="2019-08-30T03:39:13+03:00" level=error msg="doQuery error" error="Error 1366: Incorrect string value: '\\xCC\\xE5\\xF4\\xE1\\xF7\\xE5...' for column 'subject' at row 1"
time="2019-08-30T03:39:13+03:00" level=error msg="storage error"

After change subject column type to tinyblob:

`subject` tinyblob NOT NULL,

the error is gone :)

tinyblob has 255 symbols length, as is previous varchar(255): https://dev.mysql.com/doc/refman/8.0/en/string-type-overview.html

@flashmob
Copy link
Owner

flashmob commented Sep 15, 2019 via email

@lord-alfred
Copy link
Contributor Author

Yes, there were errors even after changing the encoding to utf8mb4

@flashmob
Copy link
Owner

flashmob commented Sep 15, 2019 via email

@lord-alfred
Copy link
Contributor Author

lord-alfred commented Sep 15, 2019

Connection string already as is in article and database of course use CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants