diff -ur mysql-5.0.orig/mysql-test/r/trigger.result mysql-5.0/mysql-test/r/trigger.result
--- mysql-5.0.orig/mysql-test/r/trigger.result	Mon Oct  9 15:22:07 2006
+++ mysql-5.0/mysql-test/r/trigger.result	Tue Oct 10 11:59:22 2006
@@ -969,7 +969,7 @@
 test	t1_bi	test	t1	set @a:=new.id
 test	t1_ai	test	t1	set @b:=new.id
 rename table t1 to t2;
-ERROR HY000: Can't create/write to file './test/t1_ai.TRN~' (Errcode: 13)
+ERROR HY000: Can't create/write to file './test/t1_ai.TRN~' (Errcode: 21)
 insert into t1 values (102);
 select @a, @b;
 @a	@b
diff -ur mysql-5.0.orig/mysql-test/t/trigger.test mysql-5.0/mysql-test/t/trigger.test
--- mysql-5.0.orig/mysql-test/t/trigger.test	Mon Oct  9 15:22:07 2006
+++ mysql-5.0/mysql-test/t/trigger.test	Tue Oct 10 11:58:55 2006
@@ -1138,8 +1138,7 @@
        event_object_table, action_statement from information_schema.triggers
        where event_object_schema = 'test';
 # Trick which makes update of second .TRN file impossible
-system echo dummy >$MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
-system chmod 000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+system mkdir $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
 --error 1
 rename table t1 to t2;
 # 't1' should be still there and triggers should work correctly
@@ -1148,8 +1147,7 @@
 select trigger_schema, trigger_name, event_object_schema,
        event_object_table, action_statement from information_schema.triggers
        where event_object_schema = 'test';
-system chmod 600 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
-system rm $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+system rmdir $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
 # Let us check that updates to .TRN files were rolled back too
 drop trigger t1_bi;
 drop trigger t1_ai;