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

bug: result of querying a value from an empty derived table have select case is not consistent with innodb #1784

Closed
2 of 3 tasks
adofsauron opened this issue May 16, 2023 · 6 comments
Assignees
Labels
A-bug Something isn't working

Comments

@adofsauron
Copy link
Collaborator

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

985727fd6800838b5bf596d01baa16c3

Expected behavior

No response

How To Reproduce

No response

Environment

No response

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!
@adofsauron adofsauron added the A-bug Something isn't working label May 16, 2023
@adofsauron
Copy link
Collaborator Author

CASE
    ->                CASE
    ->                  WHEN r.row_id IS NOT NULL THEN
    ->                   r.exchange_rate
    ->                  ELSE
    ->                   1.0000
    ->                END AS exchange_rate,



@adofsauron adofsauron changed the title bug: result of querying a value from an empty derived table is not consistent with innodb bug: result of querying a value from an empty derived table have select case is not consistent with innodb May 16, 2023
@adofsauron
Copy link
Collaborator Author

create table t1 (age int) ;

select  1 age,  sum(age) from (  select * from t1) ta;

@adofsauron
Copy link
Collaborator Author

ACK

@adofsauron
Copy link
Collaborator Author

adofsauron commented Jun 5, 2023

在innodb引擎中的结果

+------------+---------------+---------+-------------+
| inner_code | exchange_rate | balance | std_balance |
+------------+---------------+---------+-------------+
| aaaaa      |    1.00000000 |    NULL | b           |
+------------+---------------+---------+-------------+

在tianmu引擎中的结果

+------------+---------------+---------+-------------+
| inner_code | exchange_rate | balance | std_balance |
+------------+---------------+---------+-------------+
| aaaaa      |          NULL |    NULL | b           |
+------------+---------------+---------+-------------+

@adofsauron
Copy link
Collaborator Author

客户POC的查询错误已修复, 做完边界性测试和自动化测试再提交代码

c03300d4dbb756d37e6ccc38cbb4b7b9

@adofsauron
Copy link
Collaborator Author

修复完了就关了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant