mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 01:04:19 +01:00
094f70fd19
- Don't save UNION's EXPLAIN data if optimization failed with an error. We could end up saving incomplete plan, which will cause a crash when we attempt to print it.
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
#
|
|
# This is a test for EXPLAINs being written into slow query log.
|
|
# For now, we just run the queries and hope not to crash.
|
|
#
|
|
#
|
|
--disable_warnings
|
|
drop table if exists t0,t1;
|
|
--enable_warnings
|
|
|
|
create table t0 (a int);
|
|
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
|
|
|
explain select * from t0 where a < 3;
|
|
|
|
--echo #
|
|
--echo # MDEV-5045: Server crashes in QPF_query::print_explain with log_slow_verbosity='query_plan,explain'
|
|
--echo #
|
|
set autocommit=1;
|
|
drop table t0;
|
|
|
|
--echo #
|
|
--echo # MDEV-5047 virtual THD::~THD(): Assertion `status_var.memory_used == 0' fails on disconnect
|
|
--echo #
|
|
--connect (con1,localhost,root,,)
|
|
--error ER_NO_SUCH_TABLE
|
|
ALTER TABLE nonexisting ENABLE KEYS;
|
|
SHOW WARNINGS;
|
|
--disconnect con1
|
|
--connection default
|
|
SELECT 1;
|
|
|
|
--echo #
|
|
--echo # MDEV-5060 Server crashes on EXPLAIN EXTENDED or EXPLAIN PARTITIONS with explain in slow_log
|
|
--echo #
|
|
EXPLAIN PARTITIONS SELECT 1 ;
|
|
|
|
|
|
--echo #
|
|
--echo # MDEV-5106: Server crashes in Explain_union::print_explain on ER_TOO_BIG_SELECT with explain in slow log
|
|
--echo #
|
|
CREATE TABLE t1 (i INT) ENGINE=MyISAM;
|
|
INSERT INTO t1 VALUES
|
|
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
SET max_join_size = 10;
|
|
--error ER_TOO_BIG_SELECT
|
|
( SELECT ta.* FROM t1 ta, t1 tb ) UNION ( SELECT * FROM t1 );
|
|
SELECT 'Server still alive?' as 'Yes';
|
|
|
|
DROP TABLE t1;
|