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 2020/11/05 01:30:16 UTC

[GitHub] [shardingsphere] Honglaisenburg opened a new issue #8032: Is it able to specify a special SQL to be executed in master node when using master-slave sharding?

Honglaisenburg opened a new issue #8032:
URL: https://github.com/apache/shardingsphere/issues/8032


   The problem I got is as follow:
   I have two databases, by use of shardingJdbc master-slave configuration, most part is working well.
   
   The only issue is : There is one special SQL, defined to call a stored procedure which is actually doing some update command inside. Since the SQL format is written in "SELECT MY_PROCEDURE()" format, shardingJdbc routed the SQL to the slave database node and we got an error because the slave instance is read only and not able to execute any update command at all.
   
   So I am thinking: how can I use configurations or some special format to bypass the default master-slave route mechanism, and make sure my special select-like SQL to send to master node instead ?
   
   Thanks.
   
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero edited a comment on issue #8032: Is it able to specify a special SQL to be executed in master node when using master-slave sharding?

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #8032:
URL: https://github.com/apache/shardingsphere/issues/8032#issuecomment-722117231


   Hi @Honglaisenburg
   If you use shardingJDBC, I suppose [hintManger](https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/usage/sharding/hint/) could give you some hints.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #8032: Is it able to specify a special SQL to be executed in master node when using master-slave sharding?

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #8032:
URL: https://github.com/apache/shardingsphere/issues/8032#issuecomment-722117231


   Hi @Honglaisenburg
   If you use shardingJDBC, I supposed [hintManger](https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/usage/sharding/hint/) could give you some hints.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu closed issue #8032: Is it able to specify a special SQL to be executed in master node when using master-slave sharding?

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #8032:
URL: https://github.com/apache/shardingsphere/issues/8032


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org