I haven't had to use HeidiSQL to mess with tables for a while and just updated it to the latest version as I had to figure out a new database. I noticed that quite often the length value at least for smallint's is constantly changing between having a value of 6 or 5. I make a new table and it gets a length of 5, I add a new field to an existing table and it has a length of 6
I started noticing because foreign keys complain when the lengths don't match but I was sure I had set both to the same datatype.