DELIMITER # CREATE DEFINER = hhit_asset TRIGGER after_update_asset AFTER UPDATE ON `hhit_asset` FOR EACH ROW BEGIN INSERT INTO `hhit_asset`.`hhit_asset_change_record` ( `ts`, `change_type`, `source_type`, `ip`, `ip_long`, `ipv6`, `ipv6_var` ) VALUES ( NEW.`ts`, 1, NEW.`last_source_type`, NEW.`ip`, NEW.`ip_long`, NEW.`ipv6`, NEW.`ipv6_var` ); END;# DELIMITER ;