Commit 8d507c58 authored by malff/marcsql@weblab.(none)'s avatar malff/marcsql@weblab.(none)
Browse files

Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base

into  weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge
parents 88444351 35533f9d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -482,3 +482,10 @@ ERROR 42S02: Table 'test.t1' doesn't exist
drop table if exists t1;
Warnings:
Note	1051	Unknown table 't1'
drop table if exists t1;
create table t1 (a int) ENGINE=MEMORY;
--> client 2
handler t1 open;
ERROR HY000: Table storage engine for 't1' doesn't have this option
--> client 1
drop table t1;
+24 −0
Original line number Diff line number Diff line
@@ -1621,6 +1621,30 @@ a (select count(*) from t2)
3	0
4	0
drop table t1,t2;
DROP DATABASE IF EXISTS bug30269;
CREATE DATABASE bug30269;
USE bug30269;
CREATE TABLE test1 (id int, name varchar(23));
CREATE VIEW view1 AS SELECT id FROM test1;
INSERT INTO test1 VALUES (5, 'testit');
GRANT SELECT (id) ON TABLE bug30269.test1 TO 'bug30269'@'localhost';
GRANT SELECT ON TABLE bug30269.view1 TO 'bug30269'@'localhost';
set global query_cache_size= 81920;
USE bug30269;
show status like 'Qcache_queries_in_cache';
Variable_name	Value
Qcache_queries_in_cache	0
SELECT id FROM test1 WHERE id>2;
id
5
SELECT id FROM view1 WHERE id>2;
id
5
show status like 'Qcache_queries_in_cache';
Variable_name	Value
Qcache_queries_in_cache	0
DROP DATABASE bug30269;
DROP USER 'bug30269'@'localhost';
set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
set GLOBAL query_cache_min_res_unit=default;
+14 −0
Original line number Diff line number Diff line
@@ -427,3 +427,17 @@ select * from t1;
# Just to be sure and not confuse the next test case writer.
drop table if exists t1;

#
# Bug#25856 - HANDLER table OPEN in one connection lock DROP TABLE in another one
#
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 (a int) ENGINE=MEMORY;
--echo --> client 2
connection con2;
--error 1031
handler t1 open;
--echo --> client 1
connection default;
drop table t1;
+29 −1
Original line number Diff line number Diff line
@@ -1220,9 +1220,37 @@ connection default;
disconnect user1;
disconnect user2;
disconnect user3;

#
# Bug #30269 Query cache eats memory
#
--disable_warnings
DROP DATABASE IF EXISTS bug30269;
--enable_warnings
CREATE DATABASE bug30269;
USE bug30269;
CREATE TABLE test1 (id int, name varchar(23));
CREATE VIEW view1 AS SELECT id FROM test1;
INSERT INTO test1 VALUES (5, 'testit');
GRANT SELECT (id) ON TABLE bug30269.test1 TO 'bug30269'@'localhost';
GRANT SELECT ON TABLE bug30269.view1 TO 'bug30269'@'localhost';
set global query_cache_size= 81920;
connect (bug30269, localhost, bug30269,,);
connection bug30269;
USE bug30269;
show status like 'Qcache_queries_in_cache';
SELECT id FROM test1 WHERE id>2;
SELECT id FROM view1 WHERE id>2;
show status like 'Qcache_queries_in_cache';

connection default;
DROP DATABASE bug30269;
disconnect bug30269;
DROP USER 'bug30269'@'localhost';

set GLOBAL query_cache_type=default;
set GLOBAL query_cache_limit=default;
set GLOBAL query_cache_min_res_unit=default;
set GLOBAL query_cache_size=default;
# End of 5.0 tests

# End of 5.0 tests
+1 −0
Original line number Diff line number Diff line
@@ -730,6 +730,7 @@ static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count,
    if ((table=table_ptr[i])->s->tmp_table == NON_TRANSACTIONAL_TMP_TABLE)
      continue;
    lock_type= table->reginfo.lock_type;
    DBUG_ASSERT (lock_type != TL_WRITE_DEFAULT);
    if (lock_type >= TL_WRITE_ALLOW_WRITE)
    {
      *write_lock_used=table;
Loading