Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tianmu): fix up assert failed on cur_pack != nullptr when using g…
- Loading branch information
1 parent
5e4461c
commit 98a2591
Showing
3 changed files
with
150 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
DROP DATABASE IF EXISTS issue1912; | ||
CREATE DATABASE issue1912; | ||
USE issue1912; | ||
CREATE TABLE `v_c1am_busi_type` ( | ||
`ROW_ID` int(11) DEFAULT NULL, | ||
`TENANT_ID` int(11) DEFAULT NULL, | ||
`CLASS_ID` decimal(18,0) DEFAULT NULL, | ||
`INNER_CODE` varchar(20) DEFAULT NULL | ||
) ENGINE=TIANMU; | ||
INSERT INTO v_c1am_busi_type VALUES | ||
(111,101,3000000000233027,'aaaa'), | ||
(222,201,3000000000233027,'bbbb'), | ||
(333,301,3000000000233027,'cccc'); | ||
CREATE TABLE `C1AM_BANK_CLASS` ( | ||
`ROW_ID` int(11) DEFAULT NULL, | ||
`TENANT_ID` int(11) DEFAULT NULL, | ||
`SERIAL_ID` int(11) DEFAULT NULL, | ||
`CLASS_ID` decimal(18,0) DEFAULT NULL, | ||
`TRADE_DATE` datetime DEFAULT NULL | ||
) ENGINE=TIANMU; | ||
INSERT INTO C1AM_BANK_CLASS VALUES | ||
(111,101,111,3000000000233027,'2023-07-19 16:28:12'), | ||
(222,201,222,3000000000233027,'2023-07-20 16:28:12'), | ||
(333,301,333,3000000000233027,'2023-07-24 16:28:12'); | ||
CREATE TABLE `c1AM_BANK_LIST` ( | ||
`ROW_ID` int(11) DEFAULT NULL, | ||
`TENANT_ID` int(11) DEFAULT NULL, | ||
`CURRENCY_ID` int(11) DEFAULT NULL, | ||
`CURRENCY_NAME` varchar(20) DEFAULT NULL, | ||
`TRADE_DATE` datetime DEFAULT NULL | ||
) ENGINE=TIANMU; | ||
INSERT INTO c1AM_BANK_LIST VALUES | ||
(111,101,222,'abcd','2023-07-19 16:30:47'), | ||
(222,201,333,'abcdefg','2023-07-21 16:30:47'), | ||
(333,301,111,'ab','2023-07-27 16:30:47'); | ||
CREATE TABLE `C1CD_CURRENCY` ( | ||
`ROW_ID` int(11) DEFAULT NULL, | ||
`CURRENCY_NAME` varchar(20) DEFAULT NULL | ||
) ENGINE=TIANMU; | ||
INSERT INTO C1CD_CURRENCY VALUES | ||
(1,'bcd'), | ||
(2,'aswq'), | ||
(3,'aaaa'); | ||
SELECT IFNULL(b.CURRENCY_NAME, '合计(人民币)') CURRENCY_NAME | ||
FROM v_c1am_busi_type a | ||
LEFT JOIN (select a.INNER_CODE, a.CURRENCY_ID, d.CURRENCY_NAME | ||
FROM (SELECT a.INNER_CODE, b.CURRENCY_ID | ||
FROM v_c1am_busi_type a | ||
CROSS JOIN (SELECT a.TENANT_ID, b.CURRENCY_ID | ||
FROM C1AM_BANK_CLASS a, c1AM_BANK_LIST b | ||
where a.SERIAL_ID = b.ROW_ID | ||
and DATE_FORMAT(b.TRADE_DATE, '%Y-%m-%d') BETWEEN | ||
DATE_FORMAT('2023-07-06', '%Y-%m-%d') AND | ||
DATE_FORMAT('2023-07-26', '%Y-%m-%d') | ||
GROUP BY a.TENANT_ID, b.CURRENCY_ID) b | ||
WHERE a.CLASS_ID = 3000000000233027) a | ||
LEFT JOIN C1CD_CURRENCY d | ||
ON a.CURRENCY_ID = d.ROW_ID) b | ||
ON a.INNER_CODE = | ||
LEFT(b.INNER_CODE, LENGTH(a.INNER_CODE)) | ||
GROUP BY b.CURRENCY_NAME; | ||
CURRENCY_NAME | ||
合计(人民币) | ||
DROP TABLE v_c1am_busi_type; | ||
DROP TABLE C1AM_BANK_CLASS; | ||
DROP TABLE c1AM_BANK_LIST; | ||
DROP TABLE C1CD_CURRENCY; | ||
DROP DATABASE issue1912; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--source include/have_tianmu.inc | ||
--disable_warnings | ||
|
||
DROP DATABASE IF EXISTS issue1912; | ||
CREATE DATABASE issue1912; | ||
USE issue1912; | ||
--enable_warnings | ||
|
||
CREATE TABLE `v_c1am_busi_type` ( | ||
`ROW_ID` int(11) DEFAULT NULL, | ||
`TENANT_ID` int(11) DEFAULT NULL, | ||
`CLASS_ID` decimal(18,0) DEFAULT NULL, | ||
`INNER_CODE` varchar(20) DEFAULT NULL | ||
) ENGINE=TIANMU; | ||
|
||
INSERT INTO v_c1am_busi_type VALUES | ||
(111,101,3000000000233027,'aaaa'), | ||
(222,201,3000000000233027,'bbbb'), | ||
(333,301,3000000000233027,'cccc'); | ||
|
||
CREATE TABLE `C1AM_BANK_CLASS` ( | ||
`ROW_ID` int(11) DEFAULT NULL, | ||
`TENANT_ID` int(11) DEFAULT NULL, | ||
`SERIAL_ID` int(11) DEFAULT NULL, | ||
`CLASS_ID` decimal(18,0) DEFAULT NULL, | ||
`TRADE_DATE` datetime DEFAULT NULL | ||
) ENGINE=TIANMU; | ||
|
||
INSERT INTO C1AM_BANK_CLASS VALUES | ||
(111,101,111,3000000000233027,'2023-07-19 16:28:12'), | ||
(222,201,222,3000000000233027,'2023-07-20 16:28:12'), | ||
(333,301,333,3000000000233027,'2023-07-24 16:28:12'); | ||
|
||
CREATE TABLE `c1AM_BANK_LIST` ( | ||
`ROW_ID` int(11) DEFAULT NULL, | ||
`TENANT_ID` int(11) DEFAULT NULL, | ||
`CURRENCY_ID` int(11) DEFAULT NULL, | ||
`CURRENCY_NAME` varchar(20) DEFAULT NULL, | ||
`TRADE_DATE` datetime DEFAULT NULL | ||
) ENGINE=TIANMU; | ||
|
||
INSERT INTO c1AM_BANK_LIST VALUES | ||
(111,101,222,'abcd','2023-07-19 16:30:47'), | ||
(222,201,333,'abcdefg','2023-07-21 16:30:47'), | ||
(333,301,111,'ab','2023-07-27 16:30:47'); | ||
|
||
CREATE TABLE `C1CD_CURRENCY` ( | ||
`ROW_ID` int(11) DEFAULT NULL, | ||
`CURRENCY_NAME` varchar(20) DEFAULT NULL | ||
) ENGINE=TIANMU; | ||
|
||
INSERT INTO C1CD_CURRENCY VALUES | ||
(1,'bcd'), | ||
(2,'aswq'), | ||
(3,'aaaa'); | ||
|
||
SELECT IFNULL(b.CURRENCY_NAME, '合计(人民币)') CURRENCY_NAME | ||
FROM v_c1am_busi_type a | ||
LEFT JOIN (select a.INNER_CODE, a.CURRENCY_ID, d.CURRENCY_NAME | ||
FROM (SELECT a.INNER_CODE, b.CURRENCY_ID | ||
FROM v_c1am_busi_type a | ||
CROSS JOIN (SELECT a.TENANT_ID, b.CURRENCY_ID | ||
FROM C1AM_BANK_CLASS a, c1AM_BANK_LIST b | ||
where a.SERIAL_ID = b.ROW_ID | ||
and DATE_FORMAT(b.TRADE_DATE, '%Y-%m-%d') BETWEEN | ||
DATE_FORMAT('2023-07-06', '%Y-%m-%d') AND | ||
DATE_FORMAT('2023-07-26', '%Y-%m-%d') | ||
GROUP BY a.TENANT_ID, b.CURRENCY_ID) b | ||
WHERE a.CLASS_ID = 3000000000233027) a | ||
LEFT JOIN C1CD_CURRENCY d | ||
ON a.CURRENCY_ID = d.ROW_ID) b | ||
ON a.INNER_CODE = | ||
LEFT(b.INNER_CODE, LENGTH(a.INNER_CODE)) | ||
GROUP BY b.CURRENCY_NAME; | ||
|
||
DROP TABLE v_c1am_busi_type; | ||
DROP TABLE C1AM_BANK_CLASS; | ||
DROP TABLE c1AM_BANK_LIST; | ||
DROP TABLE C1CD_CURRENCY; | ||
|
||
DROP DATABASE issue1912; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters