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

MySQL sql mode : STRICT_TRANS_TABLESの場合、コンテンツの文字数が65535だとエラーになる問題 #1748

Closed
katokaisya opened this issue Sep 6, 2021 · 0 comments

Comments

@katokaisya
Copy link
Collaborator

概要

案件にて発生
sql mode : STRICT_TRANS_TABLES
[PDOException] SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'detail' at row 1
saveSearchIndex()にて、容量がオーバーしていると思われる。
search_indicesテーブルのdetailはtext型のため65535までしか保存できないため、sql mode : STRICT_TRANS_TABLESでは、厳密に判定され、保存されなくなる
(BurgerEditorを使用しているためAfterSaveの処理の関係でBurgerEditorの中身も保存されない)。

再現方法

MySQL : sql mode : STRICT_TRANS_TABLES にして、コンテンツの文字数を65535以上にして保存
BurgerEditor等、afterSaveでコンテンツを整形する場合、コンテンツも保存されない

@gondoh gondoh closed this as completed in 33688cd Sep 30, 2021
gondoh added a commit that referenced this issue Sep 30, 2021
fix #1748 MySQL sql mode : STRICT_TRANS_TABLESの場合、コンテンツの文字数が65535だとエラ…
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

1 participant