summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2009-10-28 09:52:34 +0200
committerMichael Widenius <monty@askmonty.org>2009-10-28 09:52:34 +0200
commit358327618d5a71138be6ca27a4c8472723b67c45 (patch)
treec3e3a8863d7b69f2710398758721ffd6e75a02ca /mysql-test/t
parentf3e3fe866bfaa14986db5bb6a10e5c130af69137 (diff)
downloadmariadb-git-358327618d5a71138be6ca27a4c8472723b67c45.tar.gz
Speed up of test suite:
- Added --disable_query_log ; begin ; .... commit; --enable_query_log around all while loops that does insert
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/almost_full.test2
-rw-r--r--mysql-test/t/alter_table.test10
-rw-r--r--mysql-test/t/archive.test2
-rw-r--r--mysql-test/t/bench_count_distinct.test6
-rw-r--r--mysql-test/t/change_user.test4
-rw-r--r--mysql-test/t/check.test6
-rw-r--r--mysql-test/t/count_distinct2.test12
-rw-r--r--mysql-test/t/count_distinct3.test3
-rw-r--r--mysql-test/t/ctype_euckr.test2
-rw-r--r--mysql-test/t/derived.test6
-rw-r--r--mysql-test/t/events_time_zone.test2
-rw-r--r--mysql-test/t/fulltext2.test4
-rw-r--r--mysql-test/t/func_misc.test4
-rw-r--r--mysql-test/t/gis-rtree.test12
-rw-r--r--mysql-test/t/heap.test13
-rw-r--r--mysql-test/t/innodb_xtradb_bug317074.test13
-rw-r--r--mysql-test/t/insert.test7
-rw-r--r--mysql-test/t/kill.test6
-rw-r--r--mysql-test/t/merge.test4
-rw-r--r--mysql-test/t/multi_update.test12
-rw-r--r--mysql-test/t/multi_update2.test3
-rw-r--r--mysql-test/t/myisam.test18
-rw-r--r--mysql-test/t/myisam_debug.test4
-rw-r--r--mysql-test/t/myisampack.test2
-rw-r--r--mysql-test/t/order_by.test6
-rw-r--r--mysql-test/t/order_fill_sortbuf.test6
-rw-r--r--mysql-test/t/partition.test4
-rw-r--r--mysql-test/t/partition_archive.test2
-rw-r--r--mysql-test/t/select_found.test6
-rw-r--r--mysql-test/t/sp-big.test2
-rw-r--r--mysql-test/t/subselect.test14
-rw-r--r--mysql-test/t/warnings.test6
32 files changed, 158 insertions, 45 deletions
diff --git a/mysql-test/t/almost_full.test b/mysql-test/t/almost_full.test
index 5c67ab3c088..c192a7c1cd4 100644
--- a/mysql-test/t/almost_full.test
+++ b/mysql-test/t/almost_full.test
@@ -11,11 +11,13 @@ CREATE TABLE t1 (a int auto_increment primary key not null, b longtext) ENGINE=M
--disable_query_log
let $1= 303;
+begin;
while ($1)
{
INSERT INTO t1 SET b=repeat('a',200);
dec $1;
}
+commit;
--enable_query_log
DELETE FROM t1 WHERE a=1 or a=5;
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index 5233d64f44a..efda5fc1893 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -121,11 +121,15 @@ alter table t1 disable keys;
show keys from t1;
#let $1=10000;
let $1=10;
+--disable_query_log
+begin;
while ($1)
{
eval insert into t1 values($1,RAND()*1000,RAND()*1000,RAND());
dec $1;
}
+commit;
+--enable_query_log
alter table t1 enable keys;
show keys from t1;
drop table t1;
@@ -144,11 +148,15 @@ drop table t1;
create table t1 (a int, b int);
let $1=100;
+--disable_query_log
+begin;
while ($1)
{
eval insert into t1 values(1,$1), (2,$1), (3, $1);
dec $1;
}
+commit;
+--enable_query_log
alter table t1 add unique (a,b), add key (b);
show keys from t1;
analyze table t1;
@@ -966,12 +974,14 @@ DROP TABLE t1;
create table t1(f1 int not null, f2 int not null, key (f1), key (f2));
let $count= 50;
--disable_query_log
+begin;
while ($count)
{
EVAL insert into t1 values (1,1),(1,1),(1,1),(1,1),(1,1);
EVAL insert into t1 values (2,2),(2,2),(2,2),(2,2),(2,2);
dec $count ;
}
+commit;
--enable_query_log
select index_length into @unpaked_keys_size from
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index 7139d95ab49..5864e539b08 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1576,11 +1576,13 @@ CREATE TABLE t1(a VARCHAR(510)) ENGINE = ARCHIVE;
let $bug31036=41;
--disable_query_log
+begin;
while($bug31036)
{
INSERT INTO t1(a) VALUES (REPEAT('a', 510));
dec $bug31036;
}
+commit;
--enable_query_log
INSERT INTO t1(a) VALUES ('');
diff --git a/mysql-test/t/bench_count_distinct.test b/mysql-test/t/bench_count_distinct.test
index 131208f1fa1..87e3d75e996 100644
--- a/mysql-test/t/bench_count_distinct.test
+++ b/mysql-test/t/bench_count_distinct.test
@@ -7,14 +7,16 @@ drop table if exists t1;
--enable_warnings
create table t1(n int not null, key(n)) delay_key_write = 1;
let $1=100;
-disable_query_log;
+--disable_query_log
+begin;
while ($1)
{
eval insert into t1 values($1);
eval insert into t1 values($1);
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
select count(distinct n) from t1;
explain extended select count(distinct n) from t1;
drop table t1;
diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test
index 540f9d1b53f..46bf1d2a92c 100644
--- a/mysql-test/t/change_user.test
+++ b/mysql-test/t/change_user.test
@@ -57,13 +57,13 @@ FLUSH STATUS;
--disable_query_log
let $i = 100;
-
+begin;
while ($i)
{
dec $i;
-
SELECT 1;
}
+commit;
--enable_query_log
--enable_result_log
diff --git a/mysql-test/t/check.test b/mysql-test/t/check.test
index ff23b352b5a..78644523976 100644
--- a/mysql-test/t/check.test
+++ b/mysql-test/t/check.test
@@ -12,13 +12,15 @@ drop view if exists v1;
# Add a lot of keys to slow down check
create table t1(n int not null, key(n), key(n), key(n), key(n));
let $1=10000;
-disable_query_log;
+--disable_query_log
+begin;
while ($1)
{
eval insert into t1 values ($1);
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
send check table t1 extended;
connection con2;
insert into t1 values (200000);
diff --git a/mysql-test/t/count_distinct2.test b/mysql-test/t/count_distinct2.test
index 8dcb2a70065..95086ad04aa 100644
--- a/mysql-test/t/count_distinct2.test
+++ b/mysql-test/t/count_distinct2.test
@@ -51,13 +51,15 @@ drop table t1;
# test the conversion from tree to MyISAM
create table t1 (n int default NULL);
let $1=5000;
-disable_query_log;
+--disable_query_log
+begin;
while ($1)
{
eval insert into t1 values($1);
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
flush status;
select count(distinct n) from t1;
@@ -67,13 +69,15 @@ drop table t1;
# Test use of MyISAM tmp tables
create table t1 (s text);
let $1=5000;
-disable_query_log;
+--disable_query_log
+begin;
while ($1)
{
eval insert into t1 values('$1');
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
flush status;
select count(distinct s) from t1;
show status like 'Created_tmp_disk_tables';
diff --git a/mysql-test/t/count_distinct3.test b/mysql-test/t/count_distinct3.test
index 9de45baf320..8aecd628423 100644
--- a/mysql-test/t/count_distinct3.test
+++ b/mysql-test/t/count_distinct3.test
@@ -14,6 +14,7 @@ CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
--disable_query_log
SET @rnd_max= 2147483647;
let $1 = 1000;
+begin;
while ($1)
{
SET @rnd= RAND();
@@ -23,7 +24,7 @@ while ($1)
INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
dec $1;
}
-
+commit;
# We increase the size of t1 here.
SET @orig_myisam_sort_buffer_size = @@session.myisam_sort_buffer_size;
SET session myisam_sort_buffer_size=20000000;
diff --git a/mysql-test/t/ctype_euckr.test b/mysql-test/t/ctype_euckr.test
index fcb94e7b6d1..dcfb980fc37 100644
--- a/mysql-test/t/ctype_euckr.test
+++ b/mysql-test/t/ctype_euckr.test
@@ -77,11 +77,13 @@ DROP TABLE t1;
CREATE TABLE t1 (a binary(1), key(a));
--disable_query_log
let $1=255;
+begin;
while($1)
{
eval INSERT INTO t1 VALUES (unhex(hex($1)));
dec $1;
}
+commit;
--enable_query_log
CREATE TABLE t2 (s VARCHAR(4), a VARCHAR(1) CHARACTER SET euckr);
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index d28c19bbd18..a1456246e94 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -45,14 +45,16 @@ select * from (select * from t1 where t1.a=(select t2.a from t2 where t2.a=t1.a)
explain select * from (select t1.*, t2.a as t2a from t1,t2 where t1.a=t2.a) t1;
drop table t1, t2;
create table t1(a int not null, t char(8), index(a));
-disable_query_log;
+--disable_query_log
+begin;
let $1 = 10000;
while ($1)
{
eval insert into t1 values ($1,'$1');
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
SELECT * FROM (SELECT * FROM t1) as b ORDER BY a ASC LIMIT 0,20;
explain select count(*) from t1 as tt1, (select * from t1) as tt2;
drop table t1;
diff --git a/mysql-test/t/events_time_zone.test b/mysql-test/t/events_time_zone.test
index 03eb78d230e..17260eb0038 100644
--- a/mysql-test/t/events_time_zone.test
+++ b/mysql-test/t/events_time_zone.test
@@ -118,6 +118,7 @@ INSERT INTO mysql.time_zone_transition_type
let $transition_unix_time= `SELECT @unix_time`;
let $count= 30;
--disable_query_log
+begin;
while ($count)
{
eval INSERT INTO mysql.time_zone_transition
@@ -126,6 +127,7 @@ while ($count)
let $transition_unix_time= `SELECT $transition_unix_time + @step3`;
dec $count;
}
+commit;
--enable_query_log
let $tz_name = `SELECT CONCAT('b16420_a',UNIX_TIMESTAMP())`;
--replace_result $tz_name <TZ_NAME_1>
diff --git a/mysql-test/t/fulltext2.test b/mysql-test/t/fulltext2.test
index 88967a5dd04..9635e14d427 100644
--- a/mysql-test/t/fulltext2.test
+++ b/mysql-test/t/fulltext2.test
@@ -18,6 +18,7 @@ CREATE TABLE t1 (
# two-level entry, second-level tree with depth 2
--disable_query_log
+begin;
let $1=260;
while ($1)
{
@@ -40,6 +41,7 @@ while ($1)
eval insert t1 (a) values ('aaayyy');
dec $1;
}
+commit;
--enable_query_log
# converting to two-level
@@ -113,6 +115,7 @@ CREATE TABLE t1 (
# two-level entry, second-level tree with depth 2
--disable_query_log
let $1=260;
+begin;
while ($1)
{
eval insert t1 (a) values ('aaaxxx');
@@ -130,6 +133,7 @@ while ($1)
eval insert t1 (a) values ('aaayyy');
dec $1;
}
+commit;
--enable_query_log
select count(*) from t1 where match a against ('aaaxxx');
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 6590b43f2dc..98a5ad8d80c 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -213,11 +213,15 @@ start_ts DATETIME, end_ts DATETIME,
start_cached INTEGER, end_cached INTEGER);
CREATE TABLE t1 (f1 BIGINT);
let $num = `SELECT @row_count`;
+--disable_query_log
+begin;
while ($num)
{
INSERT INTO t1 VALUES (1);
dec $num;
}
+commit;
+--enable_query_log
let $loops = 4;
let $num = $loops;
diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test
index 19bbcf19cca..944a00f008f 100644
--- a/mysql-test/t/gis-rtree.test
+++ b/mysql-test/t/gis-rtree.test
@@ -17,12 +17,16 @@ SHOW CREATE TABLE t1;
let $1=150;
let $2=150;
+--disable_query_log
+begin;
while ($1)
{
eval INSERT INTO t1 (g) VALUES (GeomFromText('LineString($1 $1, $2 $2)'));
dec $1;
inc $2;
}
+commit;
+--enable_query_log
SELECT count(*) FROM t1;
EXPLAIN SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))'));
@@ -35,6 +39,8 @@ CREATE TABLE t2 (
g GEOMETRY NOT NULL
) ENGINE=MyISAM;
+--disable_query_log
+begin;
let $1=10;
while ($1)
{
@@ -46,6 +52,8 @@ while ($1)
}
dec $1;
}
+commit;
+--enable_query_log
ALTER TABLE t2 ADD SPATIAL KEY(g);
SHOW CREATE TABLE t2;
@@ -55,6 +63,8 @@ EXPLAIN SELECT fid, AsText(g) FROM t2 WHERE Within(g,
SELECT fid, AsText(g) FROM t2 WHERE Within(g,
GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))'));
+--disable_query_log
+begin;
let $1=10;
while ($1)
{
@@ -67,6 +77,8 @@ while ($1)
}
dec $1;
}
+commit;
+--enable_query_log
DROP TABLE t2;
diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test
index 3f91b9966e7..e5700eaeeb8 100644
--- a/mysql-test/t/heap.test
+++ b/mysql-test/t/heap.test
@@ -234,7 +234,8 @@ drop table t1,t2,t3;
#
create table t1 (v varchar(10), c char(10), t varchar(50), key(v), key(c), key(t(10)));
show create table t1;
-disable_query_log;
+--disable_query_log
+begin;
let $1=10;
while ($1)
{
@@ -248,7 +249,9 @@ while ($1)
}
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
+
select count(*) from t1;
insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1)));
select count(*) from t1 where v='a';
@@ -318,7 +321,8 @@ drop table t1;
create table t1 (v varchar(10), c char(10), t varchar(50), key using btree (v), key using btree (c), key using btree (t(10)));
show create table t1;
-disable_query_log;
+--disable_query_log
+begin;
let $1=10;
while ($1)
{
@@ -332,7 +336,8 @@ while ($1)
}
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
select count(*) from t1;
insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1)));
select count(*) from t1 where v='a';
diff --git a/mysql-test/t/innodb_xtradb_bug317074.test b/mysql-test/t/innodb_xtradb_bug317074.test
index 33d1dfa8b27..d3f7210d330 100644
--- a/mysql-test/t/innodb_xtradb_bug317074.test
+++ b/mysql-test/t/innodb_xtradb_bug317074.test
@@ -1,4 +1,3 @@
---source include/big_test.inc
--source include/have_innodb.inc
SET @old_innodb_file_format=@@innodb_file_format;
@@ -7,16 +6,16 @@ SET @old_innodb_file_format_check=@@innodb_file_format_check;
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON;
--- disable_query_log
--- disable_result_log
-
+--disable_warnings
DROP TABLE IF EXISTS `test1`;
+--enable_warnings
CREATE TABLE IF NOT EXISTS `test1` (
`a` int primary key auto_increment,
`b` int default 0,
`c` char(100) default 'testtest'
) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+set autocommit=0;
delimiter |;
CREATE PROCEDURE insert_many(p1 int)
BEGIN
@@ -26,14 +25,18 @@ REPEAT
insert into test1 set b=1;
SET @x = @x + 1;
SET @y = @y + 1;
- IF @y >= 100 THEN
+ IF @y >= 1000 THEN
commit;
SET @y = 0;
END IF;
UNTIL @x >= p1 END REPEAT;
END|
delimiter ;|
+--disable_query_log
+--disable_result_log
call insert_many(100000);
+--enable_query_log
+--enable_result_log
DROP PROCEDURE insert_many;
# The bug is hangup at the following statement
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 155ae6937ef..5ec0aefe021 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -151,7 +151,8 @@ drop table t1;
create table t1(id1 int not null auto_increment primary key, t char(12));
create table t2(id2 int not null, t char(12));
create table t3(id3 int not null, t char(12), index(id3));
-disable_query_log;
+--disable_query_log
+begin;
let $1 = 100;
while ($1)
{
@@ -170,7 +171,9 @@ while ($1)
}
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
+
select count(*) from t2;
insert into t2 select t1.* from t1, t2 t, t3 where t1.id1 = t.id2 and t.id2 = t3.id3;
select count(*) from t2;
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 8ef668f542b..44d04abf486 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -67,12 +67,14 @@ connection conn1;
-- disable_result_log
-- disable_query_log
+begin;
let $1 = 4096;
while ($1)
{
eval insert into t1 values ($1);
dec $1;
}
+commit;
-- enable_query_log
-- enable_result_log
@@ -265,6 +267,8 @@ connection con1;
let $ID= `select connection_id()`;
let $tab_count= 40;
+--disable_query_log
+begin;
let $i= $tab_count;
while ($i)
{
@@ -272,6 +276,8 @@ while ($i)
eval INSERT INTO t$i VALUES (1),(2),(3),(4),(5),(6),(7);
dec $i ;
}
+commit;
+--enable_query_log
set session optimizer_search_depth=0;
let $i=$tab_count;
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index 43267870cb7..72cb77a42b0 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -1274,6 +1274,8 @@ DROP TABLE t1, t2, t3;
CREATE TABLE t1 (id INTEGER, grp TINYINT, id_rev INTEGER);
SET @rnd_max= 2147483647;
let $1 = 10;
+--disable_query_log
+begin;
while ($1)
{
SET @rnd= RAND();
@@ -1283,6 +1285,8 @@ while ($1)
INSERT INTO t1 (id, grp, id_rev) VALUES (@id, @grp, @id_rev);
dec $1;
}
+commit;
+--enable_query_log
set @@read_buffer_size=2*1024*1024;
CREATE TABLE t2 SELECT * FROM t1;
INSERT INTO t1 (id, grp, id_rev) SELECT id, grp, id_rev FROM t2;
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index fc37fd6a27d..ebf6a6219fc 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -20,7 +20,8 @@ delete from mysql.user where user=_binary'mysqltest_1';
create table t1(id1 int not null auto_increment primary key, t char(12));
create table t2(id2 int not null, t char(12));
create table t3(id3 int not null, t char(12), index(id3));
-disable_query_log;
+--disable_query_log
+begin;
let $1 = 100;
while ($1)
{
@@ -39,7 +40,8 @@ while ($1)
}
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
select count(*) from t1 where id1 > 95;
select count(*) from t2 where id2 > 95;
@@ -75,7 +77,8 @@ drop table t1,t2,t3;
create table t1(id1 int not null primary key, t varchar(100)) pack_keys = 1;
create table t2(id2 int not null, t varchar(100), index(id2)) pack_keys = 1;
-disable_query_log;
+--disable_query_log
+begin;
let $1 = 1000;
while ($1)
{
@@ -88,7 +91,8 @@ while ($1)
}
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
delete t1 from t1,t2 where t1.id1 = t2.id2 and t1.id1 > 500;
drop table t1,t2;
diff --git a/mysql-test/t/multi_update2.test b/mysql-test/t/multi_update2.test
index a04518f4964..9c5078efb6f 100644
--- a/mysql-test/t/multi_update2.test
+++ b/mysql-test/t/multi_update2.test
@@ -48,13 +48,14 @@ CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL) ;
INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4);
let $1=19;
set @d=4;
+begin;
while ($1)
{
eval INSERT INTO t1 SELECT a+@d,b+@d FROM t1;
eval SET @d=@d*2;
dec $1;
}
-
+commit;
--enable_query_log
ALTER TABLE t1 ADD INDEX i1(a);
DELETE FROM t1 WHERE a > 2000000;
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 3e9bc69f725..69a0330fd9d 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -33,7 +33,8 @@ drop table t1;
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a));
let $1=100;
-disable_query_log;
+--disable_query_log
+begin;
--disable_warnings
SET SQL_WARNINGS=0;
while ($1)
@@ -41,9 +42,10 @@ while ($1)
eval insert into t1 (b) values(repeat(char(65+$1),65550-$1));
dec $1;
}
+commit;
SET SQL_WARNINGS=1;
--enable_warnings
-enable_query_log;
+--enable_query_log
check table t1;
repair table t1;
delete from t1 where (a & 1);
@@ -380,14 +382,16 @@ check table t1;
# check updating with keys
#
-disable_query_log;
+--disable_query_log
+begin;
let $1 = 100;
while ($1)
{
eval insert into t1 (b) values (repeat(char(($1 & 32)+65), $1));
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
update t1 set b=repeat(left(b,1),255) where a between 1 and 5;
update t1 set b=repeat(left(b,1),10) where a between 32 and 43;
update t1 set b=repeat(left(b,1),2) where a between 64 and 66;
@@ -551,11 +555,13 @@ create table t2 (a int);
let $i=1000;
set @@rand_seed1=31415926,@@rand_seed2=2718281828;
--disable_query_log
+begin;
while ($i)
{
dec $i;
insert t2 values (rand()*100000);
}
+commit;
--enable_query_log
insert t1 select * from t2;
show keys from t1;
@@ -1360,11 +1366,13 @@ CREATE TABLE t1 (
--disable_query_log
let $count= 100;
--echo # Insert $count rows. Query log disabled.
+begin;
while ($count)
{
INSERT INTO t1 VALUES ('a', 'b');
dec $count;
}
+commit;
--enable_query_log
#
# Change most of the rows into long character values with > 127 characters.
@@ -1444,11 +1452,13 @@ CREATE TABLE t1 (
--disable_query_log
let $count= 100;
--echo # Insert $count rows. Query log disabled.
+begin;
while ($count)
{
INSERT INTO t1 VALUES ('a', 'b');
dec $count;
}
+commit;
--enable_query_log
#
# Change most of the rows into long character values with > 42 characters.
diff --git a/mysql-test/t/myisam_debug.test b/mysql-test/t/myisam_debug.test
index 913668c5f22..43b5143441e 100644
--- a/mysql-test/t/myisam_debug.test
+++ b/mysql-test/t/myisam_debug.test
@@ -24,11 +24,15 @@ CREATE TABLE `t2` (
INSERT INTO t2 (id) VALUES (123);
let $i = 10;
+--disable_query_log
+begin;
while ($i)
{
INSERT INTO t2 (id) SELECT id FROM t2;
dec $i;
}
+commit;
+--enable_query_log
--echo # Switch to insert Connection
CONNECTION insertConn;
diff --git a/mysql-test/t/myisampack.test b/mysql-test/t/myisampack.test
index 9d27ed53254..fcd342168c4 100644
--- a/mysql-test/t/myisampack.test
+++ b/mysql-test/t/myisampack.test
@@ -69,11 +69,13 @@ CREATE TABLE t1(f1 VARCHAR(200), f2 TEXT);
INSERT INTO t1 VALUES ('foo', 'foo1'), ('bar', 'bar1');
let $i=9;
--disable_query_log
+begin;
while ($i)
{
INSERT INTO t1 SELECT * FROM t1;
dec $i;
}
+commit;
--enable_query_log
FLUSH TABLE t1;
--echo # Compress the table using MYISAMPACK tool
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index cca1e3209cc..e8887c07612 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -374,14 +374,16 @@ DROP TABLE t1;
#
create table t1(id int not null auto_increment primary key, t char(12));
-disable_query_log;
+--disable_query_log
+begin;
let $1 = 1000;
while ($1)
{
eval insert into t1(t) values ('$1');
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
explain select id,t from t1 order by id;
explain select id,t from t1 force index (primary) order by id;
drop table t1;
diff --git a/mysql-test/t/order_fill_sortbuf.test b/mysql-test/t/order_fill_sortbuf.test
index f13cf8cf350..7a8779b6e55 100644
--- a/mysql-test/t/order_fill_sortbuf.test
+++ b/mysql-test/t/order_fill_sortbuf.test
@@ -12,13 +12,15 @@ CREATE TABLE `t1` (
`id2` int(11) NOT NULL default '0',
`id3` int(11) NOT NULL default '0');
let $1=4000;
-disable_query_log;
+--disable_query_log
+begin;
while ($1)
{
eval insert into t1 (id,id2,id3) values ($1,$1,$1);
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
create table t2 select id2 from t1 order by id3;
select count(*) from t2;
drop table t1,t2;
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 0b497d86623..599697a0f44 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -1680,6 +1680,7 @@ create table t1
insert into t1 values (null,null);
--disable_query_log
+begin;
let $cnt= 1000;
while ($cnt)
{
@@ -1687,6 +1688,7 @@ while ($cnt)
update t1 set s2 = 2;
dec $cnt;
}
+commit;
--enable_query_log
drop table t1;
@@ -1804,11 +1806,13 @@ CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT,
PARTITION pa11 values less than MAXVALUE);
--disable_query_log
let $n= 15;
+begin;
while ($n)
{
insert into t1 (user) values ('mysql');
dec $n;
}
+commit;
--enable_query_log
show create table t1;
drop table t1;
diff --git a/mysql-test/t/partition_archive.test b/mysql-test/t/partition_archive.test
index fad57107b7d..9e2377f1bbf 100644
--- a/mysql-test/t/partition_archive.test
+++ b/mysql-test/t/partition_archive.test
@@ -94,11 +94,13 @@ CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT,
--disable_query_log
let $n= 100;
+begin;
while ($n)
{
insert into t1 (f1) values (repeat('a',25));
dec $n;
}
+commit;
--enable_query_log
show create table t1;
diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test
index e4bc54a5538..e043ec4d143 100644
--- a/mysql-test/t/select_found.test
+++ b/mysql-test/t/select_found.test
@@ -54,7 +54,8 @@ CREATE TABLE t2 (
UNIQUE KEY e_n (email,name)
);
-disable_query_log;
+--disable_query_log
+begin;
let $1=200;
let $2=0;
while ($1)
@@ -63,7 +64,8 @@ while ($1)
eval INSERT INTO t2 VALUES ($2,'name$2','email$2');
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
EXPLAIN SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10;
SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10;
diff --git a/mysql-test/t/sp-big.test b/mysql-test/t/sp-big.test
index 90a3a79dd53..6541e546e43 100644
--- a/mysql-test/t/sp-big.test
+++ b/mysql-test/t/sp-big.test
@@ -43,11 +43,13 @@ create table t2 like t1;
let $1=8;
--disable_query_log
--disable_result_log
+begin;
while ($1)
{
eval insert into t1 select * from t1;
dec $1;
}
+commit;
--enable_result_log
--enable_query_log
select count(*) from t1;
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index a9edc831fdc..ef5a5e2c0a7 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -811,7 +811,8 @@ create table t1 (a int, b int, index a (a,b));
create table t2 (a int, index a (a));
create table t3 (a int, b int, index a (a));
insert into t1 values (1,10), (2,20), (3,30), (4,40);
-disable_query_log;
+--disable_query_log
+begin;
# making table large enough
let $1 = 10000;
while ($1)
@@ -819,7 +820,8 @@ while ($1)
eval insert into t1 values (rand()*100000+200,rand()*100000);
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
insert into t2 values (2), (3), (4), (5);
insert into t3 values (10,3), (20,4), (30,5);
select * from t2 where t2.a in (select a from t1);
@@ -2607,7 +2609,8 @@ CREATE TABLE t1 (a int, b int auto_increment, PRIMARY KEY (b));
CREATE TABLE t2 (x int auto_increment, y int, z int,
PRIMARY KEY (x), FOREIGN KEY (y) REFERENCES t1 (b));
-disable_query_log;
+--disable_query_log
+begin;
let $1=3000;
while ($1)
{
@@ -2621,7 +2624,8 @@ while ($1)
}
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
SET SESSION sort_buffer_size = 32 * 1024;
SELECT SQL_NO_CACHE COUNT(*)
@@ -3222,11 +3226,13 @@ insert into t1 values(1,1),(2,2), (3, 3);
let $i=10000;
--disable_query_log
--disable_warnings
+begin;
while ($i)
{
eval insert into t2 values (-1 , $i/5000 + 1, '$i');
dec $i;
}
+commit;
--enable_warnings
--enable_query_log
set session sort_buffer_size= 33*1024;
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index 12421170eba..b8235825cf2 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -82,13 +82,15 @@ drop table t1, t2;
create table t1(a char(10));
let $1=50;
-disable_query_log;
+--disable_query_log
+begin;
while ($1)
{
eval insert into t1 values('mysql ab');
dec $1;
}
-enable_query_log;
+commit;
+--enable_query_log
alter table t1 add b char;
set max_error_count=10;
update t1 set b=a;