~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/flush.test

  • Committer: Stewart Smith
  • Date: 2009-03-04 22:49:53 UTC
  • mto: (910.4.2 sparc) (908.3.6 work)
  • mto: This revision was merged to the branch mainline in revision 912.
  • Revision ID: stewart@flamingspork.com-20090304224953-b2ow237kc1bkp0o0
for getopt, replace GET_ULONG with GET_UINT32.

Don't replace for sql variables (yet). instead just indicated the intense source of fail with GET_ULONG_IS_FAIL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
select * from t1;
30
30
connection con2;
31
31
flush tables with read lock;
32
 
--error ER_CANT_UPDATE_WITH_READLOCK
 
32
--error 1223
33
33
drop table t2;
34
34
connection con1;
35
35
send drop table t2;
62
62
#select * from t1;
63
63
#drop table t1;
64
64
 
 
65
#
 
66
# Bug#9459 - deadlock with flush with lock, and lock table write
 
67
#
 
68
create table t1 (c1 int);
 
69
lock table t1 write;
 
70
# Cannot get the global read lock with write locked tables.
 
71
--error 1192
 
72
flush tables with read lock;
 
73
lock table t1 read;
 
74
# Can get the global read lock with read locked tables.
 
75
flush tables with read lock;
 
76
--error 1223
 
77
lock table t1 write;
 
78
lock table t1 read;
 
79
--error 1223
 
80
lock table t1 write;
 
81
# Release all table locks and the global read lock.
 
82
unlock tables;
 
83
create table t2 (c1 int);
 
84
create table t3 (c1 int);
 
85
lock table t1 read, t2 read, t3 write;
 
86
# Cannot get the global read lock with write locked tables.
 
87
--error 1192
 
88
flush tables with read lock;
 
89
lock table t1 read, t2 read, t3 read;
 
90
# Can get the global read lock with read locked tables.
 
91
flush tables with read lock;
 
92
# Release all table locks and the global read lock.
 
93
unlock tables;
 
94
drop table t1, t2, t3;
 
95
 
65
96
# End of 4.1 tests
66
97
 
67
98
#
75
106
connect (con3,localhost,root,,);
76
107
 
77
108
connection con1;
 
109
lock table t1 write;
78
110
 
79
111
connection con2;
80
112
send flush tables with read lock;
 
113
--sleep 1
81
114
 
82
115
connection con3;
83
116
send insert into t2 values(1);
 
117
--sleep 1
84
118
 
85
119
connection con1;
86
120
unlock tables;