I’ve been doing a bit more investigation and it looks like the FLUSH TABLES FOR EXPORT isn’t flushing to disk.

 

I monitor the modified time of the .MAD file for a table. If I make a change to the table the modified date doesn’t change. If I do FLUSH TABLES FOR EXPORT the modified time still doesn’t change. If I do a FLUSH TABLES the modified time does change. So adding the FOR EXPORT option seems to stop the data being flushed to disk.

 

Is this expected behaviour? It certainly isn’t how I read the documentation.

 

Regards

 

Andy Ling

 

From: Ling, Andy
Sent: Wed 06 May 2020 12:12
To: 'Roberto Spadim' <roberto@spadim.com.br>
Subject: RE: [EXTERNAL] Re: Re: [Maria-discuss] Problems copy database files

 

As I said, there is no destination server in this simple test. It is all done within the same machine and the same instance of MariaDB server.

 

In the full system where I first noticed the problem the copied files are checked with the aria_chk command and the mysqlcheck command and apart from the “zero filling” message are OK. Still the data is missing.

 

It looks like the FLUSH command isn’t flushing all the way to disk.

 

Regards

 

Andy Ling

 

 

From: Roberto Spadim [mailto:roberto@spadim.com.br]
Sent: Wed 06 May 2020 12:06
To: Ling, Andy <Andy.Ling@grassvalley.com>
Subject: [EXTERNAL] Re: Re: [Maria-discuss] Problems copy database files

 

there's an aria journaling file too, maybe it's not being sync before you copy, but from what i remember this should work, try to flush table at destination server and open table again just to check if it's not something at destination server

 

Em qua., 6 de mai. de 2020 às 07:59, Ling, Andy <Andy.Ling@grassvalley.com> escreveu:

They are the same. I’m actually doing this simple test on a single machine (and disk). So the files are just being copied from the original database folder to a backup folder on the same disk drive.

 

Regards

 

Andy Ling

 

 

From: Roberto Spadim [mailto:roberto@spadim.com.br]
Sent: Wed 06 May 2020 11:55
To: Ling, Andy <Andy.Ling@grassvalley.com>
Cc: Mailing-List mariadb <maria-discuss@lists.launchpad.net>
Subject: [EXTERNAL] Re: [Maria-discuss] Problems copy database files

 

what about file size on both servers?

 

Em qua., 6 de mai. de 2020 às 07:35, Ling, Andy <Andy.Ling@grassvalley.com> escreveu:

Hi,

 

I am having problems copying database files.

 

I am using MariaDB 10.4.12 on Windows server 2019. And all the tables use the Aria engine

 

A simple set of operations that reproduces the problem is…

 

Add some data to a table

FLUSH TABLE “table” FOR EXPORT

Copy the .FRM, .MAI, .MAD files for the table to a backup folder.

UNLOCK TABLES

switch to the database in the backup folder and check the contents of the copied table. I doesn’t contain the data just added. So it looks like the data is not being flushed to disk. The documentation suggests this should work, so are there some settings I need to change to make sure the data is flushed before I do the file copies.

 

Thanks for any help

 

Andy Ling

 

_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


 

--

Roberto Spadim
SPAEmpresarial - Software ERP/Scada

Eng. Automação e Controle, Eng. Financeira


DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.


 

--

Roberto Spadim
SPAEmpresarial - Software ERP/Scada

Eng. Automação e Controle, Eng. Financeira


DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.