1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Applied Sanja's patch to fix LP bug #784297 in the tree for mwl106.

The patch imposes unconditional materialization for derived tables
used in update and multi-update statements.
Fixed a bug with a wrong order of processing derived tables/views
at the prepare stage that caused a crash for the variant of the 
query from test case for bug 52157.
This commit is contained in:
Igor Babaev
2011-05-27 00:03:55 -07:00
parent 317e04ce67
commit c9a349488b
10 changed files with 55 additions and 17 deletions

View File

@@ -79,4 +79,6 @@ drop table bug38999_1,bug38999_2;
#
CREATE TABLE t1(f1 INT) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
ERROR 21000: Operand should contain 1 column(s)
DROP TABLE t1;

View File

@@ -34,9 +34,7 @@ drop table bug38999_1,bug38999_2;
--echo #
CREATE TABLE t1(f1 INT) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
# !!! This query returns a wrong error due to a bug in the code of mwl106
# !!! Uncomment it when the bug is fixed
# --error ER_OPERAND_COLUMNS
# UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
--error ER_OPERAND_COLUMNS
UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
DROP TABLE t1;