diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-05-21 15:30:25 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-05-21 15:30:25 +0200 |
commit | 431e042b5d76ed5fd219c39db798c9e7478731c8 (patch) | |
tree | a5556e1a39e43ca6a9549ef949541efcd9725f40 /mysql-test/t | |
parent | 3f4ef5928e72faf2b7fd0c98c8705ac649d2faf9 (diff) | |
parent | 83d455be90a06e8fc1293a611061bd9529ed8536 (diff) | |
download | mariadb-git-431e042b5d76ed5fd219c39db798c9e7478731c8.tar.gz |
c
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/alter_table.test | 1 | ||||
-rw-r--r-- | mysql-test/t/blackhole.test | 21 | ||||
-rw-r--r-- | mysql-test/t/cast.test | 12 | ||||
-rw-r--r-- | mysql-test/t/errors.test | 18 | ||||
-rw-r--r-- | mysql-test/t/gis.test | 18 | ||||
-rw-r--r-- | mysql-test/t/mysqlslap.test | 9 | ||||
-rw-r--r-- | mysql-test/t/subselect.test | 12 | ||||
-rw-r--r-- | mysql-test/t/subselect_innodb.test | 56 | ||||
-rw-r--r-- | mysql-test/t/user_var.test | 9 |
9 files changed, 154 insertions, 2 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 1edee9abf1e..eade7ba721e 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1230,3 +1230,4 @@ rename table t2 to t1; execute stmt1; deallocate prepare stmt1; drop table t2; + diff --git a/mysql-test/t/blackhole.test b/mysql-test/t/blackhole.test new file mode 100644 index 00000000000..1451f7606e0 --- /dev/null +++ b/mysql-test/t/blackhole.test @@ -0,0 +1,21 @@ +# +# Tests for the BLACKHOLE storage engine +# + +--source include/have_blackhole.inc + +--echo # +--echo # Bug #11880012: INDEX_SUBQUERY, BLACKHOLE, +--echo # HANG IN PREPARING WITH 100% CPU USAGE +--echo # + +CREATE TABLE t1(a INT NOT NULL); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE TABLE t2 (a INT UNSIGNED, b INT, UNIQUE KEY (a, b)) ENGINE=BLACKHOLE; + +SELECT 1 FROM t1 WHERE a = ANY (SELECT a FROM t2); + +DROP TABLE t1, t2; + +--echo End of 5.5 tests + diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index c8a5c968fe5..c39b7267f83 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -400,6 +400,18 @@ connection default; disconnect newconn; SET @@GLOBAL.max_allowed_packet=default; +--echo # +--echo # Bug#13519724 63793: CRASH IN DTCOLLATION::SET(DTCOLLATION &SET) +--echo # + +CREATE TABLE t1 (a VARCHAR(50)); + +SELECT a FROM t1 +WHERE CAST(a as BINARY)=x'62736D697468' + AND CAST(a AS BINARY)=x'65736D697468'; + +DROP TABLE t1; + --echo End of 5.1 tests select cast("2101-00-01 02:03:04" as datetime); diff --git a/mysql-test/t/errors.test b/mysql-test/t/errors.test index 82822c87e89..82204e1bfac 100644 --- a/mysql-test/t/errors.test +++ b/mysql-test/t/errors.test @@ -171,3 +171,21 @@ SELECT UPDATEXML(-73 * -2465717823867977728,@@global.auto_increment_increment,nu --echo # --echo # End Bug#57882 --echo # + +# +# Bug #13031606 VALUES() IN A SELECT STATEMENT CRASHES SERVER +# +CREATE TABLE t1 (a INT); +CREATE TABLE t2(a INT PRIMARY KEY, b INT); +--error ER_BAD_FIELD_ERROR +SELECT '' AS b FROM t1 GROUP BY VALUES(b); +--error ER_BAD_FIELD_ERROR +REPLACE t2(b) SELECT '' AS b FROM t1 GROUP BY VALUES(b); +--error ER_BAD_FIELD_ERROR +UPDATE t2 SET a=(SELECT '' AS b FROM t1 GROUP BY VALUES(b)); +--error ER_BAD_FIELD_ERROR +INSERT INTO t2 VALUES (1,0) ON DUPLICATE KEY UPDATE + b=(SELECT '' AS b FROM t1 GROUP BY VALUES(b)); +INSERT INTO t2(a,b) VALUES (1,0) ON DUPLICATE KEY UPDATE + b=(SELECT VALUES(a)+2 FROM t1); +DROP TABLE t1, t2; diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index a559b16b1f0..f4c9de4e7da 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -1295,6 +1295,24 @@ WHERE ST_Contains(ST_Buffer(bridges.position, 15.0), buildings.footprint) = 1; DROP DATABASE gis_ogs; USE test; + +--echo # +--echo # BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS +--echo # +SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))); + +--echo # +--echo # BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN +--echo # GEOMETRY FUNCTION ARGUMENTS +--echo # +--replace_regex /non geometric .* value/non geometric '' value/ +--error ER_ILLEGAL_VALUE_FOR_TYPE +SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); + + +--echo End of 5.1 tests + + --echo # --echo # Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE --echo # diff --git a/mysql-test/t/mysqlslap.test b/mysql-test/t/mysqlslap.test index 757d2813483..69eaae76409 100644 --- a/mysql-test/t/mysqlslap.test +++ b/mysql-test/t/mysqlslap.test @@ -1,6 +1,5 @@ # Can't run test of external client with embedded server --source include/not_embedded.inc ---source include/not_windows.inc --exec $MYSQL_SLAP --silent --concurrency=5 --iterations=20 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql @@ -37,7 +36,7 @@ --exec $MYSQL_SLAP --only-print --delimiter=";" --query="select * from t1;select * from t2" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32)); INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --engine="heap,myisam" --post-query="SHOW TABLES" --pre-query="SHOW TABLES"; - --exec $MYSQL_SLAP --only-print --delimiter=";" --query="select * from t1;select * from t2" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32)); INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --engine="heap,myisam" --post-query="SHOW TABLES" --pre-query="SHOW TABLES" --number-of-queries=6 --commit=1; + --exec $MYSQL_SLAP --only-print --delimiter=";" --query="select * from t1;select * from t2" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32)); INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --engine="heap,myisam" --post-query="SHOW TABLES" --pre-query="SHOW TABLES" --number-of-queries=6 --commit=1 --exec $MYSQL_SLAP --silent --concurrency=5 --iterations=1 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=write --detach=2 @@ -68,3 +67,9 @@ SHOW DATABASES; SHOW DATABASES; DROP DATABASE bug58090; +--echo # +--echo # Bug #11766072 - 59107: MYSQLSLAP CRASHES IF STARTED WITH NO ARGUMENTS ON WINDOWS +--echo # + +--replace_regex /queries: [0-9]+.[0-9]+/queries: TIME/ +--exec $MYSQL_SLAP diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 6e98c064d94..05dc8161db3 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -4723,6 +4723,18 @@ SELECT 1 FROM DROP TABLE t1; --echo # +--echo # Bug#13721076 CRASH WITH TIME TYPE/TIMESTAMP() AND WARNINGS IN SUBQUERY +--echo # + +CREATE TABLE t1(a TIME NOT NULL); +INSERT INTO t1 VALUES ('00:00:32'); + +SELECT 1 FROM t1 WHERE a > +(SELECT timestamp(a) AS a FROM t1); + +DROP TABLE t1; + +--echo # --echo # No BUG#, a case brought from 5.2's innodb_mysql_lock.test --echo # diff --git a/mysql-test/t/subselect_innodb.test b/mysql-test/t/subselect_innodb.test index 27ec36854f4..e390c9e2211 100644 --- a/mysql-test/t/subselect_innodb.test +++ b/mysql-test/t/subselect_innodb.test @@ -253,6 +253,62 @@ SELECT * FROM t1 WHERE b < (SELECT CAST(a as date) FROM t1 GROUP BY a); DROP TABLE t1; --echo # +--echo # Bug #11766300 59387: FAILING ASSERTION: CURSOR->POS_STATE == 1997660512 (BTR_PCUR_IS_POSITIONE +--echo # + +CREATE TABLE t1 (a INT) ENGINE=INNODB; +INSERT INTO t1 VALUES (0); +CREATE TABLE t2 (d BINARY(2), PRIMARY KEY (d(1)), UNIQUE KEY (d)) ENGINE=INNODB; + +SELECT 1 FROM t1 WHERE NOT EXISTS +(SELECT 1 FROM t2 WHERE d = (SELECT d FROM t2 WHERE a >= 1) ORDER BY d); + +EXPLAIN SELECT 1 FROM t1 WHERE NOT EXISTS +(SELECT 1 FROM t2 WHERE d = (SELECT d FROM t2 WHERE a >= 1) ORDER BY d); + +DROP TABLE t2; + +CREATE TABLE t2 (b INT, c INT, UNIQUE KEY (b), UNIQUE KEY (b, c )) ENGINE=INNODB; +INSERT INTO t2 VALUES (1, 1); + +SELECT 1 FROM t1 +WHERE a != (SELECT 1 FROM t2 WHERE a <=> b OR a > '' AND 6 = 7 ORDER BY b, c); + +DROP TABLE t1, t2; + +--echo # +--echo # Bug #13639204 64111: CRASH ON SELECT SUBQUERY WITH NON UNIQUE +--echo # INDEX +--echo # +CREATE TABLE t1 ( +id int +) ENGINE=InnoDB; +INSERT INTO t1 (id) VALUES (11); + +CREATE TABLE t2 ( +t1_id int, +position int, +KEY t1_id (t1_id), +KEY t1_id_position (t1_id,position) +) ENGINE=InnoDB; + +let $query=SELECT +(SELECT position FROM t2 +WHERE t2.t1_id = t1.id +ORDER BY t2.t1_id , t2.position +LIMIT 10,1 +) AS maxkey +FROM t1 +LIMIT 1; + +eval EXPLAIN $query; +eval $query; + +DROP TABLE t1,t2; + +--echo End of 5.1 tests + +--echo # --echo # lp:827416 Crash in select_describe() on EXPLAIN with DISTINCT in nested subqueries --echo # diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 6a64343b609..fa23d118634 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -404,4 +404,13 @@ SELECT f1, f2 FROM t1 ORDER BY f2; DROP TRIGGER trg1; DROP TABLE t1; + +--echo # +--echo # Bug #12408412: GROUP_CONCAT + ORDER BY + INPUT/OUTPUT +--echo # SAME USER VARIABLE = CRASH +--echo # + +SET @bug12408412=1; +SELECT GROUP_CONCAT(@bug12408412 ORDER BY 1) INTO @bug12408412; + --echo End of 5.5 tests |