diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-01-13 15:50:02 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-01-13 15:50:02 +0100 |
commit | 4f435bddfd44d40999f88685c61cc04e319d8d6c (patch) | |
tree | f9d0655a0d901b87f918a736741144b502cba3f6 /mysql-test/r/trigger.result | |
parent | 8c2bcdf85ff753bceeb5b235f3605e348e6f9e1d (diff) | |
parent | 6ca4ca7d37fed3b3da18666768de6a2f8c34bc7b (diff) | |
download | mariadb-git-4f435bddfd44d40999f88685c61cc04e319d8d6c.tar.gz |
5.3 merge
Diffstat (limited to 'mysql-test/r/trigger.result')
-rw-r--r-- | mysql-test/r/trigger.result | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 22f1546d322..ef998abafcf 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -2218,3 +2218,47 @@ aaa DROP TABLE t1; End of 5.5 tests. +# +# BUG #910083: materialized subquery in a trigger +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='materialization=on'; +CREATE TABLE t1 (a int); +CREATE TABLE t2 (b int); +CREATE TRIGGER tr AFTER UPDATE ON t1 FOR EACH ROW +UPDATE t2 SET b = (SELECT COUNT(a) FROM t1); +INSERT INTO t1 +VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9); +INSERT INTO t2 +VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0); +UPDATE t1 SET a = 3; +SELECT COUNT(*) FROM t1; +COUNT(*) +9 +SELECT * FROM t2; +b +9 +9 +9 +9 +9 +9 +9 +9 +9 +UPDATE t1 SET a = 2; +SELECT * FROM t2; +b +9 +9 +9 +9 +9 +9 +9 +9 +9 +SET optimizer_switch=@save_optimizer_switch; +DROP TRIGGER tr; +DROP TABLE t1, t2; +End of 5.3 tests. |