~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/r/lock.result

  • Committer: Monty Taylor
  • Date: 2008-07-05 22:08:52 UTC
  • mto: This revision was merged to the branch mainline in revision 77.
  • Revision ID: monty@inaugust.com-20080705220852-cqd9t6tfkhvlcf73
Removed HAVE_LONG_LONG, as this is now assumed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1,t2;
2
 
CREATE TABLE t1 (  `id` int NOT NULL default '0', `id2` int NOT NULL default '0', `id3` int NOT NULL default '0', `dummy1` char(30) default NULL, PRIMARY KEY  (`id`,`id2`), KEY `index_id3` (`id3`)) ENGINE=MyISAM;
 
2
CREATE TABLE t1 (  `id` int(11) NOT NULL default '0', `id2` int(11) NOT NULL default '0', `id3` int(11) NOT NULL default '0', `dummy1` char(30) default NULL, PRIMARY KEY  (`id`,`id2`), KEY `index_id3` (`id3`)) ENGINE=MyISAM;
3
3
insert into t1 (id,id2) values (1,1),(1,2),(1,3);
4
4
LOCK TABLE t1 WRITE;
5
5
select dummy1,count(distinct id) from t1 group by dummy1;
20
20
update t1 set id=1 where id=-1;
21
21
drop table t1,t2;
22
22
CREATE TABLE t1 (
23
 
index1 int default NULL,
24
 
nr int default NULL,
 
23
index1 smallint(6) default NULL,
 
24
nr smallint(6) default NULL,
25
25
KEY index1(index1)
26
26
) ENGINE=MyISAM;
27
27
CREATE TABLE t2 (
28
 
nr int default NULL,
 
28
nr smallint(6) default NULL,
29
29
name varchar(20) default NULL
30
30
) ENGINE=MyISAM;
31
31
INSERT INTO t2 VALUES (1,'item1');
62
62
lock tables t1 write, t2 write, t3 write, t1 as t4 read;
63
63
alter table t2 add column c2 int;
64
64
drop table t1, t2, t3;
65
 
create table t1 ( a int not null auto_increment, primary key(a));
66
 
create table t2 ( a int not null auto_increment, primary key(a));
 
65
create table t1 ( a int(11) not null auto_increment, primary key(a));
 
66
create table t2 ( a int(11) not null auto_increment, primary key(a));
67
67
lock tables t1 write, t2 read;
68
68
delete from t1 using t1,t2 where t1.a=t2.a;
69
69
delete t1 from t1,t2 where t1.a=t2.a;
83
83
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
84
84
unlock tables;
85
85
drop table t1;
 
86
DROP TABLE IF EXISTS t1;
 
87
CREATE TABLE t1 (i INT);
 
88
LOCK TABLES mysql.time_zone READ, t1 READ;
 
89
UNLOCK TABLES;
 
90
LOCK TABLES mysql.time_zone READ,  t1 WRITE;
 
91
UNLOCK TABLES;
 
92
LOCK TABLES mysql.time_zone READ;
 
93
UNLOCK TABLES;
 
94
LOCK TABLES mysql.time_zone WRITE;
 
95
UNLOCK TABLES;
 
96
LOCK TABLES mysql.time_zone READ, t1 READ;
 
97
LOCK TABLES mysql.time_zone WRITE, t1 READ;
 
98
ERROR HY000: You can't combine write-locking of system tables with other tables or lock types
 
99
LOCK TABLES mysql.time_zone WRITE, t1 WRITE;
 
100
ERROR HY000: You can't combine write-locking of system tables with other tables or lock types
 
101
DROP TABLE t1;
86
102
 
87
103
Cleanup.
88
104