diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-01-19 19:36:14 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-01-19 19:36:14 +0300 |
commit | a6667f8577b0830f27dfbafb48561c23aee08ebd (patch) | |
tree | 688c26274e23ab44604f2f276f6a5c78e49241bf /mysql-test/t/union.test | |
parent | 40271e4f5edacc6fe90ed74a087e5ff25daea899 (diff) | |
parent | 0835775b7c3b074332800ee92112d68b28cec083 (diff) | |
download | mariadb-git-a6667f8577b0830f27dfbafb48561c23aee08ebd.tar.gz |
Manual merge from mysql-trunk-merge.
Conflicts:
- configure.in
- include/m_string.h
- mysql-test/extra/rpl_tests/rpl_row_func003.test
- mysql-test/r/mysqlbinlog.result
- mysql-test/r/union.result
- mysql-test/suite/binlog/r/binlog_killed_simulate.result
- mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
- mysql-test/suite/binlog/r/binlog_unsafe.result
- mysql-test/suite/binlog/t/binlog_unsafe.test
- mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
- mysql-test/suite/rpl/r/rpl_loaddata_map.result
- mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
- mysql-test/suite/rpl/r/rpl_stm_log.result
- mysql-test/suite/rpl/t/rpl_optimize.test
- mysql-test/t/mysqlbinlog.test
- mysql-test/t/union.test
- sql/rpl_utility.h
- sql/sql_union.cc
- strings/Makefile.am
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r-- | mysql-test/t/union.test | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index dc4173039d2..ab2745ceeef 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -1062,3 +1062,58 @@ SELECT ( SELECT a UNION SELECT a ) INTO OUTFILE 'union.out.file3' FROM t1; SELECT ( SELECT a UNION SELECT a ) INTO DUMPFILE 'union.out.file4' FROM t1; DROP TABLE t1; + + +--echo # +--echo # Bug #49734: Crash on EXPLAIN EXTENDED UNION ... ORDER BY +--echo # <any non-const-function> +--echo # + +CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a)); +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1),(2); + +--echo # Should not crash +EXPLAIN EXTENDED +SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY a + 12; + +--echo # Should not crash +SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY a + 12; + + +--echo # Should not crash +--error ER_CANT_USE_OPTION_HERE +EXPLAIN EXTENDED +SELECT * FROM t1 UNION SELECT * FROM t1 + ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); + +--echo # Should not crash +--error ER_CANT_USE_OPTION_HERE +SELECT * FROM t1 UNION SELECT * FROM t1 + ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); + +--echo # Should not crash +(SELECT * FROM t1) UNION (SELECT * FROM t1) + ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); + + +--echo # Should not crash +EXPLAIN EXTENDED +SELECT * FROM t1 UNION SELECT * FROM t1 + ORDER BY (SELECT a FROM t2 WHERE b = 12); + +--echo # Should not crash +--disable_result_log +SELECT * FROM t1 UNION SELECT * FROM t1 + ORDER BY (SELECT a FROM t2 WHERE b = 12); +--enable_result_log + +--echo # Should not crash +SELECT * FROM t2 UNION SELECT * FROM t2 + ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); + +DROP TABLE t1,t2; + + +--echo End of 5.1 tests |