We cannot reproduce the issue in our environment. Please try the following walkthrough:
1. Create two test databases (e.g.: test2, test3) at your MySQL Server and populate both with the table:
Code: Select all
CREATE table `Products`
(
`Id` CHAR(38) NOT NULL PRIMARY KEY,
`Name` VARCHAR(100),
`CategoryId` INT,
`IsAvailable` BOOL
);
2. Run this code to provision both databases:
Code: Select all
using (var serverConn = new MySqlConnection("server=db;port=3311;database=test2;uid=root;pwd=root;")) {
var scopeDesc = new DbSyncScopeDescription("a");
var tableDesc = MySqlSyncDescriptionBuilder.GetDescriptionForTable("products", serverConn);
scopeDesc.Tables.Add(tableDesc);
var serverProvision = new MySqlSyncScopeProvisioning(serverConn, scopeDesc);
serverProvision.Apply();
using (var clientConn = new MySqlConnection("server=db;port=3311;database=test3;uid=root;pwd=root;")) {
var scopeDescription = MySqlSyncDescriptionBuilder.GetDescriptionForScope("a", serverConn);
SyncScopeProvisioning productionProvisioning = new MySqlSyncScopeProvisioning(clientConn, scopeDescription);
productionProvisioning.Apply();
}
}
3. Add a record in any Products table (in test2 or in test3).
4. Synchronize databases:
Code: Select all
using (var serverConn = new MySqlConnection("server=db;port=3311;database=test2;uid=root;pwd=root;")) {
using (var clientConn = new MySqlConnection("server=db;port=3311;database=test3;uid=root;pwd=root;")) {
SyncOrchestrator syncOrchestrator = new SyncOrchestrator();
syncOrchestrator.RemoteProvider = new MySqlSyncProvider("a", serverConn, null, null);
syncOrchestrator.LocalProvider = new MySqlSyncProvider("a", clientConn, null, null);
syncOrchestrator.Synchronize();
}
}
Does this work? If not, please enable the dbMonitor tool and localize the SQL statement which fails to execute:
https://www.devart.com/dotconnect/mysql ... nitor.html.
For more information, refer to
https://www.devart.com/dotconnect/mysql ... ework.html.