Data with a length greater than the specified varchar (n) appears in the mysql table

Today, the operator reported that there is a data in the backend that cannot be modified. I checked the error for a long time, and finally found that the value of the url field of this data is greater than the varchar (100) I defined. It is very simple to solve the problem. Just change it. But I would like to ask you how did this data come from?

Aug.18,2021

you can take a look at this article Portal


length () and char_length () there is still a difference. I don't know how you calculate the length of url field values. Varchar refers to fields that can be inserted into char_length=100, while length may be more than that, if it contains Chinese characters.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b42074-2c5e4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b42074-2c5e4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?