 	SET trg_update := CONCAT( trg_update, '\n', stmt );
 	SET trg_delete := CONCAT( trg_delete, '\n', stmt );
 
-	SET stmt := ( SELECT GROUP_CONCAT('   (zaudit_last_inserted_id, ''', COLUMN_NAME, ''', NULL, ',						
-						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN 'CAST(' ELSE '' END,
-							'NEW.`', COLUMN_NAME, '`', 
-						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN ' AS CHAR CHARACTER SET utf8)' ELSE '' END,
-						'),' 
+	SET stmt := ( SELECT GROUP_CONCAT(' (zaudit_last_inserted_id, ''', COLUMN_NAME, ''', NULL, ',	
+						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN 
+							'''[UNSUPPORTED BINARY DATATYPE]''' 
+						ELSE 						
+							CONCAT('NEW.`', COLUMN_NAME, '`')
+						END,
+						'),'
+					SEPARATOR '\n')
+					FROM information_schema.columns
+						WHERE BINARY TABLE_SCHEMA = BINARY audit_schema_name
+							AND BINARY TABLE_NAME = BINARY audit_table_name );
+
+	SET stmt := CONCAT( TRIM( TRAILING ',' FROM stmt ), ';\n\nEND\n$$' );
+	SET trg_insert := CONCAT( trg_insert, stmt );
+
+
+
+	SET stmt := ( SELECT GROUP_CONCAT('   (zaudit_last_inserted_id, ''', COLUMN_NAME, ''', ', 
+						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN
+							'''[SAME]'''
+						ELSE
+							CONCAT('OLD.`', COLUMN_NAME, '`')
+						END,
+						', ',
+						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN
+							CONCAT('CASE WHEN BINARY OLD.`', COLUMN_NAME, '` <=> BINARY NEW.`', COLUMN_NAME, '` THEN ''[SAME]'' ELSE ''[CHANGED]'' END')
+						ELSE
+							CONCAT('NEW.`', COLUMN_NAME, '`')
+						END,
+						'),'
 					SEPARATOR '\n') 
 					FROM information_schema.columns
 						WHERE BINARY TABLE_SCHEMA = BINARY audit_schema_name 
 							AND BINARY TABLE_NAME = BINARY audit_table_name );
 
 	SET stmt := CONCAT( TRIM( TRAILING ',' FROM stmt ), ';\n\nEND\n$$' );
-	SET trg_insert := CONCAT( trg_insert, stmt );
+	SET trg_update := CONCAT( trg_update, stmt );
+
 
 
 	SET stmt := ( SELECT GROUP_CONCAT('   (zaudit_last_inserted_id, ''', COLUMN_NAME, ''', ', 
-						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN 'CAST(' ELSE '' END,
-							'OLD.`', COLUMN_NAME, '`', 
-						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN ' AS CHAR CHARACTER SET utf8)' ELSE '' END,
-						', ',
-						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN 'CAST(' ELSE '' END,
-							'NEW.`', COLUMN_NAME, '`', 
-						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN ' AS CHAR CHARACTER SET utf8)' ELSE '' END,
-						'),'
-					SEPARATOR '\n') 
-					FROM information_schema.columns
-						WHERE BINARY TABLE_SCHEMA = BINARY audit_schema_name 
-							AND BINARY TABLE_NAME = BINARY audit_table_name );
-
-	SET stmt := CONCAT( TRIM( TRAILING ',' FROM stmt ), ';\n\nEND\n$$' );
-	SET trg_update := CONCAT( trg_update, stmt );
-
-
-	SET stmt := ( SELECT GROUP_CONCAT('   (zaudit_last_inserted_id, ''', COLUMN_NAME, ''', ', 
-						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN 'CAST(' ELSE '' END,
-							'OLD.`', COLUMN_NAME, '`', 
-						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN ' AS CHAR CHARACTER SET utf8)' ELSE '' END,
+						CASE WHEN INSTR( '|binary|varbinary|tinyblob|blob|mediumblob|longblob|', LOWER(DATA_TYPE) ) <> 0 THEN 
+							'''[UNSUPPORTED BINARY DATATYPE]''' 
+						ELSE 						
+							CONCAT('OLD.`', COLUMN_NAME, '`')
+						END,
 						', NULL ),'
 					SEPARATOR '\n') 
 					FROM information_schema.columns


	SET out_errors := '';


	-- Check audit and meta table exists
	SET c := (SELECT COUNT(*) FROM information_schema.tables

				AND (BINARY table_name = BINARY 'zaudit' OR BINARY table_name = BINARY 'zaudit_meta') );
	IF c <> 2 THEN
		SET out_errors := CONCAT( out_errors, '\n', 'Audit table structure do not exists, please check or run the audit setup script again.' );
	END IF;


