NULL problems caused by new fields in the table

there is a new requirement that needs to add a field X to the table TABlE_A. Suppose X has values of 0 and 1, but for historical data, the value of this field is NULL,. What do you prefer to do at this time?

  1. data revision. Brush over the historical data
  2. add the judgment that the X field is NULL in the code
Mar.06,2021
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-1b3820e-2c101.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-1b3820e-2c101.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?