Skip to content

Commit

Permalink
fix: correct schema_name
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed May 27, 2024
1 parent 12afdcc commit d5ea974
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests-fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workspace = true
cargo-fuzz = true

[features]
default = []
default = ["unstable"]
unstable = ["nix"]

[dependencies]
Expand Down
12 changes: 8 additions & 4 deletions tests-fuzz/targets/unstable/fuzz_create_table_standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async fn execute_unstable_create_table(
Ok(result) => {
let state = *rx.borrow();
table_states.insert(table_name, state);
validate_columns(&ctx.greptime, &table_ctx).await;
validate_columns(&ctx.greptime, FUZZ_TESTS_DATABASE.to_string(), &table_ctx).await;
info!("Create table: {sql}, result: {result:?}");
}
Err(err) => {
Expand Down Expand Up @@ -191,10 +191,14 @@ async fn execute_unstable_create_table(
Ok(())
}

async fn validate_columns(client: &Pool<MySql>, table_ctx: &TableContext) {
async fn validate_columns(client: &Pool<MySql>, schema_name: String, table_ctx: &TableContext) {
loop {
match validator::column::fetch_columns(client, "public".into(), table_ctx.name.clone())
.await
match validator::column::fetch_columns(
client,
schema_name.clone().into(),
table_ctx.name.clone(),
)
.await
{
Ok(mut column_entries) => {
column_entries.sort_by(|a, b| a.column_name.cmp(&b.column_name));
Expand Down

0 comments on commit d5ea974

Please sign in to comment.