title: Mysql 5.7.13 innodb unique column varchar(500)
body: <p>I need to maintain a unique index on a <code>varchar(500)</code> column of a table of my Mysql 5.7.13 database.</p>
  
  <p>The charset is set to UTF8 so, as far as I know, the limit in characters is 255 since I am using innodb engine. 
  I know also that exists the option <code>innodb_large_prefix</code> that should extend the dimension up to 3072 bytes. I tried to configure my db to support this feature, but it does not work. I tried to insert two identical 500 characters long rows with the last character different, but I get a unique constraint error since, as I assume, the uniqueness check is performed on the first 255 characters.</p>
  
  <p>Am I missing something? Have I misunderstood the purpose of this option?</p>
  
  <p>P.S I enabled the <code>innodb_file_format = Barracuda</code> as pointed in mysql documentation.</p>
  
  <p>Thanks for the help.
  Simone</p>