diff --git a/tests-fuzz/README.md b/tests-fuzz/README.md index 99786c5d4201..ac357f6cc783 100644 --- a/tests-fuzz/README.md +++ b/tests-fuzz/README.md @@ -14,6 +14,14 @@ Set the GreptimeDB MySQL address. ``` GT_MYSQL_ADDR = localhost:4002 ``` +and http address: +``` +GT_HTTP_ADDR=localhost:4000 +``` +and fuzz build path when compiling the fuzzer using `cargo fuzz`(if you want to keep the build dir clean): +``` +CARGO_TARGET_DIR="fuzz_build" +``` ### For unstable fuzz tests Set the binary path of the GreptimeDB: diff --git a/tests-fuzz/src/ir.rs b/tests-fuzz/src/ir.rs index 3e6af87002f0..a77ba7ba17c5 100644 --- a/tests-fuzz/src/ir.rs +++ b/tests-fuzz/src/ir.rs @@ -24,7 +24,7 @@ use std::collections::HashMap; use std::sync::{Arc, Mutex}; use std::time::Duration; -pub use alter_expr::{AlterTableExpr, AlterTableOption, AlterTableOperation}; +pub use alter_expr::{AlterTableExpr, AlterTableOperation, AlterTableOption}; use common_time::timestamp::TimeUnit; use common_time::{Date, DateTime, Timestamp}; pub use create_expr::{CreateDatabaseExpr, CreateTableExpr}; diff --git a/tests-fuzz/targets/fuzz_concurr_alter_table.rs b/tests-fuzz/targets/fuzz_concurr_alter_table.rs index 626a9afe573f..2362867ec73b 100644 --- a/tests-fuzz/targets/fuzz_concurr_alter_table.rs +++ b/tests-fuzz/targets/fuzz_concurr_alter_table.rs @@ -139,7 +139,7 @@ async fn unstable_execute_parallel_alter_table(ctx: FuzzContext, input: FuzzInpu let mut action = 0; while action < input.actions { let expr = generate_alter_table_add_column_expr(table_ctx.clone(), &mut rng).unwrap(); - if let AlterTableOperation::AddColumn { column, .. } = &expr.alter_options { + if let AlterTableOperation::AddColumn { column, .. } = &expr.alter_kinds { if used_column_names.contains(&column.name) { info!("Column name already used: {}, retrying", column.name.value); continue; @@ -149,7 +149,7 @@ async fn unstable_execute_parallel_alter_table(ctx: FuzzContext, input: FuzzInpu } let translator = AlterTableExprTranslator; let sql = translator.translate(&expr)?; - if let AlterTableOperation::AddColumn { .. } = expr.alter_options { + if let AlterTableOperation::AddColumn { .. } = expr.alter_kinds { // Applies changes after_all_alter_table_ctx = Arc::new( Arc::unwrap_or_clone(after_all_alter_table_ctx)