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: The instance is crashed when extracting data from the union all result set of decimal and integer. #1875

Closed
3 tasks done
haitaoguan opened this issue Jun 13, 2023 · 0 comments
Assignees
Labels
A-bug Something isn't working prio: high High priority

Comments

@haitaoguan
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

SELECT IF(@rowno != a.taxis_no, @rankno := 1, @rankno := @rankno + 1) AS "rowNos",
       IFNULL(a.out_amount / 1, '-') out_amount
  FROM (SELECT a.*
          FROM (SELECT a.currency_id, a.out_amount, d.taxis_no
                  FROM (SELECT b.CURRENCY_ID, a.account_id, 0 out_amount
                          FROM C1AM_ACCT_DAY a, C1MD_BANK_ACCT b
                         WHERE a.account_id = b.ROW_ID
                        UNION ALL
                        SELECT b.CURRENCY_ID,
                               a.account_id,
                               sum(a.out_amount) out_amount
                          FROM C1AM_BANK_LIST a, C1MD_BANK_ACCT b
                         WHERE a.account_id = b.ROW_ID
                         GROUP BY a.account_id, b.CURRENCY_ID) a
                  JOIN C1MD_BANK_ACCT b
                    on b.row_id = a.account_id
                  JOIN C1MD_COMPANY c
                    on c.row_id = b.company_id
                  JOIN C1CD_CURRENCY d
                    ON a.currency_id = d.row_id
                 WHERE 1 = 1
                   AND c.row_id IN (SELECT t1.row_id
                                      FROM C1MD_COMPANY t1, C1MD_COMPANY t2
                                     WHERE t1.sys_id = t2.sys_id)) a) a
ERROR 2013 (HY000): Lost connection to MySQL server during query

Expected behavior

No response

How To Reproduce

No response

Environment

./mysqld Ver 5.7.36-StoneDB-v1.0.1 for Linux on x86_64 (build-)
build information as follow:
Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
Branch name: stonedb-5.7-dev
Last commit ID: 1f43e44
Last commit time: Date: Wed May 31 17:34:21 2023 +0800
Build time: Date: Thu Jun 1 07:20:38 UTC 2023

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

  • Yes, I will!
@haitaoguan haitaoguan added A-bug Something isn't working prio: high High priority labels Jun 13, 2023
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 prio: high High priority
Projects
None yet
Development

No branches or pull requests

2 participants