diff options
author | unknown <monty@narttu.mysql.fi> | 2003-06-04 19:21:51 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-06-04 19:21:51 +0300 |
commit | 13f7e49494559bba3195ccf3abdb349fbe79b6dc (patch) | |
tree | 6b8e47374bf313429416a26678bc409946f34772 /mysql-test/t | |
parent | b388eb004df7112b2ae0986457fc9d01131b71ea (diff) | |
parent | b5860aed7b1d11f2d3ac909cde1438c86af26cb5 (diff) | |
download | mariadb-git-13f7e49494559bba3195ccf3abdb349fbe79b6dc.tar.gz |
Merge with 4.0.13
BitKeeper/etc/logging_ok:
auto-union
BUILD/SETUP.sh:
Auto merged
BitKeeper/deleted/.del-internals.texi~62b6f580a41c2a43:
Auto merged
client/mysqltest.c:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
include/mysql_com.h:
Auto merged
innobase/include/srv0srv.h:
Auto merged
innobase/log/log0log.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/srv/srv0start.c:
Auto merged
innobase/ut/ut0mem.c:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/errors.result:
Auto merged
mysql-test/r/loaddata.result:
Auto merged
mysql-test/r/rpl_insert_id.result:
Auto merged
mysql-test/r/rpl_loaddata.result:
Auto merged
mysql-test/std_data/rpl_loaddata2.dat:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/loaddata.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/raid.test:
Auto merged
mysql-test/t/rpl_insert_id.test:
Auto merged
mysql-test/t/rpl_loaddata.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/time.cc:
Auto merged
configure.in:
No changes
libmysqld/lib_sql.cc:
No changes
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/alter_table.test | 9 | ||||
-rw-r--r-- | mysql-test/t/errors.test (renamed from mysql-test/t/err000001.test) | 0 | ||||
-rw-r--r-- | mysql-test/t/insert_select.test | 17 | ||||
-rw-r--r-- | mysql-test/t/loaddata.test | 8 | ||||
-rw-r--r-- | mysql-test/t/lowercase_table.test | 11 | ||||
-rw-r--r-- | mysql-test/t/query_cache.test | 35 | ||||
-rw-r--r-- | mysql-test/t/raid.test | 2 | ||||
-rw-r--r-- | mysql-test/t/rpl_insert_id.test | 23 | ||||
-rw-r--r-- | mysql-test/t/rpl_log.test | 24 | ||||
-rw-r--r-- | mysql-test/t/timezone-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/timezone.test | 28 |
11 files changed, 148 insertions, 10 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index fc22bc85aee..04229bd1882 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -135,3 +135,12 @@ analyze table t1; show keys from t1; drop table t1; +# +# Test of ALTER TABLE DELAYED +# + +CREATE TABLE t1 (i int(10), index(i) ); +ALTER TABLE t1 DISABLE KEYS; +INSERT DELAYED INTO t1 VALUES(1),(2),(3); +ALTER TABLE t1 ENABLE KEYS; +drop table t1; diff --git a/mysql-test/t/err000001.test b/mysql-test/t/errors.test index b558c90b0c6..b558c90b0c6 100644 --- a/mysql-test/t/err000001.test +++ b/mysql-test/t/errors.test diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index 8fcb22e4684..5bd7b95f560 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -71,3 +71,20 @@ WHERE numeropost=9 ORDER BY numreponse ASC; DROP TABLE IF EXISTS t1,t2; +# Addendum by Guilhem: +# Check if a partly-completed INSERT SELECT in a MyISAM table goes +# into the binlog + +create table t1(a int, unique(a)); +insert into t1 values(2); +create table t2(a int); +insert into t2 values(1),(2); +reset master; +--error 1062 +insert into t1 select * from t2; +# The above should produce an error, but still be in the binlog; +# verify the binlog : +let $VERSION=`select version()`; +--replace_result $VERSION VERSION +show binlog events; +drop table t1, t2; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index d7e84590dc0..2f484d30ff7 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -10,4 +10,12 @@ create table t1 (a date, b date, c date not null, d date); load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; SELECT * from t1; +truncate table t1; + +load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +SELECT * from t1; drop table t1; + + + + diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test index 348116b02f2..cb30c14b70c 100644 --- a/mysql-test/t/lowercase_table.test +++ b/mysql-test/t/lowercase_table.test @@ -14,3 +14,14 @@ ALTER TABLE T2 ADD new_col int not null; ALTER TABLE T2 RENAME T3; show tables like 't_'; drop table t3; +# +# Test alias +# +create table t1 (a int); +select count(*) from T1; +select count(*) from t1; +--error 1109 +select count(T1.a) from t1; +--error 1109 +select count(bags.a) from t1 as Bags; +drop table t1; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 1078d19533c..929146ba97a 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -371,18 +371,35 @@ show global variables like "query_cache_min_res_unit"; # # Test of query cache resizing # +create table t1 (a int); set GLOBAL query_cache_size=1000; show global variables like "query_cache_size"; -set GLOBAL query_cache_size=1100; -set GLOBAL query_cache_size=1200; -set GLOBAL query_cache_size=1300; -set GLOBAL query_cache_size=1400; -set GLOBAL query_cache_size=1500; -set GLOBAL query_cache_size=1600; -set GLOBAL query_cache_size=1700; -set GLOBAL query_cache_size=1800; -set GLOBAL query_cache_size=1900; +select * from t1; +set GLOBAL query_cache_size=1024; +show global variables like "query_cache_size"; +select * from t1; +set GLOBAL query_cache_size=10240; +show global variables like "query_cache_size"; +select * from t1; +set GLOBAL query_cache_size=20480; +show global variables like "query_cache_size"; +select * from t1; +set GLOBAL query_cache_size=40960; +show global variables like "query_cache_size"; +select * from t1; +set GLOBAL query_cache_size=51200; +show global variables like "query_cache_size"; +select * from t1; +set GLOBAL query_cache_size=61440; +show global variables like "query_cache_size"; +select * from t1; +set GLOBAL query_cache_size=81920; show global variables like "query_cache_size"; +select * from t1; +set GLOBAL query_cache_size=102400; +show global variables like "query_cache_size"; +select * from t1; +drop table t1; # # Temporary tables diff --git a/mysql-test/t/raid.test b/mysql-test/t/raid.test index 235add63c22..395a04615cb 100644 --- a/mysql-test/t/raid.test +++ b/mysql-test/t/raid.test @@ -1,5 +1,7 @@ -- require r/have_raid.require +disable_query_log; show variables like "have_raid"; +enable_query_log; # # Test of raided tables diff --git a/mysql-test/t/rpl_insert_id.test b/mysql-test/t/rpl_insert_id.test index 93062f39c20..3e84f86c092 100644 --- a/mysql-test/t/rpl_insert_id.test +++ b/mysql-test/t/rpl_insert_id.test @@ -1,5 +1,8 @@ # See if queries that use both auto_increment and LAST_INSERT_ID() # are replicated well + +# We also check how the foreign_key_check variable is replicated + source include/master-slave.inc; connection master; create table t1(a int auto_increment, key(a)); @@ -20,10 +23,30 @@ drop table t1; drop table t2; create table t1(a int auto_increment, key(a)); create table t2(b int auto_increment, c int, key(b)); +SET FOREIGN_KEY_CHECKS=0; insert into t1 values (10); insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 values (null,last_insert_id()); +SET FOREIGN_KEY_CHECKS=1; +save_master_pos; +connection slave; +sync_with_master; +select * from t1; +select * from t2; +connection master; + +# check if INSERT SELECT in auto_increment is well replicated (bug #490) + +drop table t1; +drop table t2; +create table t1(a int auto_increment, key(a)); +create table t2(b int auto_increment, c int, key(b)); +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 (c) select * from t1; +select * from t2; save_master_pos; connection slave; sync_with_master; diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test index faca1a6c339..369c62848f9 100644 --- a/mysql-test/t/rpl_log.test +++ b/mysql-test/t/rpl_log.test @@ -32,11 +32,33 @@ show binlog events from 79 limit 2; show binlog events from 79 limit 2,1; flush logs; +# We need an extra update before doing save_master_pos. +# Otherwise, an unlikely scenario may occur: +# * When the master's binlog_dump thread reads the end of master-bin.001, +# it send the rotate event which is at this end, plus a fake rotate event +# because it's starting to read a new binlog. +# save_master_pos will record the position of the first of the two rotate +# (because the fake one is not in the master's binlog anyway). +# * Later the slave waits for the position of the first rotate event, +# and it may quickly stop (in 'slave stop') without having received the fake +# one. +# So, depending on a few milliseconds, we end up with 2 rotate events in the +# relay log or one, which influences the output of SHOW SLAVE STATUS, making +# it not predictable and causing random test failures. +# To make it predictable, we do a useless update now, but which has the interest +# of making the slave catch both rotate events. + +create table t5 (a int); +drop table t5; + # Sync slave and force it to start on another binary log save_master_pos; connection slave; -start slave; +# Note that the above 'slave start' will cause a 3rd rotate event (a fake one) +# to go into the relay log (the master always sends a fake one when replication +# starts). +slave start; sync_with_master; flush logs; stop slave; diff --git a/mysql-test/t/timezone-master.opt b/mysql-test/t/timezone-master.opt new file mode 100644 index 00000000000..0477f941e9d --- /dev/null +++ b/mysql-test/t/timezone-master.opt @@ -0,0 +1 @@ +--timezone=MET diff --git a/mysql-test/t/timezone.test b/mysql-test/t/timezone.test new file mode 100644 index 00000000000..14facc0374a --- /dev/null +++ b/mysql-test/t/timezone.test @@ -0,0 +1,28 @@ +# +# Test of timezone handling. This script must be run with TZ=MEST + +-- require r/have_mest_timezone.require +disable_query_log; +show variables like "timezone"; +enable_query_log; + +# Initialization +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + + +CREATE TABLE t1 (ts int); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00')); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00')); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 03:00')); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00')); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00')); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00')); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 02:59:59')); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:00:00')); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 03:59:59')); +INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 04:00:01')); + +SELECT ts,from_unixtime(ts) FROM t1; +DROP TABLE t1; |