stonedb
stonedb copied to clipboard
bug: If the parameter tianmu_ini_allowmysqlquerypath equal to 1, the instance may be crash.
Describe the problem
If the parameter tianmu_ini_allowmysqlquerypath equal to 1,executing the following SQL causes the instance to crash.
SELECT FIND_TOP_USID(C.USID) AS SUSID, C2.CORPNAME AS SCORPNAME, C2.BNAME, C.USID, C.CORPNAME, C.IBUSINESSID, C.TTLB FROM CUSTOM C LEFT JOIN CUSTOM C2 ON C2.USID = C.SUSID WHERE C.LGTP = '02' AND C.USTP = '01' AND C.IBUSINESSID = 2;
DELIMITER ;;
CREATE DEFINER=root
@%
FUNCTION FIND_TOP_USID
(PUSID VARCHAR(1000)) RETURNS varchar(1000) CHARSET utf8
BEGIN
DECLARE FINALVAR VARCHAR(100);
WHILE LENGTH(PUSID) > 0 DO
SET FINALVAR = PUSID;
SELECT SUSID INTO PUSID FROM CUSTOM WHERE USID = FINALVAR;
IF FINALVAR = PUSID
THEN SET PUSID = '';
END IF;
END WHILE;
RETURN FINALVAR;
END ;;
DELIMITER ;
You can see detailed information,for example,the table structure、function and so on。 192.168.30.122 /data/stonedb57/install/bin/mysql -uroot -pstonedb123 -D dingyou -S /data/stonedb57/install/tmp/mysql.sock
Expected behavior
No response
How To Reproduce
No response
Environment
[root@dev bin]# ./mysqld --version ./mysqld Ver 5.7.36-StoneDB for Linux on x86_64 (build-) build information as follow: Repository address: [email protected]:stoneatom/stonedb.git:stonedb-5.7 Branch name: stonedb-5.7 Last commit ID: 05eb397 Last commit time: Date: Mon Aug 15 14:05:47 2022 +0800 Build time: Date: 2022年 08月 15日 星期一 15:38:53 CST [root@dev bin]# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal
Are you interested in submitting a PR to solve the problem?
- [ ] Yes, I will!