From d69e167f040515f3dc0e22d09d96830e9e5a8dbb Mon Sep 17 00:00:00 2001 From: dantengsky Date: Thu, 12 Oct 2023 20:05:35 +0800 Subject: [PATCH] chore: partially revert "feat: tweak table data life-cycle related sql stmts (#13015)" (#13223) * Revert "feat: tweak table data life-cycle related sql stmts (#13015)" This reverts commit e14dc7ca0f71b676807e2c08b624d28fb5d4a73f. * remove `truncate ... purge` * clean up * update doc of ddl-truncate-table --- benchmark/clickbench/hits/clear.sql | 3 +- benchmark/clickbench/tpch/clear.sql | 17 +++++------ benchmark/tpcds/load_data.sh | 4 +-- .../00-ddl/20-table/20-ddl-drop-table.md | 3 ++ .../00-ddl/20-table/40-ddl-truncate-table.md | 2 +- scripts/benchmark/query/load/hits.sh | 6 +--- src/query/ast/src/ast/statements/table.rs | 5 +++- src/query/ast/src/parser/statement.rs | 5 ++-- src/query/ast/tests/it/testdata/statement.txt | 4 +++ .../tests/it/aggregating_index/index_scan.rs | 4 +-- .../interpreters/interpreter_table_drop.rs | 18 +++++++++++ .../tests/it/storages/fuse/operations/gc.rs | 6 ++-- .../it/storages/fuse/operations/purge_drop.rs | 30 +++++++++++++++++++ .../it/storages/fuse/operations/truncate.rs | 2 +- src/query/sql/src/planner/binder/ddl/table.rs | 2 ++ src/query/sql/src/planner/plans/ddl/table.rs | 1 + src/query/storages/fuse/src/fuse_table.rs | 3 +- .../block/block_reader_parquet_deserialize.rs | 2 +- .../storages/fuse/src/operations/delete.rs | 6 ++-- .../storages/fuse/src/operations/truncate.rs | 20 +++++++++++-- src/tests/sqlsmith/src/sql_gen/ddl.rs | 1 + .../base/01_system/01_0002_system_query_log | 2 +- .../01_0007_system_clustering_history | 2 +- .../base/03_common/03_0003_select_group_by | 2 +- .../suites/base/03_common/03_0025_delete_from | 14 ++++----- .../base/03_common/03_0028_copy_into_stage | 2 +- .../03_common/03_0031_copy_into_user_stage | 2 +- .../suites/base/03_common/03_0035_update | 6 ++-- .../base/05_ddl/05_0001_ddl_drop_table_full | 4 +-- .../suites/base/05_ddl/05_0023_exists_table | 2 +- ...ncate => 09_0007_func_fuse_truncate_purge} | 0 .../09_fuse_engine/09_0017_transient_table | 1 + .../12_time_travel/12_0003_time_travel_undrop | 17 +++++++++++ .../suites/base/issues/issue_10103.test | 4 +-- .../group/group_by_grouping_sets.test | 4 +-- .../mode/cluster/04_0002_explain_v2.test | 4 +-- .../mode/standalone/explain/explain.test | 4 +-- .../standalone/explain_native/explain.test | 4 +-- .../02_function/02_0012_function_datetimes | 2 +- .../02_function/02_0012_function_datetimes_tz | 2 +- .../query/02_function/02_0014_function_maths | 2 +- .../02_0018_function_strings_repeat | 8 ++--- ...0048_function_semi_structureds_object_keys | 2 +- tests/sqllogictests/suites/query/cte.test | 2 +- .../suites/query/render_result.test | 4 +-- tests/sqllogictests/suites/ydb/select1-1.test | 2 +- tests/sqllogictests/suites/ydb/select1-2.test | 2 +- tests/sqllogictests/suites/ydb/select1-3.test | 2 +- tests/sqllogictests/suites/ydb/select1-4.test | 2 +- tests/sqllogictests/suites/ydb/select1-5.test | 2 +- tests/sqllogictests/suites/ydb/select2-1.test | 2 +- tests/sqllogictests/suites/ydb/select2-2.test | 2 +- tests/sqllogictests/suites/ydb/select2-3.test | 2 +- tests/sqllogictests/suites/ydb/select2-4.test | 2 +- tests/sqllogictests/suites/ydb/select2-5.test | 2 +- tests/sqllogictests/suites/ydb/select3-1.test | 2 +- .../sqllogictests/suites/ydb/select3-10.test | 2 +- .../sqllogictests/suites/ydb/select3-11.test | 2 +- .../sqllogictests/suites/ydb/select3-12.test | 2 +- .../sqllogictests/suites/ydb/select3-13.test | 2 +- .../sqllogictests/suites/ydb/select3-14.test | 2 +- .../sqllogictests/suites/ydb/select3-15.test | 2 +- tests/sqllogictests/suites/ydb/select3-2.test | 2 +- tests/sqllogictests/suites/ydb/select3-3.test | 2 +- tests/sqllogictests/suites/ydb/select3-4.test | 2 +- tests/sqllogictests/suites/ydb/select3-5.test | 2 +- tests/sqllogictests/suites/ydb/select3-6.test | 2 +- tests/sqllogictests/suites/ydb/select3-7.test | 2 +- tests/sqllogictests/suites/ydb/select3-8.test | 2 +- tests/sqllogictests/suites/ydb/select3-9.test | 2 +- .../17_0002_alter_table_purge_before.sh | 4 +-- .../17_0003_alter_table_update.sh | 4 +-- .../20+_others/20_0011_purge_before.sh | 4 +-- .../20+_others/20_0012_privilege_access.sh | 6 ++-- .../04_mini_dataset/04_0000_mini_ontime.sh | 2 +- .../04_mini_dataset/04_0001_mini_hits.sh | 2 +- .../05_01_00_load_compact_copy.sh | 2 +- .../05_01_01_load_compact_streaming_load.sh | 2 +- .../05_01_02_load_compact_copy_max_size.sh | 2 +- ...5_01_02_load_compact_copy_row_per_block.sh | 2 +- 80 files changed, 206 insertions(+), 114 deletions(-) rename tests/sqllogictests/suites/base/09_fuse_engine/{09_0007_func_fuse_truncate => 09_0007_func_fuse_truncate_purge} (100%) diff --git a/benchmark/clickbench/hits/clear.sql b/benchmark/clickbench/hits/clear.sql index 81452994830f4..e70c0347a8da3 100644 --- a/benchmark/clickbench/hits/clear.sql +++ b/benchmark/clickbench/hits/clear.sql @@ -1,2 +1 @@ -drop table hits; -VACUUM DROP TABLE retain 0 hours; +drop table hits all; diff --git a/benchmark/clickbench/tpch/clear.sql b/benchmark/clickbench/tpch/clear.sql index 60b4ace1ff065..ded376e4a7102 100644 --- a/benchmark/clickbench/tpch/clear.sql +++ b/benchmark/clickbench/tpch/clear.sql @@ -1,9 +1,8 @@ -drop table customer; -drop table lineitem; -drop table nation; -drop table orders; -drop table partsupp; -drop table part; -drop table region; -drop table supplier; -VACUUM DROP TABLE retain 0 hours; +drop table customer all; +drop table lineitem all; +drop table nation all; +drop table orders all; +drop table partsupp all; +drop table part all; +drop table region all; +drop table supplier all; diff --git a/benchmark/tpcds/load_data.sh b/benchmark/tpcds/load_data.sh index ca34a816b25c1..b2f71f834d311 100755 --- a/benchmark/tpcds/load_data.sh +++ b/benchmark/tpcds/load_data.sh @@ -36,11 +36,9 @@ tables=( # Clear Data for t in ${tables[@]} do - echo "DROP TABLE IF EXISTS $t" | $MYSQL_CLIENT_CONNECT + echo "DROP TABLE IF EXISTS $t ALL" | $MYSQL_CLIENT_CONNECT done -echo "VACUUM DROP TABLE retain 0 hours" | $MYSQL_CLIENT_CONNECT - # Create Tables; cat "$CURDIR"/tpcds.sql | $MYSQL_CLIENT_CONNECT diff --git a/docs/doc/14-sql-commands/00-ddl/20-table/20-ddl-drop-table.md b/docs/doc/14-sql-commands/00-ddl/20-table/20-ddl-drop-table.md index 0ca931eae633b..704f7253825b8 100644 --- a/docs/doc/14-sql-commands/00-ddl/20-table/20-ddl-drop-table.md +++ b/docs/doc/14-sql-commands/00-ddl/20-table/20-ddl-drop-table.md @@ -18,6 +18,9 @@ DROP TABLE [IF EXISTS] [db.]name :::caution `DROP TABLE` only remove the table schema from meta service, we do not remove the underlying data from the storage. +If you want to delete the data and table all, please use: + +`DROP TABLE ALL;` ::: diff --git a/docs/doc/14-sql-commands/00-ddl/20-table/40-ddl-truncate-table.md b/docs/doc/14-sql-commands/00-ddl/20-table/40-ddl-truncate-table.md index 9f8cabac2fc27..7a1a02af3d6a3 100644 --- a/docs/doc/14-sql-commands/00-ddl/20-table/40-ddl-truncate-table.md +++ b/docs/doc/14-sql-commands/00-ddl/20-table/40-ddl-truncate-table.md @@ -50,4 +50,4 @@ FROM test_truncate 0 row in 0.017 sec. Processed 0 rows, 0B (0 rows/s, 0B/s) -``` \ No newline at end of file +``` diff --git a/scripts/benchmark/query/load/hits.sh b/scripts/benchmark/query/load/hits.sh index f0c6d2a99576e..9754e60205329 100755 --- a/scripts/benchmark/query/load/hits.sh +++ b/scripts/benchmark/query/load/hits.sh @@ -7,11 +7,7 @@ select version(); SQL cat <, pub database: Option, pub table: Identifier, + pub all: bool, } impl Display for DropTableStmt { @@ -271,6 +272,9 @@ impl Display for DropTableStmt { .chain(&self.database) .chain(Some(&self.table)), )?; + if self.all { + write!(f, " ALL")?; + } Ok(()) } @@ -476,7 +480,6 @@ impl Display for TruncateTableStmt { .chain(&self.database) .chain(Some(&self.table)), )?; - Ok(()) } } diff --git a/src/query/ast/src/parser/statement.rs b/src/query/ast/src/parser/statement.rs index 0480e4deffdf8..17b63c8b5a761 100644 --- a/src/query/ast/src/parser/statement.rs +++ b/src/query/ast/src/parser/statement.rs @@ -578,14 +578,15 @@ pub fn statement(i: Input) -> IResult { ); let drop_table = map( rule! { - DROP ~ TABLE ~ ( IF ~ ^EXISTS )? ~ #dot_separated_idents_1_to_3 + DROP ~ TABLE ~ ( IF ~ ^EXISTS )? ~ #dot_separated_idents_1_to_3 ~ ALL? }, - |(_, _, opt_if_exists, (catalog, database, table))| { + |(_, _, opt_if_exists, (catalog, database, table), opt_all)| { Statement::DropTable(DropTableStmt { if_exists: opt_if_exists.is_some(), catalog, database, table, + all: opt_all.is_some(), }) }, ); diff --git a/src/query/ast/tests/it/testdata/statement.txt b/src/query/ast/tests/it/testdata/statement.txt index f456112a13c2c..5687f68a24b7e 100644 --- a/src/query/ast/tests/it/testdata/statement.txt +++ b/src/query/ast/tests/it/testdata/statement.txt @@ -1513,6 +1513,7 @@ DropTable( 11..12, ), }, + all: false, }, ) @@ -1544,6 +1545,7 @@ DropTable( 23..26, ), }, + all: false, }, ) @@ -2404,6 +2406,7 @@ DropTable( 11..17, ), }, + all: false, }, ) @@ -2425,6 +2428,7 @@ DropTable( 21..27, ), }, + all: false, }, ) diff --git a/src/query/ee/tests/it/aggregating_index/index_scan.rs b/src/query/ee/tests/it/aggregating_index/index_scan.rs index 6ddfa982dbab4..43e1cca22a3bb 100644 --- a/src/query/ee/tests/it/aggregating_index/index_scan.rs +++ b/src/query/ee/tests/it/aggregating_index/index_scan.rs @@ -1110,8 +1110,8 @@ async fn test_fuzz_impl(format: &str, spill: bool) -> Result<()> { } // Clear data - execute_sql(fixture.ctx(), "DROP TABLE rt").await?; - execute_sql(fixture.ctx(), "DROP TABLE t").await?; + execute_sql(fixture.ctx(), "DROP TABLE rt ALL").await?; + execute_sql(fixture.ctx(), "DROP TABLE t ALL").await?; } } Ok(()) diff --git a/src/query/service/src/interpreters/interpreter_table_drop.rs b/src/query/service/src/interpreters/interpreter_table_drop.rs index 362695d296e39..77527d8fb2d29 100644 --- a/src/query/service/src/interpreters/interpreter_table_drop.rs +++ b/src/query/service/src/interpreters/interpreter_table_drop.rs @@ -14,10 +14,12 @@ use std::sync::Arc; +use common_catalog::table::TableExt; use common_exception::ErrorCode; use common_exception::Result; use common_meta_app::schema::DropTableByIdReq; use common_sql::plans::DropTablePlan; +use common_storages_fuse::FuseTable; use common_storages_share::save_share_spec; use common_storages_view::view_table::VIEW_ENGINE; @@ -77,6 +79,22 @@ impl Interpreter for DropTableInterpreter { }) .await?; + // if `plan.all`, truncate, then purge the historical data + if self.plan.all { + // the above `catalog.drop_table` operation changed the table meta version, + // thus if we do not refresh the table instance, `truncate` will fail + let latest = tbl.as_ref().refresh(self.ctx.as_ref()).await?; + let maybe_fuse_table = FuseTable::try_from_table(latest.as_ref()); + // if target table if of type FuseTable, purge its historical data + // otherwise, plain truncate + if let Ok(fuse_table) = maybe_fuse_table { + let purge = true; + fuse_table.do_truncate(self.ctx.clone(), purge).await? + } else { + latest.truncate(self.ctx.clone()).await? + } + } + if let Some((spec_vec, share_table_info)) = resp.spec_vec { save_share_spec( &self.ctx.get_tenant(), diff --git a/src/query/service/tests/it/storages/fuse/operations/gc.rs b/src/query/service/tests/it/storages/fuse/operations/gc.rs index 447ddcc394c03..512436f2d8754 100644 --- a/src/query/service/tests/it/storages/fuse/operations/gc.rs +++ b/src/query/service/tests/it/storages/fuse/operations/gc.rs @@ -114,9 +114,9 @@ async fn test_fuse_purge_normal_orphan_snapshot() -> Result<()> { "do_gc: there should be 1 snapshot, 0 segment/block", expected_num_of_snapshot, 0, // 0 snapshot statistic - 1, // 1 segments - 1, // 1 blocks - 1, // 1 index + 1, // 0 segments + 1, // 0 blocks + 1, // 0 index Some(()), None, ) diff --git a/src/query/service/tests/it/storages/fuse/operations/purge_drop.rs b/src/query/service/tests/it/storages/fuse/operations/purge_drop.rs index b78191acce2f9..4c9e7762c5ca8 100644 --- a/src/query/service/tests/it/storages/fuse/operations/purge_drop.rs +++ b/src/query/service/tests/it/storages/fuse/operations/purge_drop.rs @@ -15,6 +15,7 @@ use common_base::base::tokio; use common_exception::Result; use databend_query::test_kits::table_test_fixture::append_sample_data; +use databend_query::test_kits::table_test_fixture::check_data_dir; use databend_query::test_kits::table_test_fixture::execute_command; use databend_query::test_kits::table_test_fixture::TestFixture; @@ -33,3 +34,32 @@ async fn test_fuse_snapshot_truncate_in_drop_stmt() -> Result<()> { execute_command(ctx.clone(), qry.as_str()).await?; Ok(()) } + +#[tokio::test(flavor = "multi_thread")] +async fn test_fuse_snapshot_truncate_in_drop_all_stmt() -> Result<()> { + let fixture = TestFixture::new().await; + let db = fixture.default_db_name(); + let tbl = fixture.default_table_name(); + let ctx = fixture.ctx(); + fixture.create_default_table().await?; + + // ingests some test data + append_sample_data(1, &fixture).await?; + // let's Drop + let qry = format!("drop table {}.{} all", db, tbl); + execute_command(ctx.clone(), qry.as_str()).await?; + + check_data_dir( + &fixture, + "drop table: there should be 1 snapshot, 0 segment/block", + 1, // 1 snapshot + 0, // 0 snapshot statistic + 0, // 0 segments + 0, // 0 blocks + 0, // 0 index + None, + None, + ) + .await?; + Ok(()) +} diff --git a/src/query/service/tests/it/storages/fuse/operations/truncate.rs b/src/query/service/tests/it/storages/fuse/operations/truncate.rs index 967ae9dd6a5f8..ff302fd9aaf69 100644 --- a/src/query/service/tests/it/storages/fuse/operations/truncate.rs +++ b/src/query/service/tests/it/storages/fuse/operations/truncate.rs @@ -145,7 +145,7 @@ async fn test_fuse_table_truncate_appending_concurrently() -> common_exception:: append_data(s1_table_to_be_truncated.clone()).await?; let s2_table_to_appended = fixture.latest_default_table().await?; - // 4. perform `truncate purge` operation on s1 + // 4. perform `truncate` operation on s1 let r = s1_table_to_be_truncated.truncate(ctx.clone()).await; // version mismatched, and `truncate purge` should result in error (but nothing should have been removed) assert!(r.is_err()); diff --git a/src/query/sql/src/planner/binder/ddl/table.rs b/src/query/sql/src/planner/binder/ddl/table.rs index 655cf3fb47855..924c72307226a 100644 --- a/src/query/sql/src/planner/binder/ddl/table.rs +++ b/src/query/sql/src/planner/binder/ddl/table.rs @@ -666,6 +666,7 @@ impl Binder { catalog, database, table, + all, } = stmt; let tenant = self.ctx.get_tenant(); @@ -678,6 +679,7 @@ impl Binder { catalog, database, table, + all: *all, }))) } diff --git a/src/query/sql/src/planner/plans/ddl/table.rs b/src/query/sql/src/planner/plans/ddl/table.rs index 899eae287f8a5..ea86d7575ac54 100644 --- a/src/query/sql/src/planner/plans/ddl/table.rs +++ b/src/query/sql/src/planner/plans/ddl/table.rs @@ -84,6 +84,7 @@ pub struct DropTablePlan { pub database: String, /// The table name pub table: String, + pub all: bool, } impl DropTablePlan { diff --git a/src/query/storages/fuse/src/fuse_table.rs b/src/query/storages/fuse/src/fuse_table.rs index 71039e682160b..f694548bb8d46 100644 --- a/src/query/storages/fuse/src/fuse_table.rs +++ b/src/query/storages/fuse/src/fuse_table.rs @@ -554,7 +554,8 @@ impl Table for FuseTable { #[minitrace::trace(name = "fuse_table_truncate")] #[async_backtrace::framed] async fn truncate(&self, ctx: Arc) -> Result<()> { - self.do_truncate(ctx).await + let purge = false; + self.do_truncate(ctx, purge).await } #[minitrace::trace(name = "fuse_table_optimize")] diff --git a/src/query/storages/fuse/src/io/read/block/block_reader_parquet_deserialize.rs b/src/query/storages/fuse/src/io/read/block/block_reader_parquet_deserialize.rs index e83767533c59d..1c7a8528965bc 100644 --- a/src/query/storages/fuse/src/io/read/block/block_reader_parquet_deserialize.rs +++ b/src/query/storages/fuse/src/io/read/block/block_reader_parquet_deserialize.rs @@ -336,7 +336,7 @@ impl BlockReader { Suppose the name of table is T ~~~ create table tmp_t as select * from T; - drop table T; + drop table T all; alter table tmp_t rename to T; ~~~ Please note that the history of table T WILL BE LOST. diff --git a/src/query/storages/fuse/src/operations/delete.rs b/src/query/storages/fuse/src/operations/delete.rs index d92faa19b4289..e08ef24f1dcef 100644 --- a/src/query/storages/fuse/src/operations/delete.rs +++ b/src/query/storages/fuse/src/operations/delete.rs @@ -99,7 +99,8 @@ impl FuseTable { }; ctx.get_write_progress().incr(&progress_values); // deleting the whole table... just a truncate - return self.do_truncate(ctx.clone()).await.map(|_| None); + let purge = false; + return self.do_truncate(ctx.clone(), purge).await.map(|_| None); } Some(filters) => filters, }; @@ -121,7 +122,8 @@ impl FuseTable { ctx.get_write_progress().incr(&progress_values); // deleting the whole table... just a truncate - return self.do_truncate(ctx.clone()).await.map(|_| None); + let purge = false; + return self.do_truncate(ctx.clone(), purge).await.map(|_| None); } } Ok(Some(snapshot.clone())) diff --git a/src/query/storages/fuse/src/operations/truncate.rs b/src/query/storages/fuse/src/operations/truncate.rs index 540b714df832e..25217356c2887 100644 --- a/src/query/storages/fuse/src/operations/truncate.rs +++ b/src/query/storages/fuse/src/operations/truncate.rs @@ -30,7 +30,7 @@ use crate::FuseTable; impl FuseTable { #[inline] #[async_backtrace::framed] - pub async fn do_truncate(&self, ctx: Arc) -> Result<()> { + pub async fn do_truncate(&self, ctx: Arc, purge: bool) -> Result<()> { if let Some(prev_snapshot) = self.read_table_snapshot().await? { // 1. prepare new snapshot let prev_id = prev_snapshot.snapshot_id; @@ -82,7 +82,6 @@ impl FuseTable { }) .await?; - // best effort to remove the table's copied files. catalog .truncate_table(&self.table_info, TruncateTableReq { table_id, @@ -97,6 +96,23 @@ impl FuseTable { new_snapshot_loc, ) .await; + + // best effort to remove historical data. if failed, let `vacuum` to do the job. + // TODO: consider remove the `purge` option from `truncate` + // - it is not a safe operation, there is NO retention interval protection here + // - it is incompatible with time travel features + if purge { + let snapshot_files = self.list_snapshot_files().await?; + let keep_last_snapshot = false; + let ret = self + .do_purge(&ctx, snapshot_files, None, keep_last_snapshot, false) + .await; + if let Err(e) = ret { + return Err(e); + } else { + return Ok(()); + } + } } Ok(()) diff --git a/src/tests/sqlsmith/src/sql_gen/ddl.rs b/src/tests/sqlsmith/src/sql_gen/ddl.rs index c91329af1d63c..ef981e2b84631 100644 --- a/src/tests/sqlsmith/src/sql_gen/ddl.rs +++ b/src/tests/sqlsmith/src/sql_gen/ddl.rs @@ -66,6 +66,7 @@ impl<'a, R: Rng> SqlGenerator<'a, R> { catalog: None, database: None, table: Identifier::from_name(table_name.clone()), + all: false, }; let create_table = CreateTableStmt { if_not_exists: true, diff --git a/tests/sqllogictests/suites/base/01_system/01_0002_system_query_log b/tests/sqllogictests/suites/base/01_system/01_0002_system_query_log index 82ce2774d1d8b..9ec8305f11df1 100644 --- a/tests/sqllogictests/suites/base/01_system/01_0002_system_query_log +++ b/tests/sqllogictests/suites/base/01_system/01_0002_system_query_log @@ -12,7 +12,7 @@ select count(*) > 0 from system.query_log 1 statement ok -drop table if exists tbl_01_0002 +drop table if exists tbl_01_0002 all statement ok create table tbl_01_0002(a int) diff --git a/tests/sqllogictests/suites/base/01_system/01_0007_system_clustering_history b/tests/sqllogictests/suites/base/01_system/01_0007_system_clustering_history index 1072cd21c742e..0294adf01e81c 100644 --- a/tests/sqllogictests/suites/base/01_system/01_0007_system_clustering_history +++ b/tests/sqllogictests/suites/base/01_system/01_0007_system_clustering_history @@ -1,5 +1,5 @@ statement ok -drop table if exists tbl_01_0007 +drop table if exists tbl_01_0007 all statement ok create table tbl_01_0007(a int not null) cluster by(a) diff --git a/tests/sqllogictests/suites/base/03_common/03_0003_select_group_by b/tests/sqllogictests/suites/base/03_common/03_0003_select_group_by index 602cf6039f5d2..5a57592d690f7 100644 --- a/tests/sqllogictests/suites/base/03_common/03_0003_select_group_by +++ b/tests/sqllogictests/suites/base/03_common/03_0003_select_group_by @@ -75,7 +75,7 @@ statement ok DROP table t statement ok -drop table if exists t_datetime +drop table if exists t_datetime all statement ok CREATE TABLE t_datetime(created_at Date, created_time DateTime, count Int32) diff --git a/tests/sqllogictests/suites/base/03_common/03_0025_delete_from b/tests/sqllogictests/suites/base/03_common/03_0025_delete_from index ec371b908bbaa..692e4f5499647 100644 --- a/tests/sqllogictests/suites/base/03_common/03_0025_delete_from +++ b/tests/sqllogictests/suites/base/03_common/03_0025_delete_from @@ -54,7 +54,7 @@ select count(*) = 0 from t statement ok -drop table t +drop table t all statement ok create table t (c Int null) @@ -141,7 +141,7 @@ select count(*) = 0 from t statement ok -drop table t +drop table t all statement ok create table t(c Int) CLUSTER BY(c+1) @@ -161,7 +161,7 @@ select count(*) = 2 from t 1 statement ok -drop table t +drop table t all statement ok create table t(a Int, b Int) @@ -186,7 +186,7 @@ statement ok delete from t where t.a in (select * from numbers(10)) statement ok -drop table t +drop table t all #################################### @@ -245,7 +245,7 @@ select * from t order by c; statement ok -drop table t +drop table t all #################################### # delete pruning, whole segments # @@ -279,7 +279,7 @@ select * from t order by c; 9 statement ok -drop table t +drop table t all # test large data statement ok @@ -319,7 +319,7 @@ select count(*) from t where c >= 0 and c < 1500000; 0 statement ok -drop table t +drop table t all statement ok DROP DATABASE db1 diff --git a/tests/sqllogictests/suites/base/03_common/03_0028_copy_into_stage b/tests/sqllogictests/suites/base/03_common/03_0028_copy_into_stage index c0c942e443cb5..0ee2e7040cdbf 100644 --- a/tests/sqllogictests/suites/base/03_common/03_0028_copy_into_stage +++ b/tests/sqllogictests/suites/base/03_common/03_0028_copy_into_stage @@ -31,7 +31,7 @@ SELECT COUNT() FROM test_table 4 statement ok -drop table test_table +drop table test_table all statement ok drop stage test diff --git a/tests/sqllogictests/suites/base/03_common/03_0031_copy_into_user_stage b/tests/sqllogictests/suites/base/03_common/03_0031_copy_into_user_stage index 462da395ef8e0..6dee4c9f4fdfd 100644 --- a/tests/sqllogictests/suites/base/03_common/03_0031_copy_into_user_stage +++ b/tests/sqllogictests/suites/base/03_common/03_0031_copy_into_user_stage @@ -28,7 +28,7 @@ SELECT COUNT() FROM test_table 4 statement ok -drop table test_table +drop table test_table all statement ok DROP DATABASE db1 diff --git a/tests/sqllogictests/suites/base/03_common/03_0035_update b/tests/sqllogictests/suites/base/03_common/03_0035_update index f347f054432ae..25d88b78d7d6a 100644 --- a/tests/sqllogictests/suites/base/03_common/03_0035_update +++ b/tests/sqllogictests/suites/base/03_common/03_0035_update @@ -89,13 +89,13 @@ select a from t3 6 statement ok -drop table t1 +drop table t1 all statement ok -drop table t2 +drop table t2 all statement ok -drop table t3 +drop table t3 all statement ok create table t1(id1 int, val1 varchar(255)); diff --git a/tests/sqllogictests/suites/base/05_ddl/05_0001_ddl_drop_table_full b/tests/sqllogictests/suites/base/05_ddl/05_0001_ddl_drop_table_full index 35cf934d75ed8..5be01f171242e 100644 --- a/tests/sqllogictests/suites/base/05_ddl/05_0001_ddl_drop_table_full +++ b/tests/sqllogictests/suites/base/05_ddl/05_0001_ddl_drop_table_full @@ -11,13 +11,13 @@ statement ok CREATE TABLE t(c1 int) ENGINE = Null statement ok -DROP TABLE t +DROP TABLE t ALL statement ok CREATE TABLE t(c1 int) ENGINE = Fuse statement ok -DROP TABLE t +DROP TABLE t ALL statement ok DROP database db_13_0001 diff --git a/tests/sqllogictests/suites/base/05_ddl/05_0023_exists_table b/tests/sqllogictests/suites/base/05_ddl/05_0023_exists_table index 80bcb8cbfe49b..971e21f68fbc4 100644 --- a/tests/sqllogictests/suites/base/05_ddl/05_0023_exists_table +++ b/tests/sqllogictests/suites/base/05_ddl/05_0023_exists_table @@ -23,7 +23,7 @@ statement ok EXISTS TABLE db_05_0023_v2.t statement ok -DROP TABLE t +DROP TABLE t ALL statement ok EXISTS TABLE db_05_0023_v2.t diff --git a/tests/sqllogictests/suites/base/09_fuse_engine/09_0007_func_fuse_truncate b/tests/sqllogictests/suites/base/09_fuse_engine/09_0007_func_fuse_truncate_purge similarity index 100% rename from tests/sqllogictests/suites/base/09_fuse_engine/09_0007_func_fuse_truncate rename to tests/sqllogictests/suites/base/09_fuse_engine/09_0007_func_fuse_truncate_purge diff --git a/tests/sqllogictests/suites/base/09_fuse_engine/09_0017_transient_table b/tests/sqllogictests/suites/base/09_fuse_engine/09_0017_transient_table index 52d2b201306be..50a3db5b52a05 100644 --- a/tests/sqllogictests/suites/base/09_fuse_engine/09_0017_transient_table +++ b/tests/sqllogictests/suites/base/09_fuse_engine/09_0017_transient_table @@ -38,3 +38,4 @@ DROP TABLE t09_0016 statement ok DROP DATABASE db1 + diff --git a/tests/sqllogictests/suites/base/12_time_travel/12_0003_time_travel_undrop b/tests/sqllogictests/suites/base/12_time_travel/12_0003_time_travel_undrop index 50acc17bf61cd..0f0609ace3e88 100644 --- a/tests/sqllogictests/suites/base/12_time_travel/12_0003_time_travel_undrop +++ b/tests/sqllogictests/suites/base/12_time_travel/12_0003_time_travel_undrop @@ -103,5 +103,22 @@ SELECT count(1) FROM t statement ok DROP TABLE t +statement ok +CREATE TABLE t(c int) + +statement ok +INSERT INTO t values(1) + +statement ok +DROP TABLE t ALL + +statement ok +UNDROP TABLE t + +query I +SELECT count(*) FROM t +---- +0 + statement ok DROP database db_12_0003 diff --git a/tests/sqllogictests/suites/base/issues/issue_10103.test b/tests/sqllogictests/suites/base/issues/issue_10103.test index 3be0dad320346..f617f68c50e81 100644 --- a/tests/sqllogictests/suites/base/issues/issue_10103.test +++ b/tests/sqllogictests/suites/base/issues/issue_10103.test @@ -34,10 +34,10 @@ SELECT ts FROM test_ts_table LIMIT 1 2023-02-19 11:18:01.000000 statement ok -drop table test_table +drop table test_table all statement ok -drop table test_ts_table +drop table test_ts_table all statement ok drop stage test_10103 diff --git a/tests/sqllogictests/suites/duckdb/sql/aggregate/group/group_by_grouping_sets.test b/tests/sqllogictests/suites/duckdb/sql/aggregate/group/group_by_grouping_sets.test index 4bfb3f29314e1..e19ae1bf808eb 100644 --- a/tests/sqllogictests/suites/duckdb/sql/aggregate/group/group_by_grouping_sets.test +++ b/tests/sqllogictests/suites/duckdb/sql/aggregate/group/group_by_grouping_sets.test @@ -245,10 +245,10 @@ a B 1 5 NULL B a A 1 5 NULL NULL statement ok -drop table t; +drop table t all; statement ok -drop table tt; +drop table tt all; statement ok drop database grouping_sets; diff --git a/tests/sqllogictests/suites/mode/cluster/04_0002_explain_v2.test b/tests/sqllogictests/suites/mode/cluster/04_0002_explain_v2.test index 3c7300f00ddd7..c48c284d5f33a 100644 --- a/tests/sqllogictests/suites/mode/cluster/04_0002_explain_v2.test +++ b/tests/sqllogictests/suites/mode/cluster/04_0002_explain_v2.test @@ -2,10 +2,10 @@ statement ok set prefer_broadcast_join = 0 statement ok -drop table if exists t1; +drop table if exists t1 all; statement ok -drop table if exists t2; +drop table if exists t2 all; statement ok create table t1(a int not null, b int not null); diff --git a/tests/sqllogictests/suites/mode/standalone/explain/explain.test b/tests/sqllogictests/suites/mode/standalone/explain/explain.test index 6a3bff0473b1e..d800c2ed23bbf 100644 --- a/tests/sqllogictests/suites/mode/standalone/explain/explain.test +++ b/tests/sqllogictests/suites/mode/standalone/explain/explain.test @@ -1,8 +1,8 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok -drop table if exists t2 +drop table if exists t2 all statement ok create table t1 as select number as a, number as b from numbers(1) diff --git a/tests/sqllogictests/suites/mode/standalone/explain_native/explain.test b/tests/sqllogictests/suites/mode/standalone/explain_native/explain.test index 0a9cbd5809df4..bd2f6f0459d6e 100644 --- a/tests/sqllogictests/suites/mode/standalone/explain_native/explain.test +++ b/tests/sqllogictests/suites/mode/standalone/explain_native/explain.test @@ -1,8 +1,8 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok -drop table if exists t2 +drop table if exists t2 all statement ok create table t1 as select number as a, number as b from numbers(1) diff --git a/tests/sqllogictests/suites/query/02_function/02_0012_function_datetimes b/tests/sqllogictests/suites/query/02_function/02_0012_function_datetimes index 646c3355004ed..9f9607c8c2e63 100644 --- a/tests/sqllogictests/suites/query/02_function/02_0012_function_datetimes +++ b/tests/sqllogictests/suites/query/02_function/02_0012_function_datetimes @@ -1,5 +1,5 @@ statement ok -drop table if exists t +drop table if exists t all statement ok set timezone = 'UTC' diff --git a/tests/sqllogictests/suites/query/02_function/02_0012_function_datetimes_tz b/tests/sqllogictests/suites/query/02_function/02_0012_function_datetimes_tz index cd751f969ee3b..765c124cbf74e 100644 --- a/tests/sqllogictests/suites/query/02_function/02_0012_function_datetimes_tz +++ b/tests/sqllogictests/suites/query/02_function/02_0012_function_datetimes_tz @@ -1,5 +1,5 @@ statement ok -drop table if exists tt +drop table if exists tt all statement ok set timezone='UTC' diff --git a/tests/sqllogictests/suites/query/02_function/02_0014_function_maths b/tests/sqllogictests/suites/query/02_function/02_0014_function_maths index 6325dc32dbbcc..e88a7c4cb3f77 100644 --- a/tests/sqllogictests/suites/query/02_function/02_0014_function_maths +++ b/tests/sqllogictests/suites/query/02_function/02_0014_function_maths @@ -1,5 +1,5 @@ statement ok -drop table if exists math_sample_numbers +drop table if exists math_sample_numbers all statement ok CREATE TABLE math_sample_numbers (timestamp UInt32, value Int32) Engine = Fuse diff --git a/tests/sqllogictests/suites/query/02_function/02_0018_function_strings_repeat b/tests/sqllogictests/suites/query/02_function/02_0018_function_strings_repeat index 7e6bcdbafe206..a2c3ba90ad7ea 100644 --- a/tests/sqllogictests/suites/query/02_function/02_0018_function_strings_repeat +++ b/tests/sqllogictests/suites/query/02_function/02_0018_function_strings_repeat @@ -1,14 +1,14 @@ statement ok -drop table if exists strings_repeat_sample_u8 +drop table if exists strings_repeat_sample_u8 all statement ok -drop table if exists strings_repeat_sample_u16 +drop table if exists strings_repeat_sample_u16 all statement ok -drop table if exists strings_repeat_sample_u32 +drop table if exists strings_repeat_sample_u32 all statement ok -drop table if exists strings_repeat_sample_u64 +drop table if exists strings_repeat_sample_u64 all statement ok CREATE TABLE strings_repeat_sample_u8(s String, n Uint8) Engine = Fuse diff --git a/tests/sqllogictests/suites/query/02_function/02_0048_function_semi_structureds_object_keys b/tests/sqllogictests/suites/query/02_function/02_0048_function_semi_structureds_object_keys index af71632ed5cea..d475a1a6839c9 100644 --- a/tests/sqllogictests/suites/query/02_function/02_0048_function_semi_structureds_object_keys +++ b/tests/sqllogictests/suites/query/02_function/02_0048_function_semi_structureds_object_keys @@ -1,5 +1,5 @@ statement ok -drop table if exists objects_test1 +drop table if exists objects_test1 all statement ok CREATE TABLE IF NOT EXISTS objects_test1(id TINYINT, obj VARIANT, var VARIANT) Engine = Fuse diff --git a/tests/sqllogictests/suites/query/cte.test b/tests/sqllogictests/suites/query/cte.test index 9df89c397fc6d..4ffcf46b2de4f 100644 --- a/tests/sqllogictests/suites/query/cte.test +++ b/tests/sqllogictests/suites/query/cte.test @@ -2,7 +2,7 @@ statement ok use default statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer, b integer, c integer, d integer, e integer) diff --git a/tests/sqllogictests/suites/query/render_result.test b/tests/sqllogictests/suites/query/render_result.test index bfb960bf447c5..aef7151accd15 100644 --- a/tests/sqllogictests/suites/query/render_result.test +++ b/tests/sqllogictests/suites/query/render_result.test @@ -2,7 +2,7 @@ statement ok use default statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer, b integer, c integer, d integer, e integer) @@ -30,4 +30,4 @@ order by col1,col5,col3,col2,col4 106 1 333 1067 109 statement ok -drop table if exists t1 +drop table if exists t1 all diff --git a/tests/sqllogictests/suites/ydb/select1-1.test b/tests/sqllogictests/suites/ydb/select1-1.test index 0d03904585911..766b453628070 100644 --- a/tests/sqllogictests/suites/ydb/select1-1.test +++ b/tests/sqllogictests/suites/ydb/select1-1.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer, b integer, c integer, d integer, e integer) diff --git a/tests/sqllogictests/suites/ydb/select1-2.test b/tests/sqllogictests/suites/ydb/select1-2.test index 6093d3b5d977c..b8eb368081433 100644 --- a/tests/sqllogictests/suites/ydb/select1-2.test +++ b/tests/sqllogictests/suites/ydb/select1-2.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer, b integer, c integer, d integer, e integer) diff --git a/tests/sqllogictests/suites/ydb/select1-3.test b/tests/sqllogictests/suites/ydb/select1-3.test index 7ebd1a7dc9fa2..4d3b407c6f043 100644 --- a/tests/sqllogictests/suites/ydb/select1-3.test +++ b/tests/sqllogictests/suites/ydb/select1-3.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer, b integer, c integer, d integer, e integer) diff --git a/tests/sqllogictests/suites/ydb/select1-4.test b/tests/sqllogictests/suites/ydb/select1-4.test index b6906faa30d23..49a214f8502e3 100644 --- a/tests/sqllogictests/suites/ydb/select1-4.test +++ b/tests/sqllogictests/suites/ydb/select1-4.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer, b integer, c integer, d integer, e integer) diff --git a/tests/sqllogictests/suites/ydb/select1-5.test b/tests/sqllogictests/suites/ydb/select1-5.test index dcf4708612d2b..4be2a249bfe16 100644 --- a/tests/sqllogictests/suites/ydb/select1-5.test +++ b/tests/sqllogictests/suites/ydb/select1-5.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer, b integer, c integer, d integer, e integer) diff --git a/tests/sqllogictests/suites/ydb/select2-1.test b/tests/sqllogictests/suites/ydb/select2-1.test index 9b45f459106ea..36cf9b00c8e96 100644 --- a/tests/sqllogictests/suites/ydb/select2-1.test +++ b/tests/sqllogictests/suites/ydb/select2-1.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select2-2.test b/tests/sqllogictests/suites/ydb/select2-2.test index 3ff660a15473f..9d54719468051 100644 --- a/tests/sqllogictests/suites/ydb/select2-2.test +++ b/tests/sqllogictests/suites/ydb/select2-2.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select2-3.test b/tests/sqllogictests/suites/ydb/select2-3.test index 3309b5d1b6b85..8261386c5567b 100644 --- a/tests/sqllogictests/suites/ydb/select2-3.test +++ b/tests/sqllogictests/suites/ydb/select2-3.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select2-4.test b/tests/sqllogictests/suites/ydb/select2-4.test index 2161ba0209783..0cf264950b1fb 100644 --- a/tests/sqllogictests/suites/ydb/select2-4.test +++ b/tests/sqllogictests/suites/ydb/select2-4.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select2-5.test b/tests/sqllogictests/suites/ydb/select2-5.test index 10b98ba17e164..c992d31c3c2d8 100644 --- a/tests/sqllogictests/suites/ydb/select2-5.test +++ b/tests/sqllogictests/suites/ydb/select2-5.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-1.test b/tests/sqllogictests/suites/ydb/select3-1.test index 0730743748315..22456c0cd6c9f 100644 --- a/tests/sqllogictests/suites/ydb/select3-1.test +++ b/tests/sqllogictests/suites/ydb/select3-1.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-10.test b/tests/sqllogictests/suites/ydb/select3-10.test index c1f1216ab432b..9866756f89099 100644 --- a/tests/sqllogictests/suites/ydb/select3-10.test +++ b/tests/sqllogictests/suites/ydb/select3-10.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-11.test b/tests/sqllogictests/suites/ydb/select3-11.test index e3e6d6b63fd75..1a446a863362f 100644 --- a/tests/sqllogictests/suites/ydb/select3-11.test +++ b/tests/sqllogictests/suites/ydb/select3-11.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-12.test b/tests/sqllogictests/suites/ydb/select3-12.test index 708709884737f..041169ab4421a 100644 --- a/tests/sqllogictests/suites/ydb/select3-12.test +++ b/tests/sqllogictests/suites/ydb/select3-12.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-13.test b/tests/sqllogictests/suites/ydb/select3-13.test index ae77d1da83224..4f0d2d708804a 100644 --- a/tests/sqllogictests/suites/ydb/select3-13.test +++ b/tests/sqllogictests/suites/ydb/select3-13.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-14.test b/tests/sqllogictests/suites/ydb/select3-14.test index 1b62d6d12f153..223a247e9df14 100644 --- a/tests/sqllogictests/suites/ydb/select3-14.test +++ b/tests/sqllogictests/suites/ydb/select3-14.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-15.test b/tests/sqllogictests/suites/ydb/select3-15.test index cf6c1fab47d24..4c814cf69207d 100644 --- a/tests/sqllogictests/suites/ydb/select3-15.test +++ b/tests/sqllogictests/suites/ydb/select3-15.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-2.test b/tests/sqllogictests/suites/ydb/select3-2.test index f5e46aca3f4a1..e6b89c287891e 100644 --- a/tests/sqllogictests/suites/ydb/select3-2.test +++ b/tests/sqllogictests/suites/ydb/select3-2.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-3.test b/tests/sqllogictests/suites/ydb/select3-3.test index feb46d3a94dbd..bd6c1fcaa9aa0 100644 --- a/tests/sqllogictests/suites/ydb/select3-3.test +++ b/tests/sqllogictests/suites/ydb/select3-3.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-4.test b/tests/sqllogictests/suites/ydb/select3-4.test index e3dd6076aa0a8..0ff745810507c 100644 --- a/tests/sqllogictests/suites/ydb/select3-4.test +++ b/tests/sqllogictests/suites/ydb/select3-4.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-5.test b/tests/sqllogictests/suites/ydb/select3-5.test index a9913c947404f..259d23e75d5ba 100644 --- a/tests/sqllogictests/suites/ydb/select3-5.test +++ b/tests/sqllogictests/suites/ydb/select3-5.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-6.test b/tests/sqllogictests/suites/ydb/select3-6.test index 312d01a101a18..4877d88766094 100644 --- a/tests/sqllogictests/suites/ydb/select3-6.test +++ b/tests/sqllogictests/suites/ydb/select3-6.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-7.test b/tests/sqllogictests/suites/ydb/select3-7.test index 477e9ea78503e..a2e5a8d5ddaa5 100644 --- a/tests/sqllogictests/suites/ydb/select3-7.test +++ b/tests/sqllogictests/suites/ydb/select3-7.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-8.test b/tests/sqllogictests/suites/ydb/select3-8.test index 855703744f49a..37e3828f498ce 100644 --- a/tests/sqllogictests/suites/ydb/select3-8.test +++ b/tests/sqllogictests/suites/ydb/select3-8.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/sqllogictests/suites/ydb/select3-9.test b/tests/sqllogictests/suites/ydb/select3-9.test index 01b582ab3fa29..f42942c264d91 100644 --- a/tests/sqllogictests/suites/ydb/select3-9.test +++ b/tests/sqllogictests/suites/ydb/select3-9.test @@ -1,5 +1,5 @@ statement ok -drop table if exists t1 +drop table if exists t1 all statement ok create table t1(a integer null, b integer null, c integer null, d integer null, e integer null) diff --git a/tests/suites/0_stateless/17_altertable/17_0002_alter_table_purge_before.sh b/tests/suites/0_stateless/17_altertable/17_0002_alter_table_purge_before.sh index 93644ecfd07d2..85f385032306e 100755 --- a/tests/suites/0_stateless/17_altertable/17_0002_alter_table_purge_before.sh +++ b/tests/suites/0_stateless/17_altertable/17_0002_alter_table_purge_before.sh @@ -46,7 +46,7 @@ echo "checking that after purge (by snapshot id) there should be 4 rows left" echo "select count(*)=4 from t17_0002" | $MYSQL_CLIENT_CONNECT ## Drop table. -echo "drop table t17_0002" | $MYSQL_CLIENT_CONNECT +echo "drop table t17_0002 all" | $MYSQL_CLIENT_CONNECT # PURGE BEFORE TIMESTAMP @@ -90,4 +90,4 @@ echo "checking that after purge (by timestamp) there should be 5 rows left" echo "select count(*)=5 from t17_0002" | $MYSQL_CLIENT_CONNECT ## Drop table. -echo "drop table t17_0002" | $MYSQL_CLIENT_CONNECT +echo "drop table t17_0002 all" | $MYSQL_CLIENT_CONNECT diff --git a/tests/suites/0_stateless/17_altertable/17_0003_alter_table_update.sh b/tests/suites/0_stateless/17_altertable/17_0003_alter_table_update.sh index 583cfb563b3a0..fa884b01df132 100755 --- a/tests/suites/0_stateless/17_altertable/17_0003_alter_table_update.sh +++ b/tests/suites/0_stateless/17_altertable/17_0003_alter_table_update.sh @@ -25,7 +25,7 @@ echo "update table column" echo "update t17_0003 set c=2 where c=1" | $MYSQL_CLIENT_CONNECT ## Drop table. -echo "drop table t17_0003" | $MYSQL_CLIENT_CONNECT +echo "drop table t17_0003 all" | $MYSQL_CLIENT_CONNECT ## create two column table echo "create table t17_0003(a int not null, b int not null)" | $MYSQL_CLIENT_CONNECT @@ -50,4 +50,4 @@ echo "update table column" echo "update t17_0003 set a=3 where a=1" | $MYSQL_CLIENT_CONNECT ## Drop table. -echo "drop table t17_0003" | $MYSQL_CLIENT_CONNECT +echo "drop table t17_0003 all" | $MYSQL_CLIENT_CONNECT \ No newline at end of file diff --git a/tests/suites/0_stateless/20+_others/20_0011_purge_before.sh b/tests/suites/0_stateless/20+_others/20_0011_purge_before.sh index 49d136e729c40..4980aa0d98857 100755 --- a/tests/suites/0_stateless/20+_others/20_0011_purge_before.sh +++ b/tests/suites/0_stateless/20+_others/20_0011_purge_before.sh @@ -31,7 +31,7 @@ echo "checking that after purge (by snapshot id) there should be 4 rows left" echo "select count(*)=4 from t20_0011" | $MYSQL_CLIENT_CONNECT ## Drop table. -echo "drop table t20_0011" | $MYSQL_CLIENT_CONNECT +echo "drop table t20_0011 all" | $MYSQL_CLIENT_CONNECT # PURGE BEFORE TIMESTAMP @@ -58,4 +58,4 @@ echo "checking that after purge (by timestamp) there should be 4 rows left" echo "select count(*)=4 from t20_0011" | $MYSQL_CLIENT_CONNECT ## Drop table. -echo "drop table t20_0011" | $MYSQL_CLIENT_CONNECT +echo "drop table t20_0011 all" | $MYSQL_CLIENT_CONNECT diff --git a/tests/suites/0_stateless/20+_others/20_0012_privilege_access.sh b/tests/suites/0_stateless/20+_others/20_0012_privilege_access.sh index c766b6005b5b3..134e1f1c5efd3 100755 --- a/tests/suites/0_stateless/20+_others/20_0012_privilege_access.sh +++ b/tests/suites/0_stateless/20+_others/20_0012_privilege_access.sh @@ -113,9 +113,9 @@ echo "GRANT SELECT ON system.fuse_block TO 'test-user'" | $MYSQL_CLIENT_CONNECT echo "select count(*)>=1 from fuse_block('default', 't20_0012_a')" | $TEST_USER_CONNECT ## Drop table. -echo "drop table default.t20_0012" | $MYSQL_CLIENT_CONNECT -echo "drop table default.t20_0012_a" | $MYSQL_CLIENT_CONNECT -echo "drop table default.t20_0012_b" | $MYSQL_CLIENT_CONNECT +echo "drop table default.t20_0012 all" | $MYSQL_CLIENT_CONNECT +echo "drop table default.t20_0012_a all" | $MYSQL_CLIENT_CONNECT +echo "drop table default.t20_0012_b all" | $MYSQL_CLIENT_CONNECT echo "drop view default2.v_t20_0012" | $MYSQL_CLIENT_CONNECT ## Drop database. diff --git a/tests/suites/1_stateful/04_mini_dataset/04_0000_mini_ontime.sh b/tests/suites/1_stateful/04_mini_dataset/04_0000_mini_ontime.sh index acf4a58613f73..707acc4db0d06 100755 --- a/tests/suites/1_stateful/04_mini_dataset/04_0000_mini_ontime.sh +++ b/tests/suites/1_stateful/04_mini_dataset/04_0000_mini_ontime.sh @@ -28,4 +28,4 @@ for i in "${ontime_statements[@]}"; do done ## Clean table -echo "drop table if exists ontime_mini;" | $MYSQL_CLIENT_CONNECT +echo "drop table if exists ontime_mini all;" | $MYSQL_CLIENT_CONNECT diff --git a/tests/suites/1_stateful/04_mini_dataset/04_0001_mini_hits.sh b/tests/suites/1_stateful/04_mini_dataset/04_0001_mini_hits.sh index e5a7e3ffa2440..291ad00c80f22 100755 --- a/tests/suites/1_stateful/04_mini_dataset/04_0001_mini_hits.sh +++ b/tests/suites/1_stateful/04_mini_dataset/04_0001_mini_hits.sh @@ -105,4 +105,4 @@ for i in "${hits_statements[@]}"; do done ## Clean up -echo "drop table if exists hits;" | $MYSQL_CLIENT_CONNECT +echo "drop table if exists hits all;" | $MYSQL_CLIENT_CONNECT diff --git a/tests/suites/1_stateful/05_formats/05_01_compact/05_01_00_load_compact_copy.sh b/tests/suites/1_stateful/05_formats/05_01_compact/05_01_00_load_compact_copy.sh index be21f27434c95..bd847a61660b0 100755 --- a/tests/suites/1_stateful/05_formats/05_01_compact/05_01_00_load_compact_copy.sh +++ b/tests/suites/1_stateful/05_formats/05_01_compact/05_01_00_load_compact_copy.sh @@ -10,7 +10,7 @@ for j in $(seq 1 1000);do printf "0123456789\n" >> "$DATA" done -echo "drop table if exists t1" | $MYSQL_CLIENT_CONNECT +echo "drop table if exists t1 all" | $MYSQL_CLIENT_CONNECT echo "CREATE TABLE t1 ( c0 string diff --git a/tests/suites/1_stateful/05_formats/05_01_compact/05_01_01_load_compact_streaming_load.sh b/tests/suites/1_stateful/05_formats/05_01_compact/05_01_01_load_compact_streaming_load.sh index ef82801b44351..2b37912014b9c 100755 --- a/tests/suites/1_stateful/05_formats/05_01_compact/05_01_01_load_compact_streaming_load.sh +++ b/tests/suites/1_stateful/05_formats/05_01_compact/05_01_01_load_compact_streaming_load.sh @@ -10,7 +10,7 @@ for j in $(seq 1 1000);do printf "0123456789\n" >> "$DATA" done -echo "drop table if exists t1" | $MYSQL_CLIENT_CONNECT +echo "drop table if exists t1 all" | $MYSQL_CLIENT_CONNECT echo "CREATE TABLE t1 ( c0 string diff --git a/tests/suites/1_stateful/05_formats/05_01_compact/05_01_02_load_compact_copy_max_size.sh b/tests/suites/1_stateful/05_formats/05_01_compact/05_01_02_load_compact_copy_max_size.sh index 2c2a0c6ebda10..4f9c131b9a899 100755 --- a/tests/suites/1_stateful/05_formats/05_01_compact/05_01_02_load_compact_copy_max_size.sh +++ b/tests/suites/1_stateful/05_formats/05_01_compact/05_01_02_load_compact_copy_max_size.sh @@ -11,7 +11,7 @@ for j in $(seq 1 1000);do printf "0123456789\n" >> "$DATA" done -echo "drop table if exists t1" | $MYSQL_CLIENT_CONNECT +echo "drop table if exists t1 all" | $MYSQL_CLIENT_CONNECT echo "CREATE TABLE t1 ( c0 string diff --git a/tests/suites/1_stateful/05_formats/05_01_compact/05_01_02_load_compact_copy_row_per_block.sh b/tests/suites/1_stateful/05_formats/05_01_compact/05_01_02_load_compact_copy_row_per_block.sh index 9f8fdbfd8c1d0..087fbcd550bf9 100755 --- a/tests/suites/1_stateful/05_formats/05_01_compact/05_01_02_load_compact_copy_row_per_block.sh +++ b/tests/suites/1_stateful/05_formats/05_01_compact/05_01_02_load_compact_copy_row_per_block.sh @@ -11,7 +11,7 @@ for j in $(seq 1 1000);do printf "0123456789\n" >> "$DATA" done -echo "drop table if exists t1" | $MYSQL_CLIENT_CONNECT +echo "drop table if exists t1 all" | $MYSQL_CLIENT_CONNECT echo "CREATE TABLE t1 ( c0 string