Erro ao cancelar ou refazer backup

Sep 22, 2014 at 4:52 PM
Erro here:
 void ExportStart()
        {
            try
            {
                int stage = 1;
                while (stage < 12)
                {
                    if (stopProcess) break;
   .......
the variable "stopProcess" does not change the value to false when remade or cancels the export
Coordinator
Sep 23, 2014 at 5:03 AM
what is your suggestion or patch for this fix?
Sep 23, 2014 at 12:16 PM
Inside the "ReportEndProcess" method in the last line put "stopProcess = false;"
Coordinator
Sep 24, 2014 at 1:46 AM
Hi, thanks for the suggestion.

I have actually reset all the values (included "stopProcess = false;")
each time a Import is started.

Every Import process will start from this
void ImportFromTextReaderStream(TextReader tr, FileInfo fileInfo)
I reset all values inside this method:
        void Import_InitializeVariables()
        {
            stopProcess = false;
            GetSHA512HashFromPassword(ImportInfo.EncryptionPassword);
            _lastError = null;
            timeStart = DateTime.Now;
            _currentBytes = 0L;
            _sbImport = new StringBuilder();
            _mySqlScript = new MySqlScript(Command.Connection);
            currentProcess = ProcessType.Import;
            processCompletionType = ProcessEndType.Complete;
            _delimiter = ";";

            if (ImportProgressChanged != null)
                timerReport.Start();

            if (ImportInfo.TargetDatabase.Length > 0)
            {
                Import_CreateNewDatabase();
            }

        }
"stopProcess = false" is reset every time before an Import started.
Is this good enough to fix your problem?

If this is not good enough to meet your requirement,
then can you share with me why you need to reset "stopProcess = false" at "ReportEndProcess"?
Sep 24, 2014 at 11:25 AM
but the problem in this export, the "ExportStart" method, the condition:
if (stopProcess) break;
Do not let the run method: " Export_InitializeVariables"
Coordinator
Sep 25, 2014 at 12:41 AM
Edited Sep 25, 2014 at 12:57 AM
You are right. "Export_InitializeVariables" is not executed.

This is a bug.

besides "stopProcess = false" this value,
there are some other value which is needed to be reset too.

"Export_InitializeVariables" need to execute at first line in ExportStart().
This block shall be modified:
        void ExportStart()
        {
            try
            {
                int stage = 1;
                while (stage < 12)
                {
                    if (stopProcess) break;

                    switch (stage)
                    {
                        case 1: Export_InitializeVariables(); break;
and change to this:
        void ExportStart()
        {
            try
            {
                Export_InitializeVariables();

                int stage = 1;
                while (stage < 12)
                {
                    if (stopProcess) break;

                    switch (stage)
                    {
I will update the source code later.