delimiter $$
CREATE TRIGGER null_trigger
BEFORE UPDATE ON DataOnDisk
FOR EACH ROW
BEGIN
	IF NEW.header IS NULL THEN
		SET NEW.calibration = NEW.header;
	END IF;
	IF NEW.calibration IS NULL THEN
		SET NEW.auxiliary = NEW.calibration;
		SET NEW.callisto = NEW.calibration;
	END IF;
	IF NEW.callisto IS NULL THEN
		SET NEW.star = NEW.callisto;
	END IF;
END; $$
delimiter ;
