Bug #86823 connection.driver doesn't get configured in mysql replication scenario
| Submitted: | 26 Jun 2017 4:59 | Modified: | 26 Aug 2017 7:00 |
|---|---|---|---|
| Reporter: | mog liang | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | Connector / NET | Severity: | S3 (Non-critical) |
| Version: | 6.9.9 + | OS: | Windows (10) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | replication; connection; | ||
[28 Jun 2017 6:57]
Chiranjeevi Battula
Hello mog liang, Thank you for the bug report. Verified based on internal discussion with dev's. Thanks, Chiranjeevi.
[26 Aug 2017 7:00]
mog liang
do you have plan to fix this issue?
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: in MySqlCommand.ExecuteReader(CommandBehavior behavior), it calls ReplicationManager.GetNewConnection() to load balancing a new connection.driver object, However, the new created connection driver doesn't call driver.configure(), and therefore its serverProperties, charSets and MaxPacketSize doesn' get initialized. this issue causes MySqlConnection use default 1024 packet size, and doesn't have any server properties nor charsets. And cause Dapper works incorrectly. How to repeat: 1. prepare a mysql replication group 2. create a .net console project, set replication configuration in app.config <Group name="RO_rm-bp18wl1bs7798649v"> <Servers> <Server name="server1" IsMaster="true" connectionstring="database=ka_leaderm;server=rr-bp1p34uoxxxxx;port=3306;uid=xxx;password=xxx;Max Pool Size=100;" /> <Server name="server2" IsMaster="true" connectionstring="database=ka_leaderm;server=rr-bp1p35uoxxxxx;port=3306;uid=xxx;password=xxx;Max Pool Size=100;" /> </Servers> </Group> 3. in code, create an connection and execute reader var connstr = "server=RO_rm-bp18wl1bs7798649v;"; var conn3 = new MySql.Data.MySqlClient.MySqlConnection(connstr); conn3.Open(); var reader = conn3.ExecuteReader("select * from patient limit 1"); Suggested fix: a simple fix should be: always configure the driver after driver get created