diff options
-rw-r--r-- | project2/common/execContext.cpp | 2 | ||||
-rw-r--r-- | project2/sql/sqlMergeTask.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/project2/common/execContext.cpp b/project2/common/execContext.cpp index 462de8b..bbec92a 100644 --- a/project2/common/execContext.cpp +++ b/project2/common/execContext.cpp @@ -50,7 +50,7 @@ ExecContext::RowValuesPop() const RowState * ExecContext::RowValues(size_t depth) const { - if (depth > rowValuesStack.size()) { + if (depth < 1 || depth > rowValuesStack.size()) { throw RowSet::ParentOutOfRange(depth); } return rowValuesStack.at(rowValuesStack.size() - depth); diff --git a/project2/sql/sqlMergeTask.cpp b/project2/sql/sqlMergeTask.cpp index 54d4baf..91bf3e0 100644 --- a/project2/sql/sqlMergeTask.cpp +++ b/project2/sql/sqlMergeTask.cpp @@ -276,7 +276,7 @@ class Populate : public NoOutputExecute { void execute(ExecContext * ec) const { unsigned int idx = 0; - ec->RowValues(0)->foreachColumn(ec, boost::bind(&Populate::bind, this, boost::ref(idx), _3)); + ec->RowValues(1)->foreachColumn(ec, boost::bind(&Populate::bind, this, boost::ref(idx), _3)); cmd->execute(); } private: |