-
-
Notifications
You must be signed in to change notification settings - Fork 141
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 tianmu_ini_allowmysqlQuerypath parameter causes the Tianmu engine to crash #477
Comments
Requirements:
|
Existing code supports evaluation:
Development Impact Assessment: Whether to develop custom functions in the column storage engine
2.1 Does anyone know the impact of tianmu_ini_allowmysqlQuerypath parameter on code logic? 2.2 If no one does, how many man-months will it take to understand the logic? 2.3 Even if the logic of the impact is clearly understood, what should I do if the amount of code involved in the modification is huge and cannot be quickly completed within a day or two? 2.4 Even if the enhanced version of overtime, every day to get the morning Lingling day, but the brain hormone secretion depletion toxin continues to poison the advancement of logic, how to proceed? |
mysql> SELECT C.SUSID,
-> C2.CORPNAME AS SCORPNAME,
-> C2.BNAME,
-> C.USID,
-> C.CORPNAME,
-> C.IBUSINESSID,
-> C.TTLB
-> FROM (SELECT USID,
-> CORPNAME,
-> IBUSINESSID,
-> TTLB,
-> FIND_TOP_USID(USID) AS SUSID
-> FROM CUSTOM
-> WHERE LGTP = '02'
-> AND USTP = '01'
-> AND IBUSINESSID = 2) C
-> LEFT JOIN CUSTOM C2
-> ON C2.USID = C.SUSID;
ERROR 6 (HY000): The query includes syntax that is not supported by the storage engine. Either restructure the query with supported syntax, or enable the MySQL core::Query Path in config file to execute the query with reduced performance.
|
#!/bin/bash
index=0
while [[ true ]]; do
value="VALUE FOR $index"
echo /stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e "
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;
"
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e "
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;
"
sleep 1s
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e " show warnings; "
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e " show tables; "
let index++
if [[ 100 == $index ]]; then
break
fi
sleep 1s
echo "index: $index over"
done
|
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e
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;
mysql: [Warning] Using a password on the command line interface can be insecure.
+----------------+-----------+-------+----------------+--------------------------------------------------------------------------------+-------------+------+
| SUSID | SCORPNAME | BNAME | USID | CORPNAME | IBUSINESSID | TTLB |
+----------------+-----------+-------+----------------+--------------------------------------------------------------------------------+-------------+------+
| ARTIZAN | NULL | NULL | ARTIZAN | 上海佳华国际旅行社有限公司 | 2 | 01 |
| chuntian123456 | NULL | NULL | chuntian123456 | 江苏春天国际旅行社有限公司 | 2 | 01 |
| CITS202020 | NULL | NULL | CITS202020 | 中国国旅(浙江)国际旅行社有限公司 | 2 | 01 |
| CODEUSER | NULL | NULL | CODEUSER | 扫码购 | 2 | 01 |
| cytcyt | NULL | NULL | cytcyt | 中景旅游网 | 2 | 99 |
| cyttest | NULL | NULL | cyttest | 测试 | 2 | 99 |
| cytToTdosfxs | NULL | NULL | cytToTdosfxs | 中景旅游 | 2 | 99 |
| dcmeituan | NULL | NULL | dcmeituan | 美团网 | 2 | 99 |
| ecgrup | NULL | NULL | ecgrup | 深圳市鼎游开发测试 | 2 | 01 |
| feizhu | NULL | NULL | feizhu | 1 | 2 | 99 |
| jxht | NULL | NULL | jxht | 嘉兴海棠旅游有限公司 | 2 | 01 |
| jyclhx | NULL | NULL | jyclhx | 长乐鸿禧酒店 | 2 | 99 |
| jyclkz | NULL | NULL | jyclkz | 长乐客栈 | 2 | 99 |
| jycqgj | NULL | NULL | jycqgj | 长青国际酒店 | 2 | 99 |
| jyctrip | NULL | NULL | jyctrip | 携程网 | 2 | 99 |
| jydyh | NULL | NULL | jydyh | 古运河 | 2 | 99 |
| jydytg | NULL | NULL | jydytg | | 2 | 99 |
| jyessq | NULL | NULL | jyessq | 二十四桥酒店 | 2 | 99 |
| jyfhly | NULL | NULL | jyfhly | | 2 | 99 |
| jyfskh | NULL | NULL | jyfskh | 佛山康辉旅行社 | 2 | 99 |
| jygey | NULL | NULL | jygey | 个园 | 2 | 99 |
| jyhey | NULL | NULL | jyhey | 何园 | 2 | 99 |
| jyhgjr | NULL | NULL | jyhgjr | 扬州皇冠假日酒店 | 2 | 99 |
| jyhmdks | NULL | NULL | jyhmdks | 扬州华美达凯莎广场酒店 | 2 | 99 |
| jyhqf | NULL | NULL | jyhqf | 虹桥坊 | 2 | 99 |
| jyhqfjd | NULL | NULL | jyhqfjd | 虹桥坊酒店 | 2 | 99 |
| jyhygj | NULL | NULL | jyhygj | 扬州花园国际大酒店有限公司 | 2 | 99 |
| jyhzl | NULL | NULL | jyhzl | | 2 | 99 |
| jyhzyd | NULL | NULL | jyhzyd | 杭州远大 | 2 | 99 |
| jyjldjd | NULL | NULL | jyjldjd | 扬州金陵大饭店 | 2 | 99 |
| jyjsmljd | NULL | NULL | jyjsmljd | 江苏福满楼酒店管理有限公司(扬州文昌阁智选假日酒店) | 2 | 99 |
| jyjtjd | NULL | NULL | jyjtjd | 君亭酒店 | 2 | 99 |
| jyjyxzgy | NULL | NULL | jyjyxzgy | 扬州中集菁英行政公寓 | 2 | 99 |
| jyldfpjd | NULL | NULL | jyldfpjd | | 2 | 99 |
| jyldfu | NULL | NULL | jyldfu | 扬州绿地福朋喜来登酒店 | 2 | 99 |
| jylvmama | NULL | NULL | jylvmama | 驴妈妈网 | 2 | 99 |
| jylxs | NULL | NULL | jylxs | | 2 | 99 |
| jyscdj | NULL | NULL | jyscdj | 瘦西湖宋城度假酒店 | 2 | 99 |
| jysedyl | NULL | NULL | jysedyl | 扬州三盛希尔顿逸林酒店 | 2 | 99 |
| jyshzh | NULL | NULL | jyshzh | 上海甄荟网络科技有限公司(自我游) | 2 | 99 |
| jysxhkj | NULL | NULL | jysxhkj | 瘦西湖科技 | 2 | 99 |
| jysxhwq | NULL | NULL | jysxhwq | 瘦西湖温泉 | 2 | 99 |
| jysxhwqdj | NULL | NULL | jysxhwqdj | 隐居瘦西湖温泉度假酒店 | 2 | 99 |
| jysxhxcx | NULL | NULL | jysxhxcx | 瘦西湖小程序 | 2 | 99 |
| jysxhzfb | NULL | NULL | jysxhzfb | 瘦西湖支付宝小程序 | 2 | 99 |
| jytcwl | NULL | NULL | jytcwl | 同程文旅 | 2 | 99 |
| jytest | NULL | NULL | jytest | | 2 | 99 |
| jytongcheng | NULL | NULL | jytongcheng | 同程网 | 2 | 99 |
| jywl | NULL | NULL | jywl | 123微旅 | 2 | 99 |
| jywqdjc | NULL | NULL | jywqdjc | 温泉度假村 | 2 | 99 |
| jywts1688 | NULL | NULL | jywts1688 | 江阴市职工旅行社有限公司 | 2 | 01 |
| jyxedhp | NULL | NULL | jyxedhp | 扬州东高铁站希尔顿欢朋酒店 | 2 | 99 |
| jyxgll | NULL | NULL | jyxgll | 扬州香格里拉 | 2 | 99 |
| jyxpjd | NULL | NULL | jyxpjd | 扬州希朋酒店管理有限公司 | 2 | 99 |
| jyxxqg | NULL | NULL | jyxxqg | 学习强国分销 | 2 | 99 |
| jyybg | NULL | NULL | jyybg | 迎宾馆 | 2 | 99 |
| jyybgh | NULL | NULL | jyybgh | 迎宾馆 | 2 | 99 |
| jyyjjd | NULL | NULL | jyyjjd | 隐居酒店 | 2 | 99 |
| jyypjj | NULL | NULL | jyypjj | 扬鹏锦江酒店 | 2 | 99 |
| jyyxb | NULL | NULL | jyyxb | | 2 | 99 |
| jyyxx | NULL | NULL | jyyxx | | 2 | 99 |
| jyyyzz | NULL | NULL | jyyyzz | 友谊智助 | 2 | 99 |
| jyyzjxed | NULL | NULL | jyyzjxed | 扬州扬子江希尔顿欢朋酒店 | 2 | 99 |
| jyyzwcl | NULL | NULL | jyyzwcl | 扬州望潮楼大酒店有限公司 | 2 | 99 |
| jyyzyxyhyjd | NULL | NULL | jyyzyxyhyjd | 扬州国医书院合怡酒店 | 2 | 99 |
| jyzf | NULL | NULL | jyzf | 郑峰 | 2 | 99 |
| jyzxtc | NULL | NULL | jyzxtc | 扬州中兴天成国际酒店 | 2 | 99 |
| jyzyw | NULL | NULL | jyzyw | 茱萸湾 | 2 | 99 |
| nodout | NULL | NULL | nodout | 慧敏旅行社服务(上海)有限公司 | 2 | 01 |
| rzpagl123 | NULL | NULL | rzpagl123 | 日照平安国际旅行社有限公司 | 2 | 01 |
| SSTDZH | NULL | NULL | SSTDZH | 赛思科技 | 2 | 01 |
| SYGL | NULL | NULL | SYGL | 江苏世友国际旅行社有限公司 | 2 | 01 |
| szcyts0512 | NULL | NULL | szcyts0512 | 苏州青年旅行社股份有限公司 | 2 | 01 |
| taobao | NULL | NULL | taobao | 淘宝 | 2 | 99 |
| wh1715 | NULL | NULL | wh1715 | 五湖国际旅行社(苏州)有限公司 | 2 | 01 |
| whoami1 | NULL | NULL | whoami1 | whoami | 2 | 01 |
| yinhongji2 | NULL | NULL | yinhongji2 | test | 2 | 01 |
| ylyzsxh | NULL | NULL | ylyzsxh | | 2 | 99 |
| yztrdjd | NULL | NULL | yztrdjd | 扬州泰润大酒店 | 2 | 99 |
| yzwdyhjd | NULL | NULL | yzwdyhjd | 扬州万达颐华酒店 | 2 | 99 |
| yzzjglytdjd | NULL | NULL | yzzjglytdjd | 扬州中集格兰云天大酒店 | 2 | 99 |
| ZLGJ | NULL | NULL | ZLGJ | 中旅国际 | 2 | 01 |
+----------------+-----------+-------+----------------+--------------------------------------------------------------------------------+-------------+------+
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e show warnings;
mysql: [Warning] Using a password on the command line interface can be insecure.
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e show tables;
mysql: [Warning] Using a password on the command line interface can be insecure.
+-------------------------------+
| Tables_in_dingyou |
+-------------------------------+
| CUSTOM |
| EDMCROWDKINDPRICETAB |
| EDMTICKETTYPETAB |
| STSSALESSETTLEMENTTAB |
| STSSALESSETTLEMENTTABLIST |
| STSSALESVOUCHERDETAILSTAB |
| STSSALESVOUCHERDETAILSTABLIST |
| STSSALESVOUCHERTAB |
| STSSALESVOUCHERTABLIST |
| STSSOLDTICKETTAB |
| TICKETCHECKLIST |
| jrk_all_bak |
| t1 |
+-------------------------------+
index: 9999 over
You have new mail in /var/spool/mail/root
|
Using the Release version, open LOG_BIN_TRUST_FUNCTION_CREATORS =1, execute the manually rewritten statement calling the custom dynamic function, then execute Show tables, and an accidental Crash occurs Problem Description: Compile using Relase version Open the tianmu_ini_allowmysqlquerypath = 1 Open the log_bin_trust_function_creators = 1 Execute the overwritten statement The mysqld process crashed accidentally. Procedure |
The stack that crashed: (gdb) bt |
Problem solving: In the belongs_to_p_s function, if DB and table_name are not in TABLE_LISTS, the decision is considered a failure The function logic /** if (!tl->table_name) { return (!strcmp("performance_schema", tl->db) && |
The continuity test is unstable: #!/bin/bash
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e " set global log_bin_trust_function_creators=1; "
index=0
while [[ true ]]; do
value="VALUE FOR $index"
echo /stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e "
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;
"
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e "
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;
"
echo /stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e " show warnings; "
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e " show warnings; "
echo /stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e " show tables; "
/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /stonedb57/install/tmp/mysql.sock -D dingyou -e " show tables; "
echo "index: $index over"
let index++
if [[ 10000 == $index ]]; then
break
fi
#sleep 0.5s
done
|
same as #474 |
Describe the problem
StoneDB does not support functions that contain dynamic SQL. In order to avoid errors, we changed the parameter tianmu_ini_allowmysqlQuerypath. After the SQL is executed, a warning will be displayed.
According to the warning msg, the SQL syntax cannot be implemented in the Tianmu engine. This warning is caused by the parameter setting. If you run the following command, StoneDB will crash.
Expected behavior
No response
How To Reproduce
No response
Environment
No response
Are you interested in submitting a PR to solve the problem?
The text was updated successfully, but these errors were encountered: