title: Substring function not working when truncated using mysql
body: <p>Want to remove the last character in mysql as follows:</p>
  
  <pre><code>select substring(item, 1, length(item) - 1)
  from table
  </code></pre>
  
  <p>But mysql returns the complete string containing the last char, the type of 'item' is mediumtext. The <code>left</code> function seems to have the same problem. </p>