~mdcallag/+junk/5.1-map

« back to all changes in this revision

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

  • 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:
92
92
delete t2 from t1,t2 where t1.a=t2.a;
93
93
drop table t1,t2;
94
94
 
95
 
# End of 4.1 tests
 
95
--echo End of 4.1 tests.
 
96
 
96
97
 
97
98
#
98
99
# Bug#18884 "lock table + global read lock = crash"
108
109
unlock tables;
109
110
drop table t1;
110
111
 
 
112
 
 
113
#
 
114
# Test LOCK TABLE on system tables.  See bug#9953: CONVERT_TZ requires
 
115
# mysql.time_zone_name to be locked.
 
116
#
 
117
--disable_warnings
 
118
DROP TABLE IF EXISTS t1;
 
119
--enable_warnings
 
120
 
 
121
CREATE TABLE t1 (i INT);
 
122
 
 
123
LOCK TABLES mysql.time_zone READ, mysql.proc READ, t1 READ;
 
124
UNLOCK TABLES;
 
125
 
 
126
LOCK TABLES mysql.time_zone READ, mysql.proc READ, t1 WRITE;
 
127
UNLOCK TABLES;
 
128
 
 
129
LOCK TABLES mysql.time_zone READ, mysql.proc READ;
 
130
UNLOCK TABLES;
 
131
 
 
132
LOCK TABLES mysql.time_zone WRITE, mysql.proc WRITE;
 
133
UNLOCK TABLES;
 
134
 
 
135
# If at least one system table is locked for WRITE, then all other
 
136
# tables should be system tables locked also for WRITE.
 
137
--error ER_WRONG_LOCK_OF_SYSTEM_TABLE
 
138
LOCK TABLES mysql.time_zone READ, mysql.proc WRITE, t1 READ;
 
139
 
 
140
--error ER_WRONG_LOCK_OF_SYSTEM_TABLE
 
141
LOCK TABLES mysql.time_zone WRITE, mysql.proc WRITE, t1 READ;
 
142
 
 
143
--error ER_WRONG_LOCK_OF_SYSTEM_TABLE
 
144
LOCK TABLES mysql.time_zone WRITE, mysql.proc WRITE, t1 WRITE;
 
145
 
 
146
--error ER_WRONG_LOCK_OF_SYSTEM_TABLE
 
147
LOCK TABLES mysql.time_zone READ, mysql.proc WRITE;
 
148
 
 
149
DROP TABLE t1;
 
150
 
 
151
 
 
152
--echo End of 5.1 tests.