You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
这里的isSelect参数始终是true。
结果就是如果你的从库设置了只读,那么就无法进行写操作;他将返回:
ERROR 1290 (HY000): The MariaDB server is running with the --read-only option so it cannot execute this statement
The text was updated successfully, but these errors were encountered:
getShardConns函数会被handleExec和handleSelect等调用;这里handleExec可能会执行Insert或者update,在getShareConns中进行获取数据库连接处理时调用了getConn方法来获取数据库连接,
而getConn是根据isSelect参数来判断是在主上执行操作还是在从上执行操作,现在问题出来了
这里的isSelect参数始终是true。
结果就是如果你的从库设置了只读,那么就无法进行写操作;他将返回:
ERROR 1290 (HY000): The MariaDB server is running with the --read-only option so it cannot execute this statement
The text was updated successfully, but these errors were encountered: