2009-09-10 11:18:29 +02:00
|
|
|
use test;
|
|
|
|
drop procedure if exists signal_proc;
|
|
|
|
drop function if exists signal_func;
|
|
|
|
create procedure signal_proc()
|
|
|
|
begin
|
|
|
|
DECLARE foo CONDITION FOR SQLSTATE '12345';
|
|
|
|
SIGNAL foo;
|
|
|
|
SIGNAL foo SET MESSAGE_TEXT = "This is an error message";
|
|
|
|
RESIGNAL foo;
|
|
|
|
RESIGNAL foo SET MESSAGE_TEXT = "This is an error message";
|
|
|
|
end $$
|
|
|
|
create function signal_func() returns int
|
|
|
|
begin
|
|
|
|
DECLARE foo CONDITION FOR SQLSTATE '12345';
|
|
|
|
SIGNAL foo;
|
|
|
|
SIGNAL foo SET MESSAGE_TEXT = "This is an error message";
|
|
|
|
RESIGNAL foo;
|
|
|
|
RESIGNAL foo SET MESSAGE_TEXT = "This is an error message";
|
|
|
|
return 0;
|
|
|
|
end $$
|
|
|
|
show procedure code signal_proc;
|
|
|
|
Pos Instruction
|
WL#5670: Proposal: Remove SHOW NEW MASTER statement
Removes SHOW NEW MASTER statement and all related code.
Also removes the unused function update_slave_list from repl_failsafe.cc.
mysql-test/r/signal_code.result:
Updated result file.
The output of SHOW PROCEDURE CODE has changed, because the numerical values
of some SQLCOM_ commands have changes. This is not a problem, because
SHOW PROCEDURE CODE only exists in debug builds and the numerical values of
SQLCOM_ constants are not exposed elsewhere.
mysql-test/r/sp-code.result:
Updated result file.
The output of SHOW PROCEDURE CODE has changed, because the numerical values
of some SQLCOM_ commands have changes. This is not a problem, because
SHOW PROCEDURE CODE only exists in debug builds and the numerical values of
SQLCOM_ constants are not exposed elsewhere.
sql/mysqld.cc:
Remove SQLCOM_SHOW_NEW_MASTER.
sql/repl_failsafe.cc:
Remove show_new_master, which was only used by the removed SHOW NEW MASTER statement.
Remove translate_master, which was only used by show_new_master.
Remove find_slave_event, which was only used by translate_master.
Remove find_target_pos, which was only used by translate_master.
Remove cmp_master_pos, which was only used by translate_master.
Remove update_slave_list, which was not used at all.
sql/repl_failsafe.h:
Remove declarations of functions removed by this patch:
update_slave_list, show_new_master, translate_master, update_slave_list
Remove declarations of functions that did not exist before this patch:
handle_failsafe_rpl, load_master_data
Remove declaration of function that is static in slave.cc:
connect_to_master
sql/sp_head.cc:
Removed SQLCOM_SHOW_NEW_MASTER
sql/sql_lex.h:
Removed SQLCOM_SHOW_NEW_MASTER
sql/sql_parse.cc:
Removed SQLCOM_SHOW_NEW_MASTER
sql/sql_repl.cc:
Removed cmp_master_pos(char*,ulonglong,char*,ulonglong), which was
only used by cmp_master_pos*Slave_log_event* sev, LEX_MASTER_INFO* mi) in repl_failsafe.cc,
which has been removed.
sql/sql_repl.h:
removed cmp_master_pos
sql/sql_yacc.yy:
removed syntax SHOW NEW MASTER.
2011-02-16 17:27:35 +01:00
|
|
|
0 stmt 130 "SIGNAL foo"
|
|
|
|
1 stmt 130 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
|
|
|
|
2 stmt 131 "RESIGNAL foo"
|
|
|
|
3 stmt 131 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
|
2009-09-10 11:18:29 +02:00
|
|
|
drop procedure signal_proc;
|
|
|
|
show function code signal_func;
|
|
|
|
Pos Instruction
|
WL#5670: Proposal: Remove SHOW NEW MASTER statement
Removes SHOW NEW MASTER statement and all related code.
Also removes the unused function update_slave_list from repl_failsafe.cc.
mysql-test/r/signal_code.result:
Updated result file.
The output of SHOW PROCEDURE CODE has changed, because the numerical values
of some SQLCOM_ commands have changes. This is not a problem, because
SHOW PROCEDURE CODE only exists in debug builds and the numerical values of
SQLCOM_ constants are not exposed elsewhere.
mysql-test/r/sp-code.result:
Updated result file.
The output of SHOW PROCEDURE CODE has changed, because the numerical values
of some SQLCOM_ commands have changes. This is not a problem, because
SHOW PROCEDURE CODE only exists in debug builds and the numerical values of
SQLCOM_ constants are not exposed elsewhere.
sql/mysqld.cc:
Remove SQLCOM_SHOW_NEW_MASTER.
sql/repl_failsafe.cc:
Remove show_new_master, which was only used by the removed SHOW NEW MASTER statement.
Remove translate_master, which was only used by show_new_master.
Remove find_slave_event, which was only used by translate_master.
Remove find_target_pos, which was only used by translate_master.
Remove cmp_master_pos, which was only used by translate_master.
Remove update_slave_list, which was not used at all.
sql/repl_failsafe.h:
Remove declarations of functions removed by this patch:
update_slave_list, show_new_master, translate_master, update_slave_list
Remove declarations of functions that did not exist before this patch:
handle_failsafe_rpl, load_master_data
Remove declaration of function that is static in slave.cc:
connect_to_master
sql/sp_head.cc:
Removed SQLCOM_SHOW_NEW_MASTER
sql/sql_lex.h:
Removed SQLCOM_SHOW_NEW_MASTER
sql/sql_parse.cc:
Removed SQLCOM_SHOW_NEW_MASTER
sql/sql_repl.cc:
Removed cmp_master_pos(char*,ulonglong,char*,ulonglong), which was
only used by cmp_master_pos*Slave_log_event* sev, LEX_MASTER_INFO* mi) in repl_failsafe.cc,
which has been removed.
sql/sql_repl.h:
removed cmp_master_pos
sql/sql_yacc.yy:
removed syntax SHOW NEW MASTER.
2011-02-16 17:27:35 +01:00
|
|
|
0 stmt 130 "SIGNAL foo"
|
|
|
|
1 stmt 130 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
|
|
|
|
2 stmt 131 "RESIGNAL foo"
|
|
|
|
3 stmt 131 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
|
2017-05-05 05:00:18 +02:00
|
|
|
4 freturn int 0
|
2009-09-10 11:18:29 +02:00
|
|
|
drop function signal_func;
|