Esempio n. 1
0
        private async void dumpExecutor()
        {
            MySQLCredentialsConfig cnf = new MySQLCredentialsConfig();

            cnf.host     = config.host;
            cnf.port     = config.port;
            cnf.username = config.username;
            cnf.password = config.password;
            cnf.database = config.database;
            DbConnection con = new DbConnection(cnf);

            if (!con.testConnection().wasSuccessful)
            {
                onError(-1);
                return;
            }
            onProgress("Dumping from binary logs...");
            dumpInstance                   = new BinlogDump();
            dumpInstance.config            = config;
            dumpInstance.CompressStart    += onCompressStartHandler;
            dumpInstance.CompressProgress += onCompressProgressHandler;

            BinlogDumpResultset result = dumpInstance.executeDump();

            onCompleted(result);
            dumpInstance = null;
        }
Esempio n. 2
0
 internal void cancelDump()
 {
     if (dumpInstance != null)
     {
         dumpInstance.cancelBinlogDumpProcess();
         dumpInstance = null;
     }
 }