Shrinking VARCHAR with MODIFY: data alignment and potential for data loss
You should properly examine the data metrics
Lengths of ip values greater than 45
SELECT IFNULL(LENGTH(ip),'Total'),COUNT(1) rowcount FROM mytable
GROUP BY LENGTH(ip) HAVING LENGTH(ip) &gt; 45 WITH ROLLUP;

Suggested data type for ip using PROCEDURE ANALYSE()
SELECT ip FROM mytable PROCEDURE ANALYSE();

Whatever SELECT ip FROM mytable PROCEDURE ANALYSE(); reports is what you should use instead of just picking VARCHAR(45).
GIVE IT A TRY !!!