MySQL trigger set values for NEW row and update another in the same table
If you have a UNIQUE KEY defined on (procKey,EndDate), then perhaps you can remove the second line of the trigger. Also remove the hardcoded date from the trigger.
CREATE
DEFINER=`root`@`%`
TRIGGER `im`.`splitBeforeIns`
BEFORE INSERT ON `im`.`split`
FOR EACH ROW
BEGIN
SET NEW.tcPercent = (NEW.tcOfficeFee / NEW.globalFee) * 100 , NEW.proPercent = 100 - NEW.tcPercent;
END$$
and do an INSERT ON DUPLICATE KEY UPDATE like this:
INSERT INTO im.split ...
ON DUPLICATE KEY UPDATE
endDate = ADDDATE(startDate, -1);
You may also want to define endDate in im.split as follows
enddate DATE DEFAULT '2050-12-31'
The answer to this might be unwelcome, but it is: You can't do that.
A Trigger can't update another row of the same table as the row, the trigger was called from.
The typical way to do that, is to create a stored procedure, that inserts into/Updates the target table, then updates the other row(s), all in a transaction.