Skip to content

Commit

Permalink
Merge "tp: partially revert aosp/2977479" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Treehugger Robot authored and Gerrit Code Review committed Mar 4, 2024
2 parents 0be7bdd + 4f8f413 commit e6db6e7
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -499,15 +499,9 @@ base::Status PerfettoSqlEngine::ExecuteCreateTable(
runtime_tables_.Insert(create_table.name, std::move(table));
base::StackString<1024> create("CREATE VIRTUAL TABLE %s USING runtime_table",
create_table.name.c_str());
auto status =
Execute(SqlSource::FromTraceProcessorImplementation(create.ToStdString()))
.status();
if (!status.ok()) {
// If the registration of the table with SQLite failed, erase the state
// we hold.
PERFETTO_CHECK(runtime_tables_.Erase(create_table.name));
}
return status;
return Execute(
SqlSource::FromTraceProcessorImplementation(create.ToStdString()))
.status();
}

base::Status PerfettoSqlEngine::ExecuteCreateView(
Expand Down Expand Up @@ -734,16 +728,10 @@ base::Status PerfettoSqlEngine::ExecuteCreateFunction(

base::StackString<1024> create(
"CREATE VIRTUAL TABLE %s USING runtime_table_function", fn_name.c_str());
auto status = Execute(cf.sql.RewriteAllIgnoreExisting(
SqlSource::FromTraceProcessorImplementation(
create.ToStdString())))
.status();
if (!status.ok()) {
// If the registration of the table with SQLite failed, erase the state
// we hold.
PERFETTO_CHECK(runtime_table_fn_states_.Erase(lower_name));
}
return status;
return Execute(cf.sql.RewriteAllIgnoreExisting(
SqlSource::FromTraceProcessorImplementation(
create.ToStdString())))
.status();
}

base::Status PerfettoSqlEngine::ExecuteCreateMacro(
Expand Down

0 comments on commit e6db6e7

Please sign in to comment.