~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- source include/not_embedded.inc
 
2
-- source include/have_innodb.inc
 
3
 
 
4
--disable_warnings
 
5
drop table if exists t1;
 
6
--enable_warnings
 
7
 
 
8
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
 
9
 
 
10
connect (a,localhost,root,,);
 
11
connect (b,localhost,root,,);
 
12
 
 
13
 
 
14
#
 
15
# BUG#11238 - in prelocking mode SELECT .. FOR UPDATE is changed to
 
16
# non-blocking SELECT
 
17
#
 
18
SET GLOBAL log_bin_trust_function_creators = 1;
 
19
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
 
20
insert t1 values (1,100);
 
21
delimiter |;
 
22
create function f1 () returns integer begin
 
23
declare var1 int;
 
24
select col2 into var1 from t1 where col1=1 for update;
 
25
return var1;
 
26
end|
 
27
delimiter ;|
 
28
start transaction;
 
29
select f1();
 
30
connection b;
 
31
send update t1 set col2=0 where col1=1;
 
32
connection default;
 
33
select * from t1;
 
34
connection a;
 
35
rollback;
 
36
connection b;
 
37
reap;
 
38
rollback;
 
39
 
 
40
# Cleanup
 
41
connection a;
 
42
disconnect a;
 
43
--source include/wait_until_disconnected.inc
 
44
connection b;
 
45
disconnect b;
 
46
--source include/wait_until_disconnected.inc
 
47
connection default;
 
48
drop table t1;
 
49
drop function f1;
 
50
SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;