Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stonedb): Fix the crash in Query::Compile due to accessing nullptr #541

Closed
andyli029 opened this issue Sep 22, 2022 · 1 comment
Closed
Assignees
Labels
A-feature feature with good idea C-stonedb-8.0 associated with stonedb 8.0

Comments

@andyli029
Copy link
Contributor

andyli029 commented Sep 22, 2022

Is your feature request related to a problem? Please describe.

TODO:
Need to verify: sl->join and handle it:

    if (!sl->join)
		{
// stonedb8 start
      TIANMU_LOG(LogCtl_Level::ERROR, "sl->join is nil!!!!");

//            sl->add_active_options(SELECT_NO_UNLOCK);
//            JOIN *join = new JOIN(sl->master_unit()->thd, sl);
//
//            if (!join) {
//
//                sl->cleanup(0);
//                return true;
//            }
//            sl->set_join(join);
// stonedb8 end

In stonedb 5.7, we createa a new join object, but we still do not know the root cause why join is a null object. Therefore, here, we do not new a new join object to find the root cause. 

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->

@andyli029 andyli029 added A-feature feature with good idea C-stonedb-8.0 associated with stonedb 8.0 labels Sep 22, 2022
@andyli029 andyli029 added this to the stonedb_8.0_v1.0.0 milestone Sep 22, 2022
@RingsC RingsC changed the title StoneDB 8.0: Fix Query::Compile from query_compile.cpp feat(stonedb): Fix the crash in Query::Compile due to accessing nullptr Sep 26, 2022
@RingsC RingsC self-assigned this Sep 27, 2022
@RingsC
Copy link
Contributor

RingsC commented Sep 28, 2022

We will delete the added codes to find out the root cause: why join is nullptr.

mergify bot pushed a commit that referenced this issue Oct 3, 2022
In order to find out the root cause of why the JOIN obj is nullptr, therefore we delete these code to make stonedb crash when JOIN is null obj.
@RingsC RingsC closed this as completed Oct 3, 2022
@RingsC RingsC moved this to Done in StoneDB for MySQL 8.0 Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-feature feature with good idea C-stonedb-8.0 associated with stonedb 8.0
Projects
Development

No branches or pull requests

2 participants