Changing the collation of a LONGTEXT column (using ALTER TABLE ... CHANGE) truncates the data contained in it to exactly 65535 characters long (the max length of a TEXT type column?).
I've confirmed/reproduced this with MariaDB 5.5.64 and 10.0.38. MySQL 5.6.13 doesn't experience this behaviour.
The problematic query is in the form of:
The following work fine/as expected:
(The specific collation or the type of data contained in the LONGTEXT column doesn't seem to matter; I'm able to reproduce it every time. Also both InnoDB and MyISAM storage engines experience the same behaviour.)
I originally posted this issue on PhpMyAdmin's github page and got directed here: https://github.com/phpmyadmin/phpmyadmin/issues/15670
I hope I've included enough information.