title: Querying MYSQL longtext holding JSON
body: <p>I have a table with the following structure:</p>
  <pre><code>CREATE TABLE `Event` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(255) NOT NULL,
    `created` datetime(6) NOT NULL,
    `last_updated` datetime(6) NOT NULL,
    `info` longtext NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=720 DEFAULT CHARSET=latin1
  </code></pre>
  <p>I need to query it using the <code>info</code> column (which holds JSON string).</p>
  <p>If I query it doing:</p>
  <pre><code>SELECT e.id, e.created, JSON_TYPE(e.info) AS info
    FROM Event e
  </code></pre>
  <p>It returns OBJECT on the INFO column, but if I try to grab an specific column of the JSON, I receive:</p>
  <blockquote>
  <p>SQL Error [3144] [22001]: Data truncation: Cannot create a JSON value from a string with CHARACTER SET 'binary'.</p>
  </blockquote>
  <p>The SQL I am running:</p>
  <pre><code>SELECT INFO - &gt; '$User'
    FROM (SELECT e.id, e.created, JSON_TYPE(e.info) AS info
            FROM Event e) as X
  </code></pre>
  <p><strong>Its not an option to change the type of the column to json</strong></p>