1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Manual merge from mysql-5.1.

This commit is contained in:
Ramil Kalimullin
2011-08-09 11:42:07 +04:00
47 changed files with 832 additions and 210 deletions

View File

@@ -7055,7 +7055,7 @@ DROP PROCEDURE p2;
DROP PROCEDURE p5;
#
# Bug#11840395 (formerly known as bug#60347):
# The string "versiondata" seems to be 'leaking' into the schema name space
# The string "versiondata" seems
# to be 'leaking' into the schema name space
#
DROP DATABASE IF EXISTS mixedCaseDbName;
@@ -7068,6 +7068,25 @@ select mixedCaseDbName.tryMyFunc();
mixedCaseDbName.tryMyFunc()
IT WORKS
DROP DATABASE mixedCaseDbName;
#
# Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
#
CREATE TABLE t1 (a INT, b INT, KEY(b));
CREATE TABLE t2 (c INT, d INT, KEY(c));
INSERT INTO t1 VALUES (1,1),(1,1),(1,2);
INSERT INTO t2 VALUES (1,1),(1,2);
CREATE FUNCTION f1() RETURNS INT DETERMINISTIC
BEGIN
DECLARE a int;
-- SQL statement inside
SELECT 1 INTO a;
RETURN a;
END $
SELECT COUNT(DISTINCT d) FROM t1, t2 WHERE a = c AND b = f1();
COUNT(DISTINCT d)
2
DROP FUNCTION f1;
DROP TABLE t1, t2;
# ------------------------------------------------------------------
# -- End of 5.1 tests
# ------------------------------------------------------------------