summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.(none)>2006-04-14 11:38:09 -0400
committerunknown <cmiller@zippy.(none)>2006-04-14 11:38:09 -0400
commitc0b172f0b18cbd9bf03b68fb59ba7ae46ba9ef74 (patch)
treebd56d28dee9e367060b85a7cb78c8e92808e134e /mysql-test/t
parenta7296d9202e6672f3fb63b0d6e993deef79b775d (diff)
parentc97aa492e53fdc93d291f19f641cda386f9abf82 (diff)
downloadmariadb-git-c0b172f0b18cbd9bf03b68fb59ba7ae46ba9ef74.tar.gz
Merge zippy.(none):/home/cmiller/work/mysql/merge/tmp_merge
into zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new (With hand-merged tests.) sql/item_timefunc.cc: Auto merged sql/item_timefunc.h: Auto merged sql/sql_insert.cc: Auto merged
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/innodb.test99
1 files changed, 50 insertions, 49 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 0a8e46d694c..b0835cd8419 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -1142,6 +1142,40 @@ drop table t2, t1;
#
+# Let us test binlog_cache_use and binlog_cache_disk_use status vars.
+# Actually this test has nothing to do with innodb per se, it just requires
+# transactional table.
+#
+show status like "binlog_cache_use";
+show status like "binlog_cache_disk_use";
+
+create table t1 (a int) engine=innodb;
+
+# Now we are going to create transaction which is long enough so its
+# transaction binlog will be flushed to disk...
+let $1=2000;
+disable_query_log;
+begin;
+while ($1)
+{
+ eval insert into t1 values( $1 );
+ dec $1;
+}
+commit;
+enable_query_log;
+show status like "binlog_cache_use";
+show status like "binlog_cache_disk_use";
+
+# Transaction which should not be flushed to disk and so should not
+# increase binlog_cache_disk_use.
+begin;
+delete from t1;
+commit;
+show status like "binlog_cache_use";
+show status like "binlog_cache_disk_use";
+drop table t1;
+
+#
# Bug #6126: Duplicate columns in keys gives misleading error message
#
--error 1060
@@ -1255,6 +1289,15 @@ select * from t1 where x > -16;
select count(*) from t1 where x = 18446744073709551601;
drop table t1;
+
+# Test for testable InnoDB status variables. This test
+# uses previous ones(pages_created, rows_deleted, ...).
+show status like "Innodb_buffer_pool_pages_total";
+show status like "Innodb_page_size";
+show status like "Innodb_rows_deleted";
+show status like "Innodb_rows_inserted";
+show status like "Innodb_rows_updated";
+
# Test for row locks InnoDB status variables.
show status like "Innodb_row_lock_waits";
show status like "Innodb_row_lock_current_waits";
@@ -2086,55 +2129,13 @@ disconnect a;
disconnect b;
#
-# Test that cascading updates leading to duplicate keys give the correct
-# error message (bug #9680)
+# Bug #14360: problem with intervals
#
-CREATE TABLE t1 (
- field1 varchar(8) NOT NULL DEFAULT '',
- field2 varchar(8) NOT NULL DEFAULT '',
- PRIMARY KEY (field1, field2)
-) ENGINE=InnoDB;
-
-CREATE TABLE t2 (
- field1 varchar(8) NOT NULL DEFAULT '' PRIMARY KEY,
- FOREIGN KEY (field1) REFERENCES t1 (field1)
- ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB;
-
-INSERT INTO t1 VALUES ('old', 'somevalu');
-INSERT INTO t1 VALUES ('other', 'anyvalue');
-
-INSERT INTO t2 VALUES ('old');
-INSERT INTO t2 VALUES ('other');
-
---error ER_FOREIGN_DUPLICATE_KEY
-UPDATE t1 SET field1 = 'other' WHERE field2 = 'somevalu';
-
-DROP TABLE t2;
-DROP TABLE t1;
-
-#
-# Bug#18477 - MySQL/InnoDB Ignoring Foreign Keys in ALTER TABLE
-#
-create table t1 (
- c1 bigint not null,
- c2 bigint not null,
- primary key (c1),
- unique key (c2)
-) engine=innodb;
-#
-create table t2 (
- c1 bigint not null,
- primary key (c1)
-) engine=innodb;
-#
-alter table t1 add constraint c2_fk foreign key (c2)
- references t2(c1) on delete cascade;
-show create table t1;
-#
-alter table t1 drop foreign key c2_fk;
-show create table t1;
-#
+create table t1(a date) engine=innodb;
+create table t2(a date, key(a)) engine=innodb;
+insert into t1 values('2005-10-01');
+insert into t2 values('2005-10-01');
+select * from t1, t2
+ where t2.a between t1.a - interval 2 day and t1.a + interval 2 day;
drop table t1, t2;
-