Bug #58640 mysqlbackup may abort when views are present
Submitted: 1 Dec 2010 21:26 Modified: 22 Jun 2011 14:30
Reporter: Victor Kirkebo Email Updates:
Status: Closed Impact on me:
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:3.5.2 OS:Any
Assigned to: Satya B CPU Architecture:Any

[1 Dec 2010 21:26] Victor Kirkebo
I have seen mysqlbackup aborting with error messages like this on Windows:
"Unhandled exception at 0x01157384 in mysqlbackup.exe: 0xC0000005: Access violation reading location 0x00000000."

This seems to only happen when there are views present.
mysqlbackup will try to find all engines in use by the tables in the databases with the following query: "SELECT DISTINCT(ENGINE) FROM information_schema.tables"
If there are views present the engine type will be NULL - this seems to cause mysqlbackup to abort occasionally.

I have not seen mysqlbackup abort on other platforms than Windows because of this issue but I believe it might be possible.

How to repeat:
Please read the source code where mysqlbackup is collecting the engine types.
[2 Dec 2010 16:29] Ingo Strüwing
The patch is approved by me. Just one question: Won't it be nice to append "WHERE ENGINE IS NOT NULL" to the query? With a comment that this is for views? Note that I don't mean it as a replacement for the code change. The change is fine. The code is much more secure now.
[3 Dec 2010 7:12] Satya B

agree. Will update the patch and push.
[3 Dec 2010 9:01] Satya B
revno: 256
revision-id: satya.bn@sun.com-20101203083132-sh8xkjzfa4w8kqp7

in meb-3.5.next