MyBackup erorr

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
imobile
Posts: 12
Joined: Mon 17 Oct 2011 16:26

MyBackup erorr

Post by imobile » Thu 10 Nov 2011 08:24

Hello.
1.I'am using MyBackup for backup data. If mode set bmBinary have erorr-

Code: Select all

First chance exception at $773CB727. Exception class EMySqlException with message
'
#HY000Table 'client' was locked with a READ lock and can't be updated'.
Process Project1.exe (4216)
. in help write database need lock. How lock? Example plz.
2.If using bmText when i write to inglish path-OK. If i write russian path like"C:\новая папка\" have erorr/

Code: Select all

First chance exception at $773CB727. Exception class EMySqlException with message
'
#HY000Can't create/write to file 'C:\Новая папка\client' (Errcode: 2)'.
Process Project1.exe (4696)

AndreyZ

Post by AndreyZ » Thu 10 Nov 2011 12:41

Hello,

1. This problem can occur if you are using MySQL 5.5 or higher. The point is that the BACKUP TABLE statement is deprecated and is removed in MySQL 5.5. You cannot use the bmBinary mode for MySQL 5.5. In the next MyDAC build we will raise an exception about that if the bmBinary mode is used.
2. To solve the problem, you should set the TMyConnection.Options.UseUnicode property to False before performing backing up process.

imobile
Posts: 12
Joined: Mon 17 Oct 2011 16:26

Post by imobile » Thu 10 Nov 2011 14:44

AndreyZ wrote:Hello,

1. This problem can occur if you are using MySQL 5.5 or higher. The point is that the BACKUP TABLE statement is deprecated and is removed in MySQL 5.5. You cannot use the bmBinary mode for MySQL 5.5. In the next MyDAC build we will raise an exception about that if the bmBinary mode is used.
2. To solve the problem, you should set the TMyConnection.Options.UseUnicode property to False before performing backing up process.
thanks for helping.
1.yes, i using mysql 5.5
2. database data is unicode, sometime windows 1251, data save correctly?

imobile
Posts: 12
Joined: Mon 17 Oct 2011 16:26

Post by imobile » Thu 10 Nov 2011 14:52

3. How to overwrite data in folder?

AndreyZ

Post by AndreyZ » Thu 10 Nov 2011 15:29

2. When the bmText mode is used, Unicode data from tables is stored in backup files in the UTF format regardless of the UseUnicode property value. Therefore the data from your tables will be stored in a backup file correctly regardless of character set.
3. You cannot overwrite a backup file. When the bmText mode is used, TMyBackup uses the SELECT INTO OUTFILE SQL statement. This is quotation from MySQL Reference Manual:
The SELECT ... INTO OUTFILE 'file_name' form of SELECT writes the selected rows to a file. The file is created on the server host, so you must have the FILE privilege to use this syntax. file_name cannot be an existing file, which among other things prevents files such as /etc/passwd and database tables from being destroyed.
For more information, please refer to http://dev.mysql.com/doc/refman/5.0/en/select-into.html

Post Reply