~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/flush.test

  • Committer: Jay Pipes
  • Date: 2009-01-30 04:38:21 UTC
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090130043821-4d7jg2ftabefamxb
Fixes for the QUARTER() function to use new Temporal system and throw
errors on bad datetime values.

Added test case for QUARTER() function and modified func_time.test existing
test to correctly throw errors and report NULL, not 0 on NULL input.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
connection con2;
53
53
reap;
54
54
 
55
 
# test if dirty close releases global read lock
56
 
connection con1;
57
 
create table t1 (n int);
58
 
flush tables with read lock;
59
 
dirty_close con1;
60
 
connection con2;
61
 
insert into t1 values (345);
62
 
select * from t1;
63
 
drop table t1;
 
55
## test if dirty close releases global read lock
 
56
#connection con1;
 
57
#create table t1 (n int);
 
58
#flush tables with read lock;
 
59
#dirty_close con1;
 
60
#connection con2;
 
61
#insert into t1 values (345);
 
62
#select * from t1;
 
63
#drop table t1;
64
64
 
65
65
#
66
66
# Bug#9459 - deadlock with flush with lock, and lock table write
103
103
create table t1 (c1 int);
104
104
create table t2 (c1 int);
105
105
 
106
 
connect (con1,localhost,root,,);
107
106
connect (con3,localhost,root,,);
108
107
 
109
108
connection con1;
134
133
drop table t1, t2;
135
134
 
136
135
#
137
 
# Bug#32528 Global read lock with a low priority write lock causes a server crash
138
 
#
139
 
 
140
 
--disable_warnings
141
 
drop table if exists t1, t2;
142
 
--enable_warnings
143
 
 
144
 
set session low_priority_updates=1;
145
 
 
146
 
create table t1 (a int);
147
 
create table t2 (b int);
148
 
 
149
 
lock tables t1 write;
150
 
--error ER_LOCK_OR_ACTIVE_TRANSACTION
151
 
flush tables with read lock;
152
 
unlock tables;
153
 
 
154
 
lock tables t1 read, t2 write;
155
 
--error ER_LOCK_OR_ACTIVE_TRANSACTION
156
 
flush tables with read lock;
157
 
unlock tables;
158
 
 
159
 
lock tables t1 read;
160
 
flush tables with read lock;
161
 
unlock tables;
162
 
 
163
 
drop table t1, t2;
164
 
 
165
 
set session low_priority_updates=default;
166
 
 
167
 
#
168
136
# Bug #33334 mysqltest_embedded crashes when disconnecting before reap
169
137
#
170
138
 
175
143
 
176
144
--echo End of 5.0 tests
177
145
 
178
 
#
179
 
# Bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
180
 
#
181
 
set @old_general_log= @@general_log;
182
 
set @old_read_only= @@read_only;
183
 
set global general_log= on;
184
 
 
185
 
flush tables with read lock;
186
 
flush logs;
187
 
unlock tables;
188
 
 
189
 
set global read_only=1;
190
 
flush logs;
191
 
unlock tables;
192
 
 
193
 
flush tables with read lock;
194
 
flush logs;
195
 
unlock tables;
196
 
 
197
 
set global general_log= @old_general_log;
198
 
set global read_only= @old_read_only;
199
 
 
200
 
--echo End of 5.1 tests