Commit 1f116345 authored by Joerg Bruehe's avatar Joerg Bruehe

Correct a merge error that happened during a backport for 5.0.82sp1:

The test for the 45806 entry in our bug DB got applied twice,
in different places for the "view.test" and "view.result" files.

The fix is to simply remove the erroneous insertion.
parent fba963ea
......@@ -3659,117 +3659,6 @@ DROP TABLE t1;
# -- End of test case for Bug#34337.
#
# Bug #45806 crash when replacing into a view with a join!
#
CREATE TABLE t1(a INT UNIQUE);
CREATE VIEW v1 AS SELECT t1.a FROM t1, t1 AS a;
INSERT INTO t1 VALUES (1), (2);
REPLACE INTO v1(a) SELECT 1 FROM t1,t1 AS c;
SELECT * FROM v1;
a
1
2
1
2
REPLACE INTO v1(a) SELECT 3 FROM t1,t1 AS c;
SELECT * FROM v1;
a
1
2
3
1
2
3
1
2
3
DELETE FROM t1 WHERE a=3;
INSERT INTO v1(a) SELECT 1 FROM t1,t1 AS c
ON DUPLICATE KEY UPDATE `v1`.`a`= 1;
SELECT * FROM v1;
a
1
2
1
2
CREATE VIEW v2 AS SELECT t1.a FROM t1, v1 AS a;
REPLACE INTO v2(a) SELECT 1 FROM t1,t1 AS c;
SELECT * FROM v2;
a
1
2
1
2
1
2
1
2
REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c;
SELECT * FROM v2;
a
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c
ON DUPLICATE KEY UPDATE `v2`.`a`= 1;
SELECT * FROM v2;
a
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
1
2
3
DROP VIEW v1;
DROP VIEW v2;
DROP TABLE t1;
# -- End of test case for Bug#45806
# -----------------------------------------------------------------
# -- Bug#35193 VIEW query is rewritten without "FROM DUAL",
# -- causing syntax error
......
......@@ -3680,38 +3680,6 @@ SELECT * FROM v1 IGNORE INDEX (c2) WHERE c2=2;
DROP VIEW v1;
DROP TABLE t1;
--echo #
--echo # Bug #45806 crash when replacing into a view with a join!
--echo #
CREATE TABLE t1(a INT UNIQUE);
CREATE VIEW v1 AS SELECT t1.a FROM t1, t1 AS a;
INSERT INTO t1 VALUES (1), (2);
REPLACE INTO v1(a) SELECT 1 FROM t1,t1 AS c;
SELECT * FROM v1;
REPLACE INTO v1(a) SELECT 3 FROM t1,t1 AS c;
SELECT * FROM v1;
DELETE FROM t1 WHERE a=3;
INSERT INTO v1(a) SELECT 1 FROM t1,t1 AS c
ON DUPLICATE KEY UPDATE `v1`.`a`= 1;
SELECT * FROM v1;
CREATE VIEW v2 AS SELECT t1.a FROM t1, v1 AS a;
REPLACE INTO v2(a) SELECT 1 FROM t1,t1 AS c;
SELECT * FROM v2;
REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c;
SELECT * FROM v2;
INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c
ON DUPLICATE KEY UPDATE `v2`.`a`= 1;
SELECT * FROM v2;
DROP VIEW v1;
DROP VIEW v2;
DROP TABLE t1;
--echo # -- End of test case for Bug#45806
--echo # -----------------------------------------------------------------
--echo # -- Bug#40825: Error 1356 while selecting from a view
--echo # -- with a "HAVING" clause though query works
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment