summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb.test
diff options
context:
space:
mode:
authorunknown <tsmith@ramayana.hindu.god>2007-08-14 15:35:19 -0600
committerunknown <tsmith@ramayana.hindu.god>2007-08-14 15:35:19 -0600
commit3925c3feee67aaf1efeb08610b68b5c360b955b7 (patch)
treeaceeea849924bc93c34127d19abe9261b8e78a7a /mysql-test/t/innodb.test
parent5dc6ba8255361053243010ff7ee24bfeb84d255d (diff)
downloadmariadb-git-3925c3feee67aaf1efeb08610b68b5c360b955b7.tar.gz
Updates to allow innodb.test to be run with --embedded-server,
including a small change to build_table_filename(). mysql-test/mysql-test-run.pl: Remove unused bad merge bitrot code. This chunk of code is a repeat copy of an earlier chunk, and should never have been here. mysql-test/r/innodb.result: Updates to allow innodb.test to be run with --embedded-server mysql-test/suite/binlog/r/binlog_innodb.result: Updates to allow innodb.test to be run with --embedded-server mysql-test/suite/binlog/t/binlog_innodb.test: Updates to allow innodb.test to be run with --embedded-server mysql-test/t/innodb.test: Updates to allow innodb.test to be run with --embedded-server sql/sql_table.cc: build_table_filename(): Don't add FN_ROOTDIR to mysql_data_home if it's already there. This is done to make it easier to write tests which check the output of various error messages, and work with both the embedded server (mysql_data_home is full path, including trailing FN_ROOTDIR) and normal server (mysql_data_home is just ".").
Diffstat (limited to 'mysql-test/t/innodb.test')
-rw-r--r--mysql-test/t/innodb.test63
1 files changed, 11 insertions, 52 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 140aac3b9c3..cc1ef6f9730 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -11,13 +11,7 @@
# #
#######################################################################
--- source include/not_embedded.inc
-- source include/have_innodb.inc
--- source include/have_log_bin.inc
-
-# Disabling it temporarily for statement-based logging since some
-# tests are not safe while binlog is on.
--- source include/have_binlog_format_mixed_or_row.inc
#
# Small basic test with ignore
@@ -760,45 +754,6 @@ select * from t2;
drop table t1,t2;
#
-# Bug#27716 multi-update did partially and has not binlogged
-#
-
-CREATE TABLE `t1` (
- `a` int(11) NOT NULL auto_increment,
- `b` int(11) default NULL,
- PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
-
-CREATE TABLE `t2` (
- `a` int(11) NOT NULL auto_increment,
- `b` int(11) default NULL,
- PRIMARY KEY (`a`)
-) ENGINE=INNODB DEFAULT CHARSET=latin1 ;
-
-# A. testing multi_update::send_eof() execution branch
-insert into t1 values (1,1),(2,2);
-insert into t2 values (1,1),(4,4);
-reset master;
---error ER_DUP_ENTRY
-UPDATE t2,t1 SET t2.a=t1.a+2;
-# check
-select * from t2 /* must be (3,1), (4,4) */;
-show master status /* there must no UPDATE in binlog */;
-
-# B. testing multi_update::send_error() execution branch
-delete from t1;
-delete from t2;
-insert into t1 values (1,2),(3,4),(4,4);
-insert into t2 values (1,2),(3,4),(4,4);
-reset master;
---error ER_DUP_ENTRY
-UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
-show master status /* there must be no UPDATE query event */;
-
-# cleanup bug#27716
-drop table t1, t2;
-
-#
# Testing of IFNULL
#
create table t1 (a int, b int) engine=innodb;
@@ -1175,9 +1130,8 @@ drop table t2;
# Test error handling
-# Clean up filename -- embedded server reports whole path without .frm,
-# regular server reports relative path with .frm (argh!)
---replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / t2.frm t2
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLTEST_VARDIR . master-data/ ''
--error ER_WRONG_FK_DEF
create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
@@ -1369,9 +1323,8 @@ source include/varchar.inc;
# Some errors/warnings on create
#
-# Clean up filename -- embedded server reports whole path without .frm,
-# regular server reports relative path with .frm (argh!)
---replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / t1.frm t1
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLTEST_VARDIR . master-data/ ''
create table t1 (v varchar(65530), key(v));
drop table t1;
create table t1 (v varchar(65536));
@@ -1645,6 +1598,7 @@ disconnect b;
set foreign_key_checks=0;
create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
+# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
-- error 1005
create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
@@ -1656,6 +1610,7 @@ drop table t2;
set foreign_key_checks=0;
create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
+# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
-- error 1005
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8;
@@ -1686,6 +1641,7 @@ drop table t2,t1;
set foreign_key_checks=0;
create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;
+# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
-- error 1025
rename table t3 to t1;
@@ -2311,7 +2267,10 @@ CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
---replace_regex /'\.\/test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLTEST_VARDIR . master-data/ ''
--error 1025
ALTER TABLE t2 MODIFY a INT NOT NULL;
DELETE FROM t1;