diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-03-02 16:18:16 +0000 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-03-02 16:18:16 +0000 |
commit | 42585b098edea0902890871a7fc5e4c5e09c1d93 (patch) | |
tree | ce9f5ed05fe31bbea8f5f183e86f8f719df3eb85 /mysql-test | |
parent | 1fc1f462b6d469d7b1f2bb94ba99f4554ced1cd5 (diff) | |
parent | 05ff7b65f072d69a67515b8c0c6731f358a846ca (diff) | |
download | mariadb-git-42585b098edea0902890871a7fc5e4c5e09c1d93.tar.gz |
auto-merge
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/delete.result | 12 | ||||
-rw-r--r-- | mysql-test/t/delete.test | 15 |
2 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index a682d90fbf7..d3cf69279fd 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -241,4 +241,16 @@ DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1; ERROR 42000: Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1 DROP TABLE t1; DROP FUNCTION f1; +# +# Bug #49552 : sql_buffer_result cause crash + not found records +# in multitable delete/subquery +# +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SET SESSION SQL_BUFFER_RESULT=1; +DELETE t1 FROM (SELECT SUM(a) a FROM t1) x,t1; +SET SESSION SQL_BUFFER_RESULT=DEFAULT; +SELECT * FROM t1; +a +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index ec70587c9d1..d9091c92a52 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -247,4 +247,19 @@ DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1; DROP TABLE t1; DROP FUNCTION f1; + +--echo # +--echo # Bug #49552 : sql_buffer_result cause crash + not found records +--echo # in multitable delete/subquery +--echo # + +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SET SESSION SQL_BUFFER_RESULT=1; +DELETE t1 FROM (SELECT SUM(a) a FROM t1) x,t1; + +SET SESSION SQL_BUFFER_RESULT=DEFAULT; +SELECT * FROM t1; +DROP TABLE t1; + --echo End of 5.0 tests |