Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 8bf071b

Browse files
committed
Fix vector sizing bug (heap corruption)
1 parent 6bf46e9 commit 8bf071b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/planner/insert_plan.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ InsertPlan::InsertPlan(storage::DataTable *table,
4242
bool is_prepared_stmt = false;
4343
auto *schema = target_table_->GetSchema();
4444
auto schema_col_count = schema->GetColumnCount();
45-
vtos_.resize(insert_values->size());
45+
vtos_.resize(columns->size());
4646
// initialize mapping from schema cols to insert values vector.
4747
// will be updated later based on insert columns and values
4848
stov_.resize(schema_col_count);
@@ -154,7 +154,6 @@ void InsertPlan::ProcessColumnSpec(const std::vector<std::string> *columns) {
154154

155155
// determine index of column in schema
156156
bool found_col = FindSchemaColIndex(col_name, table_columns, idx);
157-
// PL_ASSERT(found_col == true);
158157
if (not found_col) {
159158
throw Exception("column " + col_name + " not in table " +
160159
target_table_->GetName() + " columns");

0 commit comments

Comments
 (0)