from information_schema.routines where routine_schema='test';
parameter_style sql_data_access dtd_identifier
parameter_style sql_data_access dtd_identifier
SQL CONTAINS SQL NULL
SQL CONTAINS SQL NULL
SQL CONTAINS SQL int(11)
SQL CONTAINS SQL int(11)
show procedure status;
show procedure status where db='test';
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
test sel2 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
test sel2 PROCEDURE root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
show function status;
show function status where db='test';
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
test sub1 FUNCTION root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
test sub1 FUNCTION root@localhost # # DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
select a.ROUTINE_NAME from information_schema.ROUTINES a,
select a.ROUTINE_NAME from information_schema.ROUTINES a,
information_schema.SCHEMATA b where
information_schema.SCHEMATA b where
a.ROUTINE_SCHEMA = b.SCHEMA_NAME;
a.ROUTINE_SCHEMA = b.SCHEMA_NAME AND b.SCHEMA_NAME='test';
ROUTINE_NAME
ROUTINE_NAME
sel2
sel2
sub1
sub1
...
@@ -295,14 +299,14 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -295,14 +299,14 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE # ALL NULL NULL NULL NULL NULL
1 SIMPLE # ALL NULL NULL NULL NULL NULL
1 SIMPLE # ALL NULL NULL NULL NULL NULL Using where; Using join buffer
1 SIMPLE # ALL NULL NULL NULL NULL NULL Using where; Using join buffer
select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a,
select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a,
mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) order by 1;
mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) AND a.ROUTINE_SCHEMA='test' order by 1;
ROUTINE_NAME name
ROUTINE_NAME name
sel2 sel2
sel2 sel2
sub1 sub1
sub1 sub1
select count(*) from information_schema.ROUTINES;
select count(*) from information_schema.ROUTINES where routine_schema='test';
count(*)
count(*)
2
2
create view v1 as select routine_schema, routine_name from information_schema.routines
create view v1 as select routine_schema, routine_name from information_schema.routines where routine_schema='test'
order by routine_schema, routine_name;
order by routine_schema, routine_name;
select * from v1;
select * from v1;
routine_schema routine_name
routine_schema routine_name
...
@@ -850,7 +854,7 @@ VIEWS TABLE_NAME select
...
@@ -850,7 +854,7 @@ VIEWS TABLE_NAME select
delete from mysql.user where user='mysqltest_4';
delete from mysql.user where user='mysqltest_4';
delete from mysql.db where user='mysqltest_4';
delete from mysql.db where user='mysqltest_4';
flush privileges;
flush privileges;
SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
table_schema count(*)
table_schema count(*)
information_schema 28
information_schema 28
mysql 22
mysql 22
...
@@ -890,7 +894,7 @@ if new.j = -1 then
...
@@ -890,7 +894,7 @@ if new.j = -1 then
set @fired:= "Yes";
set @fired:= "Yes";
end if;
end if;
end AFTER NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
end AFTER NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
select * from information_schema.triggers where trigger_schema in ('mysql', 'information_schema', 'test', 'mysqltest');
SELECT * FROM mysql.proc INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/proc.txt';
delete from mysql.proc;
delete from mysql.proc;
create procedure syntaxerror(t int)|
create procedure syntaxerror(t int)|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
...
@@ -1650,3 +1651,4 @@ begin
...
@@ -1650,3 +1651,4 @@ begin
declare continue handler for sqlstate '00000' set @x=0;
declare continue handler for sqlstate '00000' set @x=0;
end$$
end$$
ERROR 42000: Bad SQLSTATE: '00000'
ERROR 42000: Bad SQLSTATE: '00000'
LOAD DATA INFILE '../../tmp/proc.txt' INTO TABLE mysql.proc;