diff options
author | unknown <igor@rurik.mysql.com> | 2006-04-17 16:40:16 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-04-17 16:40:16 -0700 |
commit | 7b6c5a6b76dbcf749d9d0efcc1f47aba69c4d61d (patch) | |
tree | 5152e7f18e7fd82e7327f75e9bd88fb6ec68616f /mysql-test/t | |
parent | 366d7afc67cd437bed5cfcd8f77995051fbe94b9 (diff) | |
parent | f3f6514f4fd73478cdbd369f26d45ce9d74ccea3 (diff) | |
download | mariadb-git-7b6c5a6b76dbcf749d9d0efcc1f47aba69c4d61d.tar.gz |
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into rurik.mysql.com:/home/igor/mysql-5.1
mysql-test/r/innodb.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
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/archive.test | 3 | ||||
-rw-r--r-- | mysql-test/t/disabled.def | 8 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 44 | ||||
-rw-r--r-- | mysql-test/t/mysql.test | 6 | ||||
-rw-r--r-- | mysql-test/t/ndb_blob_partition.test | 93 | ||||
-rw-r--r-- | mysql-test/t/partition.test | 5 |
6 files changed, 156 insertions, 3 deletions
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 535402c2e13..7e091991475 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1486,6 +1486,9 @@ select * from t1; alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); +alter table t1 data directory="$MYSQLTEST_VARDIR/tmp"; +select * from t1; + # # Cleanup, test is over # diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index dc326e6df06..c0827e09990 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -9,9 +9,10 @@ # Do not use any TAB characters for whitespace. # ############################################################################## -events_bugs : BUG#17619 2006-02-21 andrey Test case unstable (race conditions) -events_stress : BUG#17619 2006-02-21 andrey Test case unstable -events : BUG#17619 2006-02-21 andrey Test case unstable +events_bugs : BUG#17619 2006-02-21 andrey Race conditions +events_stress : BUG#17619 2006-02-21 andrey Race conditions +events : BUG#17619 2006-02-21 andrey Race conditions +events_scheduling : BUG#18958 2006-04-13 andrey Test case unstable events_logs_tests : BUG#18953 2006-04-12 kent Test is randomly failing ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog @@ -31,6 +32,7 @@ rpl_ndb_relay_space : BUG#16993 2006-02-16 jmiller RBR: ALTER TABLE ZEROFIL rpl_switch_stm_row_mixed : BUG#18590 2006-03-28 brian rpl_row_basic_7ndb : BUG#17400 2006-04-09 brian Cluster Replication: delete & update of rows in table without pk fails on slave. rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly +rpl_row_func003 : BUG#19074 2006-13-04 andrei test failed rpl_row_inexist_tbl : BUG#18948 2006-03-09 mats Disabled since patch makes this test wait forever rpl_sp : BUG#16456 2006-02-16 jmiller rpl_until : BUG#15886 2006-02-16 jmiller Unstable test case diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 83b167def73..ab408e9b4a5 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1142,6 +1142,41 @@ 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. +# +flush status; +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 +1290,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"; diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index dbf65845e6a..95cba2743da 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -61,3 +61,9 @@ drop table t1; # Bug#16859 -- NULLs in columns must not truncate data as if a C-language "string". # --exec $MYSQL -t test -e "create table t1 (col1 binary(4), col2 varchar(10), col3 int); insert into t1 values ('a', 'b', 123421),('a ', '0123456789', 4), ('abcd', '', 4); select concat('>',col1,'<'), col2, col3 from t1; drop table t1;" 2>&1 + +# +# Bug#18265 -- mysql client: No longer right-justifies numeric columns +# +--exec $MYSQL -t --default-character-set utf8 test -e "create table t1 (i int, j int, k char(25) charset utf8); insert into t1 (i) values (1); insert into t1 (k) values ('<----------------------->'); insert into t1 (k) values ('<-----'); insert into t1 (k) values ('Τη γλώσσα'); insert into t1 (k) values ('ᛖᚴ ᚷᛖᛏ'); select * from t1; DROP TABLE t1;" + diff --git a/mysql-test/t/ndb_blob_partition.test b/mysql-test/t/ndb_blob_partition.test new file mode 100644 index 00000000000..a3948cc9491 --- /dev/null +++ b/mysql-test/t/ndb_blob_partition.test @@ -0,0 +1,93 @@ +--source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Minimal NDB blobs test with range partitions. +# + +create table t1 ( + a mediumint not null, + b text not null, + c int not null, + d longblob, + primary key using hash (a,c), + unique key (c) +) + engine=ndb + partition by range (c) + partitions 3 + ( partition p1 values less than (200), + partition p2 values less than (300), + partition p3 values less than (400)); + +--disable_query_log +sleep 1; + +# length 61 +set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; +set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; +set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; + +set @v1 = repeat(@s0, 100); -- 1d42dd9090cf78314a06665d4ea938c35cc760f4 +set @v2 = repeat(@s1, 200); -- 10d3c783026b310218d10b7188da96a2401648c6 +set @v3 = repeat(@s2, 300); -- a33549d9844092289a58ac348dd59f09fc28406a +set @v4 = repeat(@s0, 400); -- daa61c6de36a0526f0d47dc29d6b9de7e6d2630c +set @v5 = repeat(@s1, 500); -- 70fc9a7d08beebc522258bfb02000a30c77a8f1d +set @v6 = repeat(@s2, 600); -- 090565c580809efed3d369481a4bbb168b20713e +set @v7 = repeat(@s0, 700); -- 1e0070bec426871a46291de27b9bd6e4255ab4e5 +set @v8 = repeat(@s1, 800); -- acbaba01bc2e682f015f40e79d9cbe475db3002e +set @v9 = repeat(@s2, 900); -- 9ee30d99162574f79c66ae95cdf132dcf9cbc259 +--enable_query_log + +# -- insert -- +insert into t1 values (1, @v1, 101, @v2); +insert into t1 values (1, @v2, 102, @v3); +insert into t1 values (1, @v3, 103, @v4); +insert into t1 values (2, @v4, 201, @v5); +insert into t1 values (2, @v5, 202, @v6); +insert into t1 values (2, @v6, 203, @v7); +insert into t1 values (3, @v7, 301, @v8); +insert into t1 values (3, @v8, 302, @v9); +insert into t1 values (3, @v9, 303, @v1); +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- pk read -- +select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; +select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; +select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; + +# -- pk update -- +update t1 set b = @v3, d = @v4 where a = 1 and c = 102; +update t1 set b = @v6, d = @v7 where a = 2 and c = 202; +update t1 set b = @v9, d = @v1 where a = 3 and c = 302; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- hash index update -- +update t1 set b = @v4, d = @v5 where c = 103; +update t1 set b = @v7, d = @v8 where c = 203; +update t1 set b = @v1, d = @v2 where c = 303; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- full scan update -- +update t1 set b = @v5, d = @v6; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- range scan update +update t1 set b = @v1, d = @v2 where 100 < c and c < 200; +update t1 set b = @v4, d = @v5 where 200 < c and c < 300; +update t1 set b = @v7, d = @v8 where 300 < c and c < 400; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- delete -- +delete from t1 where a = 1 and c = 101; +delete from t1 where c = 102; +# delete from t1 where c < 300; # XXX coredump +delete from t1; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- clean up -- +drop table t1; diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 536ab68a694..272cdc27af6 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -989,6 +989,11 @@ PARTITION BY LIST (a) SHOW CREATE TABLE t1; DROP TABLE t1; +--error 1064 +CREATE TABLE t1 (a int) +PARTITION BY RANGE(a) +(PARTITION p0 VALUES LESS THAN (NULL)); + # # Bug#18753 Partitions: auto_increment fails # |