Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
7.x-3.0-rc1
Component:
node data
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2011 at 16:13 UTC
Updated:
13 Dec 2011 at 22:43 UTC
This bug occurs when creating a 2nd display for a view. The error that occurs is:
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'data' at row 1: INSERT INTO {ctools_object_cache} (sid, obj, name, data, updated) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array
Make the data field of {ctools_object_cache} bigger (LONGBLOB?)
Comments
Comment #1
merlinofchaos commentedThat's already declared as a 'big' 'text' field, which should be about as big as we can make it.
In MySQL that translates to this:
Comment #2
blasto333 commentedIn my version of ctools the field is a blob. Should it be LONGTEXT? See http://drupal.org/node/865142
Comment #3
Peter Bex commentedNo, it should most definitely be blob, at least for postgresql. It's not storing just textual data but also binary stuff and postgres will rightly refuse to store invalid UTF-8 byte sequences.
It's actually even worse; PDO actually passes the binary data as a string to postgres functions that accept NUL-terminated strings, which will cause implicit truncation if the data happens to include NUL bytes.
Comment #4
dawehnerBut this is not an issue of views, let's mark it as duplicate of #865142: Make ctools_object_cache.data DB column blob for storing arbitrary bytes.