summaryrefslogtreecommitdiff
path: root/mysql-test/t/trigger.test
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.mysql.com>2008-03-25 18:40:49 +0100
committerunknown <msvensson@pilot.mysql.com>2008-03-25 18:40:49 +0100
commit9cf83298334ca9a89052e409fb6df2065a8fc203 (patch)
tree43ff63d88a3e1e3753e96cb0959e89f263c48db3 /mysql-test/t/trigger.test
parentbccc041dc9331d9ecb60d3e2597969441827dfca (diff)
parent07ce948e4a129b89c4be333c1ccfe418e833415e (diff)
downloadmariadb-git-9cf83298334ca9a89052e409fb6df2065a8fc203.tar.gz
Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-mtr client/mysqltest.c: Auto merged configure.in: Auto merged mysql-test/extra/rpl_tests/rpl_loaddata.test: Auto merged mysql-test/extra/rpl_tests/rpl_log.test: Auto merged mysql-test/include/mix1.inc: Auto merged mysql-test/lib/mtr_report.pm: Auto merged mysql-test/r/create.result: Auto merged mysql-test/r/gis.result: Auto merged mysql-test/r/mysqlbinlog.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Auto merged mysql-test/suite/binlog/r/binlog_stm_blackhole.result: Auto merged mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Auto merged mysql-test/suite/rpl/r/rpl_flushlog_loop.result: Auto merged mysql-test/suite/rpl/t/disabled.def: Auto merged mysql-test/suite/rpl/t/rpl_flushlog_loop.test: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/mysqldump.test: Auto merged mysql-test/t/show_check.test: Auto merged mysql-test/t/trigger.test: Auto merged mysql-test/t/view.test: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster_binlog.cc: Auto merged mysql-test/mysql-test-run.pl: Use local mysql-test/r/type_blob.result: Manual merge mysql-test/suite/binlog/r/binlog_multi_engine.result: Manual merge mysql-test/suite/binlog/r/binlog_unsafe.result: Manual merge mysql-test/suite/binlog/t/binlog_unsafe.test: Manual merge mysql-test/suite/rpl/r/rpl_loaddata.result: Manual merge mysql-test/t/mysqlbinlog2.test: Manual merge
Diffstat (limited to 'mysql-test/t/trigger.test')
-rw-r--r--mysql-test/t/trigger.test23
1 files changed, 12 insertions, 11 deletions
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test
index 921c9579bfb..fe3a0f88c51 100644
--- a/mysql-test/t/trigger.test
+++ b/mysql-test/t/trigger.test
@@ -472,11 +472,11 @@ create trigger trg1 before insert on t1 for each row set new.k = new.i;
create trigger trg2 after insert on t1 for each row set @b:= "Fired";
set @b:="";
# Test triggers with file with separators
-load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@a, i);
+load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, i);
select *, @b from t1;
set @b:="";
# Test triggers with fixed size row file
-load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, j);
+load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, j);
select *, @b from t1;
# This also will drop triggers
drop table t1;
@@ -510,7 +510,7 @@ delete from t1 where i = 2;
select * from t1;
# Should fail and insert only 1 row
--error ER_BAD_FIELD_ERROR
-load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k);
+load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k);
select * from t1;
--error ER_BAD_FIELD_ERROR
insert into t1 select 3, 3;
@@ -567,7 +567,7 @@ select * from t1;
delete from t1;
select * from t1;
--error ER_BAD_FIELD_ERROR
-load data infile '../std_data_ln/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k);
+load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k);
select * from t1;
--error ER_BAD_FIELD_ERROR
insert into t1 select 3, 3;
@@ -1142,12 +1142,13 @@ select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers
where event_object_schema = 'test';
# Trick which makes update of second .TRN file impossible
-write_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+let $MYSQLD_DATADIR= `select @@datadir`;
+write_file $MYSQLD_DATADIR/test/t1_ai.TRN~;
dummy
EOF
-chmod 0000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+chmod 0000 $MYSQLD_DATADIR/test/t1_ai.TRN~;
# Normalize the datadir path; the embedded server doesn't chdir to datadir
---replace_result $MYSQLTEST_VARDIR . master-data/ ''
+--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
--error 1
rename table t1 to t2;
# 't1' should be still there and triggers should work correctly
@@ -1156,8 +1157,8 @@ select @a, @b;
select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers
where event_object_schema = 'test';
-chmod 0600 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
-remove_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+chmod 0600 $MYSQLD_DATADIR/test/t1_ai.TRN~;
+remove_file $MYSQLD_DATADIR/test/t1_ai.TRN~;
# Let us check that updates to .TRN files were rolled back too
drop trigger t1_bi;
drop trigger t1_ai;
@@ -1190,7 +1191,7 @@ insert into t1 (a) values
create trigger t2_ai after insert on t2 for each row
set @a:= (select max(a) from t2);
insert into t2 select * from t1;
-load data infile '../std_data_ln/words.dat' into table t1 (a);
+load data infile '../../std_data/words.dat' into table t1 (a);
drop trigger t1_ai;
drop trigger t2_ai;
# Test that the problem for functions is fixed as well
@@ -1200,7 +1201,7 @@ insert into t1 values
("And",f1()),("the",f1()),("mome", f1()),("raths",f1()),("outgrabe",f1());
create function f2() returns int return (select max(b) from t2);
insert into t2 select a, f2() from t1;
-load data infile '../std_data_ln/words.dat' into table t1 (a) set b:= f1();
+load data infile '../../std_data/words.dat' into table t1 (a) set b:= f1();
drop function f1;
drop function f2;
drop table t1, t2;