MySql trigger having null variables during bulk inserts
Looks like i needed to take care of null, 

Here is what i did, though the columns might have changed

CREATE TRIGGER calculate_balances AFTER INSERT ON transactions FOR EACH ROW
             BEGIN

                SET @credit = (SELECT SUM(amount) FROM transactions WHERE  transactions.credit = New.credit);
                SET @debit  = (SELECT SUM(amount) FROM transactions WHERE  transactions.debit = New.credit);

                IF @debit IS NULL
                THEN
                    SET @debit = 0;
                END IF;

                IF @credit IS NULL
                THEN
                    SET @credit = 0;
                END IF;

                SET @credit_balance = @credit - @debit;   

                SET @credit = (SELECT SUM(amount) FROM transactions WHERE  transactions.credit = New.debit);
                SET @debit  = (SELECT SUM(amount) FROM transactions WHERE  transactions.debit = New.debit);

                IF @credit IS NULL
                THEN
                    SET @credit = 0;
                END IF;

                IF @debit IS NULL
                THEN
                    SET @debit = 0;
                END IF;

                SET @debit_balance = @credit - @debit;

                UPDATE accounts SET account_balance = @debit_balance WHERE account_no =  New.debit;
                UPDATE accounts SET account_balance = @credit_balance WHERE account_no =  New.credit;

             END