You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/03/29 06:31:31 UTC
[GitHub] [shardingsphere] liuyibo123 opened a new issue #16457: comment not worked shardingsphere-proxy
liuyibo123 opened a new issue #16457:
URL: https://github.com/apache/shardingsphere/issues/16457
I did this works ,but its not route to write db.I want to make sure , does proxy not support comment ?
1. I added ```/* ShardingSphere hint: writeRouteOnly=true */``` before my sql
2. seted `sql_comment_parse_enable` true
3. seted `proxy_hint_enabled` true in server.yaml
I use `set readwrite_splitting hint source=write` works.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #16457: comment not worked shardingsphere-proxy
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #16457:
URL: https://github.com/apache/shardingsphere/issues/16457#issuecomment-1081497937
You may need to add the SQL parser rule to enable parsing comments.
https://shardingsphere.apache.org/document/5.1.0/en/user-manual/shardingsphere-jdbc/yaml-config/rules/sql-parser/
https://github.com/apache/shardingsphere/blob/50b3f45a3b60efe28a00ca69d74024d6f5eee443/examples/shardingsphere-proxy-example/shardingsphere-proxy-distsql-example/src/main/resources/server/server.yaml#L48-L49
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] liuyibo123 commented on issue #16457: comment not worked shardingsphere-proxy
Posted by GitBox <gi...@apache.org>.
liuyibo123 commented on issue #16457:
URL: https://github.com/apache/shardingsphere/issues/16457#issuecomment-1081480823
> If you are using `mysql` cli, you may need to add `-c` to enable sending comments.
I am using jdbc and the log of shardingsphere-proxy is :
```sql
Logic SQL: /* ShardingSphere hint: writeRouteOnly=true */select * from co_item_invty where com_id = '11150101' and item_id = '40331000775481'
ShardingSphere-SQL - SQLStatement: MySQLSelectStatement(table=Optional.empty, limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
ShardingSphere-SQL - Actual SQL: ds0_slave0 ::: /* ShardingSphere hint: writeRouteOnly=true */select * from co_item_invty where com_id = '11150101' and item_id = '40331000775481'
```
comments is sended to proxy
server.yaml
```yaml
rules:
- !AUTHORITY
users:
- root@:root
provider:
type: ALL_PRIVILEGES_PERMITTED
props:
max-connections-size-per-query: 1
kernel-executor-size: 16 # Infinite by default.
proxy-frontend-flush-threshold: 128 # The default value is 128.
proxy-opentracing-enabled: false
proxy-hint-enabled: true
sql-show: true
check-table-metadata-enabled: false
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN closed issue #16457: comment not worked shardingsphere-proxy
Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #16457:
URL: https://github.com/apache/shardingsphere/issues/16457
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] liuyibo123 commented on issue #16457: comment not worked shardingsphere-proxy
Posted by GitBox <gi...@apache.org>.
liuyibo123 commented on issue #16457:
URL: https://github.com/apache/shardingsphere/issues/16457#issuecomment-1081485100
shardingsphere version 5.1.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #16457: comment not worked shardingsphere-proxy
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #16457:
URL: https://github.com/apache/shardingsphere/issues/16457#issuecomment-1081461649
If you are using `mysql` cli, you may need to add `-c` to enable sending comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] liuyibo123 commented on issue #16457: comment not worked shardingsphere-proxy
Posted by GitBox <gi...@apache.org>.
liuyibo123 commented on issue #16457:
URL: https://github.com/apache/shardingsphere/issues/16457#issuecomment-1081510258
it works ! thanks a lot .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org