diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-02-05 13:39:46 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-02-05 13:39:46 +0400 |
commit | 2be07c70947924c9829ad58dd1ee9d1f4228c401 (patch) | |
tree | 8c27cb07e2a58d8e61bdb095b1be1de3bc22a392 /mysql-test/t/sp_notembedded.test | |
parent | 128c9be664caa06142ad299c1a3bf17426468a65 (diff) | |
download | mariadb-git-2be07c70947924c9829ad58dd1ee9d1f4228c401.tar.gz |
Bug#47736 killing a select from a view when the view is processing a function, asserts
hide_view_error() does not take into account that thread query may be killed.
Added a check for thd->killed.
Addon: backported bug32140 fix from 6.0
mysql-test/r/sp_notembedded.result:
test case
mysql-test/t/sp_notembedded.test:
test case
sql/sp.cc:
backported bug32140 fix from 6.0
sql/table.cc:
Added a check for thd->killed.
Diffstat (limited to 'mysql-test/t/sp_notembedded.test')
-rw-r--r-- | mysql-test/t/sp_notembedded.test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index f593e184ad2..326cc22f1cd 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -413,6 +413,43 @@ let $wait_condition= --source include/wait_condition.inc DROP PROCEDURE p; +# +# Bug#47736 killing a select from a view when the view is processing a function, asserts +# +CREATE TABLE t1(a int); +INSERT INTO t1 VALUES (1); +CREATE FUNCTION f1 (inp TEXT) RETURNS INT NO SQL RETURN sleep(60); +CREATE VIEW v1 AS SELECT f1('a') FROM t1; + +--connect (con1, localhost, root,,) +--let $ID_1= `SELECT connection_id()` +--send SELECT * FROM v1; + +--connect (con2, localhost, root,,) +--let $ID_2= `SELECT connection_id()` +--send SELECT * FROM v1 + +--connection default +--disable_query_log +--eval KILL QUERY $ID_2 +--eval KILL QUERY $ID_1 +--enable_query_log + +--connection con1 +--error ER_QUERY_INTERRUPTED +--reap +--connection con2 +--error ER_QUERY_INTERRUPTED +--reap + +--connection default +DROP VIEW v1; +DROP TABLE t1; +DROP FUNCTION f1; +--disconnect con1 +--disconnect con2 + + --echo # ------------------------------------------------------------------ --echo # -- End of 5.1 tests --echo # ------------------------------------------------------------------ |