Commit ad9bbfe5 authored by Satya B's avatar Satya B

Remove the following tests and include files as they are already in

the mysql test suite.

Tests removed:
1. innodb_trx_weight.test
2. innodb_bug35220.test

Include files removed:
1. have_innodb.inc
2. ctype_innodb_like.inc
3. innodb_trx_weight.inc

Also add the missing opt file for the test innodb-use-sys-malloc.test
parent ef82eaf2
#
# Bug#11650: LIKE pattern matching using prefix index
# doesn't return correct result
#
--disable_warnings
#
# This query creates a column using
# character_set_connection and
# collation_connection.
#
create table t1 engine=innodb select repeat('a',50) as c1;
--enable_warnings
alter table t1 add index(c1(5));
insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111');
select collation(c1) from t1 limit 1;
select c1 from t1 where c1 like 'abcdef%' order by c1;
select c1 from t1 where c1 like 'abcde1%' order by c1;
select c1 from t1 where c1 like 'abcde11%' order by c1;
select c1 from t1 where c1 like 'abcde111%' order by c1;
drop table t1;
disable_query_log;
--require r/true.require
select (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` from information_schema.engines where engine = 'innodb';
enable_query_log;
-- connect (con1,localhost,root,,)
-- connect (con2,localhost,root,,)
-- connection con1
SET autocommit=0;
SELECT * FROM t1 FOR UPDATE;
-- if ($con1_extra_sql_present) {
-- eval $con1_extra_sql
-- }
-- connection con2
SET autocommit=0;
SELECT * FROM t2 FOR UPDATE;
-- if ($con2_extra_sql_present) {
-- eval $con2_extra_sql
-- }
-- if ($con1_should_be_rolledback) {
-- connection con1
-- send
INSERT INTO t2 VALUES (0);
-- connection con2
INSERT INTO t1 VALUES (0);
ROLLBACK;
-- connection con1
-- error ER_LOCK_DEADLOCK
-- reap
-- }
# else
-- if (!$con1_should_be_rolledback) {
-- connection con2
-- send
INSERT INTO t1 VALUES (0);
-- connection con1
INSERT INTO t2 VALUES (0);
ROLLBACK;
-- connection con2
-- error ER_LOCK_DEADLOCK
-- reap
-- }
-- connection default
DELETE FROM t5_nontrans;
-- disconnect con1
-- disconnect con2
--innodb-use-sys-malloc=true
--innodb-use-sys-malloc=true
#
# Bug#35220 ALTER TABLE too picky on reserved word "foreign"
# http://bugs.mysql.com/35220
#
-- source include/have_innodb.inc
SET storage_engine=InnoDB;
# we care only that the following SQL commands do not produce errors
-- disable_query_log
-- disable_result_log
CREATE TABLE bug35220 (foreign_col INT, dummy_cant_delete_all_columns INT);
ALTER TABLE bug35220 DROP foreign_col;
DROP TABLE bug35220;
#
# Ensure that the number of locks (SELECT FOR UPDATE for example) is
# added to the number of altered rows when choosing the smallest
# transaction to kill as a victim when a deadlock is detected.
# Also transactions what had edited non-transactional tables should
# be heavier than ones that had not.
#
-- source include/have_innodb.inc
SET storage_engine=InnoDB;
# we do not really care about what gets printed, we are only
# interested in getting the deadlock resolved according to our
# expectations
-- disable_query_log
-- disable_result_log
# we want to use "-- eval statement1; statement2" which does not work with
# prepared statements. Because this test should not behave differently with
# or without prepared statements we disable them so the test does not fail
# if someone runs ./mysql-test-run.pl --ps-protocol
-- disable_ps_protocol
-- disable_warnings
DROP TABLE IF EXISTS t1, t2, t3, t4, t5_nontrans;
-- enable_warnings
# we will create a simple deadlock with t1, t2 and two connections
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT);
# auxiliary table with a bulk of rows which will be locked by a
# transaction to increase its weight
CREATE TABLE t3 (a INT);
# auxiliary empty table which will be inserted by a
# transaction to increase its weight
CREATE TABLE t4 (a INT);
# auxiliary non-transactional table which will be edited by a
# transaction to tremendously increase its weight
CREATE TABLE t5_nontrans (a INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
# insert a lot of rows in t3
INSERT INTO t3 VALUES (1);
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
INSERT INTO t3 SELECT * FROM t3;
# test locking weight
-- let $con1_extra_sql =
-- let $con1_extra_sql_present = 0
-- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 1
-- source include/innodb_trx_weight.inc
-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1)
-- let $con1_extra_sql_present = 1
-- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 1
-- source include/innodb_trx_weight.inc
-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1), (1), (1), (1)
-- let $con1_extra_sql_present = 1
-- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 0
-- source include/innodb_trx_weight.inc
# test weight when non-transactional tables are edited
-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1)
-- let $con1_extra_sql_present = 1
-- let $con2_extra_sql =
-- let $con2_extra_sql_present = 0
-- let $con1_should_be_rolledback = 0
-- source include/innodb_trx_weight.inc
-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1)
-- let $con1_extra_sql_present = 1
-- let $con2_extra_sql = INSERT INTO t5_nontrans VALUES (1)
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 1
-- source include/innodb_trx_weight.inc
-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1)
-- let $con1_extra_sql = $con1_extra_sql; INSERT INTO t5_nontrans VALUES (1)
-- let $con1_extra_sql_present = 1
-- let $con2_extra_sql = INSERT INTO t5_nontrans VALUES (1)
-- let $con2_extra_sql_present = 1
-- let $con1_should_be_rolledback = 0
-- source include/innodb_trx_weight.inc
DROP TABLE t1, t2, t3, t4, t5_nontrans;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment