Below is the list of changes that have just been committed into a local
5.0 repository of tomash. When tomash does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2210 06/06/29 13:45:43 kroki@stripped +1 -0
Replace all numeric error code with symbolic names in trigger.test.
mysql-test/t/trigger.test
1.49 06/06/29 13:45:37 kroki@stripped +42 -42
Replace all numeric error code with symbolic names.
Left are --error 1 for system error, and --error 1100. The
symbolic constant for the latter is ER_TABLE_NOT_LOCKED, but using
it triggers a bug in test driver due to name prefix collision with
1099 ER_TABLE_NOT_LOCKED_FOR_WRITE. This bug is fixed in 5.1.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: kroki
# Host: moonlight.intranet
# Root: /home/tomash/src/mysql_ab/mysql-5.0-bug10946
--- 1.48/mysql-test/t/trigger.test 2006-06-28 23:54:10 +04:00
+++ 1.49/mysql-test/t/trigger.test 2006-06-29 13:45:37 +04:00
@@ -237,7 +237,7 @@
end|
delimiter ;|
insert into t3 values (1);
---error 1048
+--error ER_BAD_NULL_ERROR
insert into t1 values (4, "four", 1), (5, "five", 2);
select * from t1;
select * from t2;
@@ -295,19 +295,19 @@
create table t1 (i int);
create table t3 (i int);
---error 1363
+--error ER_TRG_NO_SUCH_ROW_IN_TRG
create trigger trg before insert on t1 for each row set @a:= old.i;
---error 1363
+--error ER_TRG_NO_SUCH_ROW_IN_TRG
create trigger trg before delete on t1 for each row set @a:= new.i;
---error 1362
+--error ER_TRG_CANT_CHANGE_ROW
create trigger trg before update on t1 for each row set old.i:=1;
---error 1363
+--error ER_TRG_NO_SUCH_ROW_IN_TRG
create trigger trg before delete on t1 for each row set new.i:=1;
---error 1362
+--error ER_TRG_CANT_CHANGE_ROW
create trigger trg after update on t1 for each row set new.i:=1;
---error 1054
+--error ER_BAD_FIELD_ERROR
create trigger trg before update on t1 for each row set new.j:=1;
---error 1054
+--error ER_BAD_FIELD_ERROR
create trigger trg before update on t1 for each row set @a:=old.j;
@@ -315,25 +315,25 @@
# Let us test various trigger creation errors
# Also quickly test table namespace (bug#5892/6182)
#
---error 1146
+--error ER_NO_SUCH_TABLE
create trigger trg before insert on t2 for each row set @a:=1;
create trigger trg before insert on t1 for each row set @a:=1;
---error 1359
+--error ER_TRG_ALREADY_EXISTS
create trigger trg after insert on t1 for each row set @a:=1;
---error 1235
+--error ER_NOT_SUPPORTED_YET
create trigger trg2 before insert on t1 for each row set @a:=1;
---error 1359
+--error ER_TRG_ALREADY_EXISTS
create trigger trg before insert on t3 for each row set @a:=1;
create trigger trg2 before insert on t3 for each row set @a:=1;
drop trigger trg2;
drop trigger trg;
---error 1360
+--error ER_TRG_DOES_NOT_EXIST
drop trigger trg;
create view v1 as select * from t1;
---error 1347
+--error ER_WRONG_OBJECT
create trigger trg before insert on v1 for each row set @a:=1;
drop view v1;
@@ -341,7 +341,7 @@
drop table t3;
create temporary table t1 (i int);
---error 1361
+--error ER_TRG_ON_VIEW_OR_TEMP_TABLE
create trigger trg before insert on t1 for each row set @a:=1;
drop table t1;
@@ -495,47 +495,47 @@
# their main effect. This is because operation on the table row is
# executed before "after" trigger and its effect cannot be rolled back
# when whole statement fails, because t1 is MyISAM table.
---error 1054
+--error ER_BAD_FIELD_ERROR
insert into t1 values (2, 1);
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
update t1 set k = 2 where i = 2;
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
delete from t1 where i = 2;
select * from t1;
# Should fail and insert only 1 row
---error 1054
+--error ER_BAD_FIELD_ERROR
load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k);
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
insert into t1 select 3, 3;
select * from t1;
# Multi-update working on the fly, again it will update only
# one row even if more matches
---error 1054
+--error ER_BAD_FIELD_ERROR
update t1, t2 set k = k + 10 where t1.i = t2.i;
select * from t1;
# The same for multi-update via temp table
---error 1054
+--error ER_BAD_FIELD_ERROR
update t1, t2 set k = k + 10 where t1.i = t2.i and k < 3;
select * from t1;
# Multi-delete on the fly
---error 1054
+--error ER_BAD_FIELD_ERROR
delete t1, t2 from t1 straight_join t2 where t1.i = t2.i;
select * from t1;
# And via temporary storage
---error 1054
+--error ER_BAD_FIELD_ERROR
delete t2, t1 from t2 straight_join t1 where t1.i = t2.i;
select * from t1;
# Prepare table for testing of REPLACE and INSERT ... ON DUPLICATE KEY UPDATE
alter table t1 add primary key (i);
---error 1054
+--error ER_BAD_FIELD_ERROR
insert into t1 values (3, 4) on duplicate key update k= k + 10;
select * from t1;
# The following statement will delete old row and won't
# insert new one since after delete trigger will fail.
---error 1054
+--error ER_BAD_FIELD_ERROR
replace into t1 values (3, 3);
select * from t1;
# Also drops all triggers
@@ -553,33 +553,33 @@
# The following statements changing t1 should fail and should not
# cause any effect on table, since "before" trigger is executed
# before operation on the table row.
---error 1054
+--error ER_BAD_FIELD_ERROR
insert into t1 values (3, 3);
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
update t1 set i = 2;
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
delete from t1;
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k);
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
insert into t1 select 3, 3;
select * from t1;
# Both types of multi-update (on the fly and via temp table)
---error 1054
+--error ER_BAD_FIELD_ERROR
update t1, t2 set k = k + 10 where t1.i = t2.i;
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
update t1, t2 set k = k + 10 where t1.i = t2.i and k < 2;
select * from t1;
# Both types of multi-delete
---error 1054
+--error ER_BAD_FIELD_ERROR
delete t1, t2 from t1 straight_join t2 where t1.i = t2.i;
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
delete t2, t1 from t2 straight_join t1 where t1.i = t2.i;
select * from t1;
# Let us test REPLACE/INSERT ... ON DUPLICATE KEY UPDATE.
@@ -587,10 +587,10 @@
# in ordinary INSERT we need to drop "before insert" trigger.
alter table t1 add primary key (i);
drop trigger bi;
---error 1054
+--error ER_BAD_FIELD_ERROR
insert into t1 values (2, 4) on duplicate key update k= k + 10;
select * from t1;
---error 1054
+--error ER_BAD_FIELD_ERROR
replace into t1 values (2, 4);
select * from t1;
# Also drops all triggers
@@ -608,7 +608,7 @@
create function bug5893 () returns int return 5;
create trigger t1_bu before update on t1 for each row set new.col1= bug5893();
drop function bug5893;
---error 1305
+--error ER_SP_DOES_NOT_EXIST
update t1 set col2 = 4;
# This should not crash server too.
drop trigger t1_bu;
@@ -908,9 +908,9 @@
# Until we implement proper mechanism for invalidation of PS/SP when table
# or SP's are changed these two statements will fail with 'Table ... was
# not locked' error (this mechanism should be based on the new TDC).
---error 1100
+--error 1100 #ER_TABLE_NOT_LOCKED
execute stmt1;
---error 1100
+--error 1100 #ER_TABLE_NOT_LOCKED
call p1();
deallocate prepare stmt1;
drop procedure p1;
@@ -1186,7 +1186,7 @@
SELECT @x;
SET @x=2;
---error 1365
+--error ER_DIVISION_BY_ZERO
UPDATE t1 SET i1 = @x;
SELECT @x;
@@ -1197,7 +1197,7 @@
SELECT @x;
SET @x=4;
---error 1365
+--error ER_DIVISION_BY_ZERO
UPDATE t1 SET i1 = @x;
SELECT @x;
| Thread |
|---|
| • bk commit into 5.0 tree (kroki:1.2210) | kroki | 29 Jun |