File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -387,6 +387,18 @@ impl QueryEntry {
387
387
return true ;
388
388
}
389
389
390
+ // DDL: Heavy actions.
391
+ Plan :: OptimizeTable ( _)
392
+ | Plan :: VacuumTable ( _)
393
+ | Plan :: VacuumTemporaryFiles ( _)
394
+ | Plan :: RefreshIndex ( _)
395
+ | Plan :: TruncateTable ( _) => {
396
+ return true ;
397
+ }
398
+ Plan :: DropTable ( v) if v. all => {
399
+ return true ;
400
+ }
401
+
390
402
// Light actions.
391
403
_ => {
392
404
return false ;
Original file line number Diff line number Diff line change @@ -274,6 +274,30 @@ async fn test_heavy_actions() -> Result<()> {
274
274
sql : "replace into t1 on(a) values(1)" , // REPLACE INTO
275
275
add_to_queue : true ,
276
276
} ,
277
+ Query {
278
+ sql : "optimize table t1 compact" ,
279
+ add_to_queue : true ,
280
+ } ,
281
+ Query {
282
+ sql : "vacuum table t" ,
283
+ add_to_queue : true ,
284
+ } ,
285
+ Query {
286
+ sql : "vacuum temporary files" ,
287
+ add_to_queue : true ,
288
+ } ,
289
+ Query {
290
+ sql : "truncate table t" ,
291
+ add_to_queue : true ,
292
+ } ,
293
+ Query {
294
+ sql : "drop table t" ,
295
+ add_to_queue : false ,
296
+ } ,
297
+ Query {
298
+ sql : "drop table t all" ,
299
+ add_to_queue : true ,
300
+ } ,
277
301
Query {
278
302
sql : "merge into t1 using (select * from t2) as t2 on t1.a = t2.a when matched then delete" ,
279
303
// MERGE INTO
You can’t perform that action at this time.
0 commit comments