Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Do not update session when use space, the sessions will update at the… #1355

Merged
merged 2 commits into from
Sep 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/validator/UseValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#include "validator/UseValidator.h"
#include "parser/TraverseSentences.h"
#include "planner/plan/Admin.h"
#include "planner/plan/Logic.h"
#include "planner/plan/Query.h"
#include "planner/plan/Admin.h"

namespace nebula {
namespace graph {
Expand Down Expand Up @@ -42,12 +42,9 @@ Status UseValidator::validateImpl() {

Status UseValidator::toPlan() {
// The input will be set by father validator later.
auto switchSpace = SwitchSpace::make(qctx_, nullptr, *spaceName_);
qctx_->rctx()->session()->updateSpaceName(*spaceName_);
auto session = qctx_->rctx()->session()->getSession();
auto update = UpdateSession::make(qctx_, switchSpace, std::move(session));
root_ = update;
tail_ = switchSpace;
auto reg = SwitchSpace::make(qctx_, nullptr, *spaceName_);
root_ = reg;
tail_ = root_;
return Status::OK();
}
} // namespace graph
Expand Down