Am 07.05.2015 um 15:02 schrieb David Boyes:
>> These are handled differently by OTRS - for
>> databases other than MySQL, OTRS stores them in BASE64 encoding. The
>> conversion can be done with Postgres using encode(column, 'base64').
>
I'd rather see MySQL use base64 too. All the world isn't Intel-based,
and at least base64 is not ambiguous what the byte values really are.

LONGBLOBs are just streams of bytes. Intel or not (endianness) should not matter when you fetch and store the data using database methods. BLOBs are good for storing binary objects such as attachments or emails that you want to keep in their original encoding. Everything else should be stored as (unicode) text. Storing binary data BASE64 encoded is not optimal when the database supports BLOBs.

It would make it much more difficult to move data cross-platform.
Try setting up a OTRS install on a Linux on POWER big-endian machine
and moving the database from your Intel system. Those binary blobs
are a royal pain. The base64 columns move perfectly and without any
action on the admin's part.

I had no difficulties moving the data from the MySQL LONGBLOBs columns to PostgreSQL BYTEA columns. They were exported as byte streams and imported as byte streams. The difficulties only appeared because OTRS treats Postgres and the other databases differently from MySQL, as if they would not support binary data, for no apparent reason.

Are you storing attachments in the database? If so, you might
consider changing that.

Thanks for mentioning that, I'll consider it. Found the script ArticleStorageSwitch.pl which should make this possible. However, it may also have disadvantages. You need to backup database and filesystem separately, and consistency between the two is not automatically guaranteed through foreign keys. Also, there are some other BASE64 encoded columns besides those for storing the attachments.

-- Christoph
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Reply via email to