-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
./sqladvisor -u xxx -p xxx -h xxxx -P xxx -d xxxx -q "SELECT p.*,s.cn_name FROM cc_paysystem_withdrawal as p LEFT JOIN cc_shop as s ON p.type_id = s.id WHERE ( p.type = 'SHOP' ) ORDER BY p.id LIMIT 0,50;select * from cc_paysystem_withdrawal where type='SHOP' order by id limit 0,50" -v 1
修改sqladvisor/main.cc:main函数:
while ((query = options.query[i]) != NULL) {
sql_print_information("Query %d:%s\n", i, query);
sql_lex = sql_parser(query, options.dbname); Query输出结果如下:
2017-03-13 16:09:34 31549 [Note] Query 0:SELECT p.*,s.cn_name FROM cc_paysystem_withdrawal as p LEFT JOIN cc_shop as s ON p.type_id = s.id WHERE ( p.type = 'SHOP' ) ORDER BY p.id LIMIT 0,50;select * from cc_paysystem_withdrawal where type='SHOP' order by id limit 0,50
可以看到并没有按照SEP设置进行SQL切分
Metadata
Metadata
Assignees
Labels
No labels