Skip to content

Series import: fails to insert a URL with Russian symbols #772

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

Closed
php-coder opened this issue Dec 28, 2017 · 2 comments
Closed

Series import: fails to insert a URL with Russian symbols #772

php-coder opened this issue Dec 28, 2017 · 2 comments
Assignees
Milestone

Comments

@php-coder
Copy link
Owner

php-coder commented Dec 28, 2017

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO series_import_requests ( url , status_id , updated_at , requested_at , requested_by ) SELECT ? , st.id , ? , ? , ? FROM series_import_request_statuses st WHERE st.name = ?]; SQL state [HY000]; error code [1366]; Incorrect string value: '\xD0\x9A\xD0\xB8\xD1\x82...' for column 'url' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\xD0\x9A\xD0\xB8\xD1\x82...' for column 'url' at row 1

@php-coder php-coder added this to the 0.4 milestone Dec 28, 2017
@php-coder php-coder self-assigned this Dec 28, 2017
@php-coder
Copy link
Owner Author

Looks like a regression after ffc0acd commit where the character set of the table to ascii.

@php-coder
Copy link
Owner Author

php-coder commented Dec 30, 2017

Now it fails with another exception:

Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [INSERT INTO series_import_requests ( url , status_id , updated_at , requested_at , requested_by ) SELECT ? , st.id , ? , ? , ? FROM series_import_request_statuses st WHERE st.name = ?]; Data truncation: Data too long for column 'url' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'url' at row 1

It has happened because after encoding, url became longer (478 chars).

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

No branches or pull requests

1 participant