~vjsamuel/drizzle/bug-616035

« back to all changes in this revision

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

  • Committer: Stewart Smith
  • Date: 2008-07-09 01:40:54 UTC
  • mfrom: (105 drizzle)
  • mto: This revision was merged to the branch mainline in revision 111.
  • Revision ID: stewart@flamingspork.com-20080709014054-xfgfzirbhqzrzkkj
mergeĀ fromĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
drop table t1;
117
117
 
118
118
 
119
 
#
120
 
# Test LOCK TABLE on system tables.  See bug#9953: CONVERT_TZ requires
121
 
# mysql.time_zone_name to be locked.
122
 
#
123
 
--disable_warnings
124
 
DROP TABLE IF EXISTS t1;
125
 
--enable_warnings
126
 
 
127
 
CREATE TABLE t1 (i INT);
128
 
 
129
 
LOCK TABLES mysql.time_zone READ, t1 READ;
130
 
UNLOCK TABLES;
131
 
 
132
 
LOCK TABLES mysql.time_zone READ,  t1 WRITE;
133
 
UNLOCK TABLES;
134
 
 
135
 
LOCK TABLES mysql.time_zone READ;
136
 
UNLOCK TABLES;
137
 
 
138
 
LOCK TABLES mysql.time_zone WRITE;
139
 
UNLOCK TABLES;
140
 
 
141
 
# If at least one system table is locked for WRITE, then all other
142
 
# tables should be system tables locked also for WRITE.
143
 
LOCK TABLES mysql.time_zone READ, t1 READ;
144
 
 
145
 
--error ER_WRONG_LOCK_OF_SYSTEM_TABLE
146
 
LOCK TABLES mysql.time_zone WRITE, t1 READ;
147
 
 
148
 
--error ER_WRONG_LOCK_OF_SYSTEM_TABLE
149
 
LOCK TABLES mysql.time_zone WRITE, t1 WRITE;
150
 
 
151
 
DROP TABLE t1;
152
 
 
153
119
--echo
154
120
--echo Cleanup.
155
121
--echo