~michaeleguo/ubuntu/trusty/percona-xtradb-cluster-5.5/arm64fix

« back to all changes in this revision

Viewing changes to mysql-test/t/signal_code.test

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-10 14:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20140210144423-f2134l2gxuvq2m6l
Tags: upstream-5.5.34-25.9+dfsg
ImportĀ upstreamĀ versionĀ 5.5.34-25.9+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Tests for SIGNAL and RESIGNAL
 
2
 
 
3
-- source include/have_debug.inc
 
4
 
 
5
use test;
 
6
 
 
7
--disable_warnings
 
8
drop procedure if exists signal_proc;
 
9
drop function if exists signal_func;
 
10
--enable_warnings
 
11
 
 
12
delimiter $$;
 
13
 
 
14
create procedure signal_proc()
 
15
begin
 
16
  DECLARE foo CONDITION FOR SQLSTATE '12345';
 
17
 
 
18
  SIGNAL foo;
 
19
  SIGNAL foo SET MESSAGE_TEXT = "This is an error message";
 
20
  RESIGNAL foo;
 
21
  RESIGNAL foo SET MESSAGE_TEXT = "This is an error message";
 
22
end $$
 
23
 
 
24
create function signal_func() returns int
 
25
begin
 
26
  DECLARE foo CONDITION FOR SQLSTATE '12345';
 
27
 
 
28
  SIGNAL foo;
 
29
  SIGNAL foo SET MESSAGE_TEXT = "This is an error message";
 
30
  RESIGNAL foo;
 
31
  RESIGNAL foo SET MESSAGE_TEXT = "This is an error message";
 
32
  return 0;
 
33
end $$
 
34
 
 
35
delimiter ;$$
 
36
 
 
37
show procedure code signal_proc;
 
38
drop procedure signal_proc;
 
39
 
 
40
show function code signal_func;
 
41
drop function signal_func;
 
42