2005-05-06 21:06:10 +02:00
|
|
|
use INFORMATION_SCHEMA;
|
|
|
|
show tables;
|
2005-05-24 12:35:23 +02:00
|
|
|
Tables_in_information_schema
|
2005-05-06 21:06:10 +02:00
|
|
|
CHARACTER_SETS
|
|
|
|
COLLATIONS
|
|
|
|
COLLATION_CHARACTER_SET_APPLICABILITY
|
2005-08-05 11:01:29 +02:00
|
|
|
COLUMNS
|
|
|
|
COLUMN_PRIVILEGES
|
|
|
|
KEY_COLUMN_USAGE
|
2005-05-06 21:06:10 +02:00
|
|
|
ROUTINES
|
2005-08-05 11:01:29 +02:00
|
|
|
SCHEMATA
|
2005-05-06 21:06:10 +02:00
|
|
|
SCHEMA_PRIVILEGES
|
2005-08-05 11:01:29 +02:00
|
|
|
STATISTICS
|
|
|
|
TABLES
|
2005-05-06 21:06:10 +02:00
|
|
|
TABLE_CONSTRAINTS
|
2005-08-05 11:01:29 +02:00
|
|
|
TABLE_PRIVILEGES
|
2005-07-19 18:06:49 +02:00
|
|
|
TRIGGERS
|
2005-08-05 11:01:29 +02:00
|
|
|
USER_PRIVILEGES
|
2006-01-29 02:44:51 +01:00
|
|
|
VIEWS
|
2005-05-06 21:06:10 +02:00
|
|
|
show tables from INFORMATION_SCHEMA like 'T%';
|
2005-05-24 12:35:23 +02:00
|
|
|
Tables_in_information_schema (T%)
|
2005-05-06 21:06:10 +02:00
|
|
|
TABLES
|
|
|
|
TABLE_CONSTRAINTS
|
2005-08-05 11:01:29 +02:00
|
|
|
TABLE_PRIVILEGES
|
2005-07-19 18:06:49 +02:00
|
|
|
TRIGGERS
|
2005-05-06 21:06:10 +02:00
|
|
|
create database `inf%`;
|
|
|
|
use `inf%`;
|
|
|
|
show tables;
|
|
|
|
Tables_in_inf%
|
2006-03-20 10:42:02 +01:00
|
|
|
grant all privileges on `inf%`.* to 'mysqltest_1'@'localhost';
|
|
|
|
create table t1 (f1 int);
|
|
|
|
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|
|
|
|
|
create view v1 as select f1 from t1 where f1 = func1(f1);
|
|
|
|
select * from information_schema.tables;
|
|
|
|
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%`;
|