2
drop procedure if exists bug14233;
3
drop function if exists bug14233;
4
drop table if exists t1;
5
drop view if exists v1;
6
create procedure bug14233()
8
create function bug14233_f() returns int
10
create table t1 (id int);
11
create trigger t1_ai after insert on t1 for each row call bug14233();
12
alter table mysql.proc drop type;
14
ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
15
create view v1 as select bug14233_f();
16
ERROR HY000: Failed to load routine test.bug14233_f. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
17
insert into t1 values (0);
18
ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
19
flush table mysql.proc;
21
ERROR HY000: Incorrect information in file: './mysql/proc.frm'
22
create view v1 as select bug14233_f();
23
ERROR HY000: Incorrect information in file: './mysql/proc.frm'
24
insert into t1 values (0);
25
ERROR HY000: Incorrect information in file: './mysql/proc.frm'
26
flush table mysql.proc;
28
ERROR 42S02: Table 'mysql.proc' doesn't exist
29
create view v1 as select bug14233_f();
30
ERROR 42S02: Table 'mysql.proc' doesn't exist
31
insert into t1 values (0);
32
ERROR 42S02: Table 'mysql.proc' doesn't exist
33
flush table mysql.proc;
35
delete from mysql.proc where name like 'bug14233%';
36
insert into mysql.proc
38
db, name, type, specific_name, language, sql_data_access, is_deterministic,
39
security_type, param_list, returns, body, definer, created, modified,
44
'test', 'bug14233_1', 'FUNCTION', 'bug14233_1', 'SQL', 'READS_SQL_DATA', 'NO',
45
'DEFINER', '', 'int(10)',
46
'select count(*) from mysql.user',
47
'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
50
'test', 'bug14233_2', 'FUNCTION', 'bug14233_2', 'SQL', 'READS_SQL_DATA', 'NO',
51
'DEFINER', '', 'int(10)',
52
'begin declare x int; select count(*) into x from mysql.user; end',
53
'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
56
'test', 'bug14233_3', 'PROCEDURE', 'bug14233_3', 'SQL', 'READS_SQL_DATA','NO',
58
'alksj wpsj sa ^#!@ ',
59
'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
62
ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
63
create view v1 as select bug14233_1();
64
ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
66
ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
67
create view v1 as select bug14233_2();
68
ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
70
ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
72
create trigger t1_ai after insert on t1 for each row call bug14233_3();
73
insert into t1 values (0);
74
ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
77
drop function bug14233_1;
78
drop function bug14233_2;
79
drop procedure bug14233_3;
80
show procedure status;
81
Db Name Type Definer Modified Created Security_type Comment
83
Db Name Type Definer Modified Created Security_type Comment