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

查询语句中对于别名.* masking无法解析,query_tree为空 #417

Closed
unknowissue opened this issue Dec 30, 2021 · 2 comments
Closed

Comments

@unknowissue
Copy link

unknowissue commented Dec 30, 2021

您好
辛苦帮忙看下,是不支持么?以及后排期计划么?
还是我的使用方法有问题?
描述
查询语句中对于别名.* masking无法解析,query_tree为空,比如
select a.* from t1 a limit 100
结果为
+----+--------------------------------+----------+------------+--------+
| id | statement | errlevel | query_tree | errmsg |
+----+--------------------------------+----------+------------+--------+
| 1 | select a.* from t1 a limit 100 | 0 | [] | None |
+----+--------------------------------+----------+------------+--------+
重现
`python
#!/usr/bin/env python3

-- coding:utf-8 --

import pymysql
import prettytable as pt
tb = pt.PrettyTable()
sql = '''/--user=xx;--password=xx==;--host=xxxxx--port=3308;--masking=1;/
inception_magic_start;
use db1;
select a.* from t1 a limit 100;
inception_magic_commit;'''
conn = pymysql.connect(host='127.0.0.1', user='', passwd='',
db='', port=4000, charset="utf8mb4")
cur = conn.cursor()
ret = cur.execute(sql)
result = cur.fetchall()
print(result)
cur.close()
conn.close()
tb.field_names = [i[0] for i in cur.description]
for row in result:
tb.add_row(row)
print(tb)
`
环境

  • 数据库: mysql8
  • 版本: v1.2.5
  • 部署方式:手动部署

参数
可能与问题相关的设置参数

@hanchuanchuan
Copy link
Owner

已修复。请升级到v1.2.5-10版本后重试。

@unknowissue
Copy link
Author

谢谢,测试可以了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants