2005-05-06 21:06:10 +02:00
|
|
|
-- source include/testdb_only.inc
|
|
|
|
|
|
|
|
use INFORMATION_SCHEMA;
|
2005-05-24 12:35:23 +02:00
|
|
|
--replace_result Tables_in_INFORMATION_SCHEMA Tables_in_information_schema
|
2005-05-06 21:06:10 +02:00
|
|
|
show tables;
|
2005-05-24 12:35:23 +02:00
|
|
|
--replace_result 'Tables_in_INFORMATION_SCHEMA (T%)' 'Tables_in_information_schema (T%)'
|
2005-05-06 21:06:10 +02:00
|
|
|
show tables from INFORMATION_SCHEMA like 'T%';
|
|
|
|
create database `inf%`;
|
|
|
|
use `inf%`;
|
|
|
|
show tables;
|
2006-03-20 10:42:02 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bug#18113 SELECT * FROM information_schema.xxx crashes server
|
|
|
|
# Crash happened when one selected data from one of INFORMATION_SCHEMA
|
|
|
|
# tables and in order to build its contents server had to open view which
|
|
|
|
# used stored function and table or view on which one had not global or
|
|
|
|
# database-level privileges (e.g. had only table-level or had no
|
|
|
|
# privileges at all).
|
|
|
|
#
|
|
|
|
grant all privileges on `inf%`.* to 'mysqltest_1'@'localhost';
|
|
|
|
create table t1 (f1 int);
|
|
|
|
delimiter |;
|
|
|
|
create function func1(curr_int int) returns int
|
|
|
|
begin
|
|
|
|
declare ret_val int;
|
|
|
|
select max(f1) from t1 into ret_val;
|
|
|
|
return ret_val;
|
|
|
|
end|
|
|
|
|
delimiter ;|
|
|
|
|
create view v1 as select f1 from t1 where f1 = func1(f1);
|
|
|
|
connect (user1,localhost,mysqltest_1,,);
|
|
|
|
connection user1;
|
|
|
|
--disable_result_log
|
|
|
|
select * from information_schema.tables;
|
|
|
|
--enable_result_log
|
|
|
|
connection default;
|
|
|
|
drop user mysqltest_1@localhost;
|
|
|
|
drop view v1;
|
|
|
|
drop function func1;
|
|
|
|
drop table t1;
|
|
|
|
|
2005-05-06 21:06:10 +02:00
|
|
|
drop database `inf%`;
|