Closed ich-wangxf closed 4 years ago
Executing those as separate commands would increase latency (and decrease performance) for databases that do support it, so I'd like it be opt in.
What does DRDS return from MySqlConnection.ServerVersion
(after you've connected to it)?
Executing those as separate commands would increase latency (and decrease performance) for databases that do support it, so I'd like it be opt in.
What does DRDS return from
MySqlConnection.ServerVersion
(after you've connected to it)?
DRDS is a database middleware similar to MyCat, Has nothing to do with the specific MySQL database version.
When I use MySqlConnection to start a transaction, it returns "[ERR_PARSER] statement com.alibaba.fastsql.sql.ast.statement.SQLStartTransactionStatement not supported", So hope to executing those as separate commands through configuration @bgrainger
If DRDS is accepting the initial MySQL connection, then it will return some kind of server version string in the initial handshake packet it sends; this will be made available through MySqlConnection.ServerVersion
.
If DRDS is accepting the initial MySQL connection, then it will return some kind of server version string in the initial handshake packet it sends; this will be made available through
MySqlConnection.ServerVersion
.
In fact, what I want to express is that DRDS is not a database product, it is a database middleware service product, so the final database server version may be MySQL 5.6.x or 5.7.x or ApsaraDB for PolarDB 8.0.X, ApsaraDB for PolarDB is a next-generation relational database service developed by Alibaba Cloud. It is compatible with MySQL
@bgrainger
If DRDS is accepting the initial MySQL connection, then it will return some kind of server version string in the initial handshake packet it sends; this will be made available through
MySqlConnection.ServerVersion
.
Can you set the transaction isolation level when creating a new connection, so that there will be no performance degradation, then this setting is set by options, default is false, such as in Server.Session ConnectAsync
@bgrainger
Per https://github.com/sysown/proxysql/issues/1728#issuecomment-427881636 this code should probably respect the CLIENT_MULTI_STATEMENTS
flag (which ProxySQL may be clearing).
ProxySQL doesn't clear the CLIENT_MULTI_STATEMENTS
flag.
I don't know if DRDS or ApsaraDB for PolarDB do either.
@ich-wangxf Do you know if DRDS clears the CLIENT_MULTI_STATEMENTS
flag in its initial handshake with a client? A Wireshark packet capture of a client connection to the server would show if it does or not (if you're able to capture and provide that).
Oh thank you so much! @bgrainger
Sorry for my misunderstanding, DRDS(Distributed Relational Database Service) supports "transaction isolation level", but the following two commands need to be executed separately. Could you please help solve this problem?
Composite commands are not supported,need to separate "set transaction" from "start transaction"
using (var cmd = new MySqlCommand("set transaction isolation level " + isolationLevelValue + "; start transaction;", this))
@bgrainger