Commit c70dbeab authored by gshchepa@bk-internal.mysql.com's avatar gshchepa@bk-internal.mysql.com
Browse files

Merge bk-internal.mysql.com:/data0/bk/mysql-5.0

into  bk-internal.mysql.com:/users/gshchepa/mysql-5.0-opt
parents 16e0a4de 88107378
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;
+29 −0
Original line number Diff line number Diff line
@@ -1621,6 +1621,35 @@ a (select count(*) from t2)
3	0
4	0
drop table t1,t2;
DROP DATABASE IF EXISTS bug30269;
FLUSH STATUS;
CREATE DATABASE bug30269;
USE bug30269;
CREATE TABLE test1 (id int, name varchar(23));
CREATE VIEW view1 AS SELECT * 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 statement not stored in query cache because of column privileges.
SELECT id FROM test1 WHERE id>2;
id
5
show status like 'Qcache_queries_in_cache';
Variable_name	Value
Qcache_queries_in_cache	0
SELECT id FROM view1 WHERE id>2;
id
5
show status like 'Qcache_queries_in_cache';
Variable_name	Value
Qcache_queries_in_cache	1
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;
+32 −1
Original line number Diff line number Diff line
@@ -1220,9 +1220,40 @@ connection default;
disconnect user1;
disconnect user2;
disconnect user3;

#
# Bug #30269 Query cache eats memory
#
--disable_warnings
DROP DATABASE IF EXISTS bug30269;
--enable_warnings
FLUSH STATUS;
CREATE DATABASE bug30269;
USE bug30269;
CREATE TABLE test1 (id int, name varchar(23));
CREATE VIEW view1 AS SELECT * 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';
--echo # Select statement not stored in query cache because of column privileges.
SELECT id FROM test1 WHERE id>2;
show status like 'Qcache_queries_in_cache';
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
Loading