~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/innobase/mysql-test/innodb-lock.result

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
set global innodb_table_locks=1;
2
 
select @@innodb_table_locks;
3
 
@@innodb_table_locks
4
 
1
5
 
drop table if exists t1;
6
 
set @@innodb_table_locks=1;
7
 
create table t1 (id integer, x integer) engine=INNODB;
8
 
insert into t1 values(0, 0);
9
 
set autocommit=0;
10
 
SELECT * from t1 where id = 0 FOR UPDATE;
11
 
id      x
12
 
0       0
13
 
set autocommit=0;
14
 
lock table t1 write;
15
 
update t1 set x=1 where id = 0;
16
 
select * from t1;
17
 
id      x
18
 
0       1
19
 
commit;
20
 
update t1 set x=2 where id = 0;
21
 
commit;
22
 
unlock tables;
23
 
select * from t1;
24
 
id      x
25
 
0       2
26
 
commit;
27
 
drop table t1;
28
 
set @@innodb_table_locks=0;
29
 
create table t1 (id integer primary key, x integer) engine=INNODB;
30
 
insert into t1 values(0, 0),(1,1),(2,2);
31
 
commit;
32
 
SELECT * from t1 where id = 0 FOR UPDATE;
33
 
id      x
34
 
0       0
35
 
set autocommit=0;
36
 
set @@innodb_table_locks=0;
37
 
lock table t1 write;
38
 
update t1 set x=10 where id = 2;
39
 
SELECT * from t1 where id = 2;
40
 
id      x
41
 
2       2
42
 
UPDATE t1 set x=3 where id = 2;
43
 
commit;
44
 
SELECT * from t1;
45
 
id      x
46
 
0       0
47
 
1       1
48
 
2       3
49
 
commit;
50
 
unlock tables;
51
 
commit;
52
 
select * from t1;
53
 
id      x
54
 
0       0
55
 
1       1
56
 
2       10
57
 
drop table t1;