You can explicitly pass each field:
CALL logChanges(OLD.colA, OLD.colB, NEW.colA, NEW.colB);
Or, if logChanges needs to be generic enough to handle such calls from different tables, you can combine the field values ββinto one row using a suitable separator (for example, a block separator ):
CALL logChanges(CONCAT_WS(CHAR(31), OLD.colA, old.colB), CONCAT_WS(CHAR(31), NEW.colA, NEW.colB));
Or, if data types must be stored, you can insert records into the temporary one from which logChanges reads.
eggyal
source share