~mdcallag/+junk/5.1-map

« back to all changes in this revision

Viewing changes to mysql-test/suite/row_lock/r/innodb_row_lock_3.result

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SELECT @@global.innodb_table_locks into @table_locks;
 
2
SET @@global.innodb_table_locks= OFF;
 
3
DROP TABLE IF EXISTS t1, t2;
 
4
SET autocommit=0;
 
5
SET autocommit=0;
 
6
connection default;
 
7
CREATE TABLE t1 (k INT NOT NULL PRIMARY KEY, i INT, j INT, l INT) ENGINE=InnoDB;
 
8
INSERT INTO t1 VALUES (1,123,1,123);
 
9
INSERT INTO t1 VALUES (2,124,2,124);
 
10
INSERT INTO t1 VALUES (3,125,3,125);
 
11
INSERT INTO t1 VALUES (4,126,4,126);
 
12
#CREATE INDEX ixi ON t1 (i);
 
13
CREATE TABLE t2 (k INT NOT NULL PRIMARY KEY, i INT, j INT, l INT) ENGINE=InnoDB;
 
14
INSERT INTO t2 VALUES (1,123,1,123);
 
15
INSERT INTO t2 VALUES (2,124,2,124);
 
16
INSERT INTO t2 VALUES (3,125,3,125);
 
17
INSERT INTO t2 VALUES (4,126,4,126);
 
18
#CREATE INDEX ixi ON t2 (i);
 
19
COMMIT;
 
20
SELECT @@global.tx_isolation;
 
21
@@global.tx_isolation
 
22
REPEATABLE-READ
 
23
EXPLAIN SELECT t1.i,t2.i FROM t1,t2 WHERE t1.i<125 AND t2.i=t1.i LOCK IN SHARE MODE;
 
24
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
25
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    4       Using where
 
26
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    4       Using where
 
27
SELECT t1.i,t2.i FROM t1,t2 WHERE t1.i<125 AND t2.i=t1.i LOCK IN SHARE MODE;
 
28
i       i
 
29
123     123
 
30
124     124
 
31
connection root1;
 
32
UPDATE t1,t2 SET t1.i=225,t2.i=225 WHERE t1.i=125 AND t2.i=t1.i;