mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Merge mysql-trunk -> mysql-trunk-bugfixing.
This commit is contained in:
commit
75bdd4074c
3 changed files with 147 additions and 10 deletions
|
@ -3699,6 +3699,117 @@ SELECT * FROM v1 IGNORE INDEX (c2) WHERE c2=2;
|
|||
ERROR 42000: Key 'c2' doesn't exist in table 'v1'
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# 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#40825: Error 1356 while selecting from a view
|
||||
# -- with a "HAVING" clause though query works
|
||||
|
|
|
@ -3680,6 +3680,38 @@ 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
|
||||
|
|
|
@ -38,13 +38,6 @@
|
|||
%{?_with_bundled_zlib:%define WITH_BUNDLED_ZLIB 1}
|
||||
%{!?_with_bundled_zlib:%define WITH_BUNDLED_ZLIB 0}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# use "rpmbuild --without innodb_plugin" or "rpm --define '_without_innodb_plugin 1'"
|
||||
# (for RPM 3.x) to not build the innodb plugin (on by default with innodb builds)
|
||||
# ----------------------------------------------------------------------
|
||||
%{?_without_innodb_plugin:%define WITHOUT_INNODB_PLUGIN 1}
|
||||
%{!?_without_innodb_plugin:%define WITHOUT_INNODB_PLUGIN 0}
|
||||
|
||||
# use "rpmbuild --with cluster" or "rpm --define '_with_cluster 1'" (for RPM 3.x)
|
||||
# to build with cluster support (off by default)
|
||||
%{?_with_cluster:%define CLUSTER_BUILD 1}
|
||||
|
@ -306,9 +299,6 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
|
|||
--enable-thread-safe-client \
|
||||
--with-readline \
|
||||
--with-innodb \
|
||||
%if %{WITHOUT_INNODB_PLUGIN}
|
||||
--without-plugin-innodb_plugin \
|
||||
%endif
|
||||
%if %{CLUSTER_BUILD}
|
||||
--with-ndbcluster \
|
||||
%else
|
||||
|
@ -873,6 +863,10 @@ fi
|
|||
# itself - note that they must be ordered by date (important when
|
||||
# merging BK trees)
|
||||
%changelog
|
||||
* Fri Aug 28 2009 Joerg Bruehe <joerg.bruehe@sun.com>
|
||||
|
||||
- Merge up form 5.1 to 5.4: Remove handling for the InnoDB plugin.
|
||||
|
||||
* Mon Aug 24 2009 Jonathan Perkin <jperkin@sun.com>
|
||||
|
||||
- Add conditionals for bundled zlib and innodb plugin
|
||||
|
|
Loading…
Reference in a new issue