1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-16 20:23:18 +03:00

Merge olga.mysql.com:/home/igor/mysql-5.0-opt

into  olga.mysql.com:/home/igor/mysql-5.1-opt-merge
This commit is contained in:
igor@olga.mysql.com
2007-06-04 03:16:17 -07:00
12 changed files with 152 additions and 9 deletions

View File

@@ -1796,6 +1796,17 @@ sub environment_setup () {
split(':', $ENV{'DYLD_LIBRARY_PATH'}) : ());
mtr_debug("DYLD_LIBRARY_PATH: $ENV{'DYLD_LIBRARY_PATH'}");
# The environment variable used for shared libs on AIX
$ENV{'SHLIB_PATH'}= join(":", @ld_library_paths,
$ENV{'SHLIB_PATH'} ?
split(':', $ENV{'SHLIB_PATH'}) : ());
mtr_debug("SHLIB_PATH: $ENV{'SHLIB_PATH'}");
# The environment variable used for shared libs on hp-ux
$ENV{'LIBPATH'}= join(":", @ld_library_paths,
$ENV{'LIBPATH'} ?
split(':', $ENV{'LIBPATH'}) : ());
mtr_debug("LIBPATH: $ENV{'LIBPATH'}");
# --------------------------------------------------------------------------
# Also command lines in .opt files may contain env vars

View File

@@ -4071,6 +4071,16 @@ id st
2 GA
4 FL
DROP TABLE t1,t2;
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1), (2);
EXPLAIN EXTENDED
SELECT * FROM (SELECT count(*) FROM t1 GROUP BY a) as res;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
Warnings:
Note 1003 select `res`.`count(*)` AS `count(*)` from (select count(0) AS `count(*)` from `test`.`t1` group by `test`.`t1`.`a`) `res`
DROP TABLE t1;
End of 5.0 tests.
CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);

View File

@@ -1449,4 +1449,28 @@ isave
1
2
drop table t1, t2, t3;
CREATE TABLE t1 (id INTEGER);
CREATE TABLE t2 (id INTEGER);
INSERT INTO t2 VALUES (1),(2);
CREATE TRIGGER t1_test AFTER INSERT ON t1 FOR EACH ROW
INSERT INTO t2 VALUES (new.id);
SELECT GET_LOCK('B26162',20);
GET_LOCK('B26162',20)
1
SELECT 'rl_acquirer', GET_LOCK('B26162',5), id FROM t2 WHERE id = 1;
SET SESSION LOW_PRIORITY_UPDATES=1;
SET GLOBAL LOW_PRIORITY_UPDATES=1;
INSERT INTO t1 VALUES (5);
SELECT 'rl_contender', id FROM t2 WHERE id > 1;
SELECT RELEASE_LOCK('B26162');
RELEASE_LOCK('B26162')
0
rl_acquirer GET_LOCK('B26162',5) id
rl_acquirer 0 1
rl_contender id
rl_contender 2
DROP TRIGGER t1_test;
DROP TABLE t1,t2;
SET SESSION LOW_PRIORITY_UPDATES=DEFAULT;
SET GLOBAL LOW_PRIORITY_UPDATES=DEFAULT;
End of 5.0 tests

View File

@@ -2906,6 +2906,20 @@ SELECT id, st FROM t1
DROP TABLE t1,t2;
#
# Bug #28728: crash with EXPLAIN EXTENDED for a query with a derived table
# over a grouping subselect
#
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1), (2);
EXPLAIN EXTENDED
SELECT * FROM (SELECT count(*) FROM t1 GROUP BY a) as res;
DROP TABLE t1;
--echo End of 5.0 tests.
#

View File

@@ -1763,4 +1763,59 @@ select * from t1;
select * from t3;
drop table t1, t2, t3;
#
# Bug #26162: Trigger DML ignores low_priority_updates setting
#
CREATE TABLE t1 (id INTEGER);
CREATE TABLE t2 (id INTEGER);
INSERT INTO t2 VALUES (1),(2);
# trigger that produces the high priority insert, but should be low, adding
# LOW_PRIORITY fixes this
CREATE TRIGGER t1_test AFTER INSERT ON t1 FOR EACH ROW
INSERT INTO t2 VALUES (new.id);
CONNECT (rl_acquirer, localhost, root,,);
CONNECT (wl_acquirer, localhost, root,,);
CONNECT (rl_contender, localhost, root,,);
SELECT GET_LOCK('B26162',20);
CONNECTION rl_acquirer;
--send
SELECT 'rl_acquirer', GET_LOCK('B26162',5), id FROM t2 WHERE id = 1;
CONNECTION wl_acquirer;
SET SESSION LOW_PRIORITY_UPDATES=1;
SET GLOBAL LOW_PRIORITY_UPDATES=1;
--send
INSERT INTO t1 VALUES (5);
CONNECTION rl_contender;
# must not "see" the row inserted by the INSERT (as it must run before the
# INSERT)
--send
SELECT 'rl_contender', id FROM t2 WHERE id > 1;
CONNECTION default;
SELECT RELEASE_LOCK('B26162');
CONNECTION wl_acquirer;
--reap
CONNECTION rl_acquirer;
--reap
CONNECTION rl_contender;
--reap
CONNECTION default;
DISCONNECT rl_acquirer;
DISCONNECT wl_acquirer;
DISCONNECT rl_contender;
DROP TRIGGER t1_test;
DROP TABLE t1,t2;
SET SESSION LOW_PRIORITY_UPDATES=DEFAULT;
SET GLOBAL LOW_PRIORITY_UPDATES=DEFAULT;
--echo End of 5.0 tests