WL#3195: Provide ability to load database without validations
Affects: Server-7.1 — Status: Un-Assigned — Priority: Medium
Since mysqldump doesn't dump in any order, it's always possible for a dumped file to contain view definitions that are invalid at reload time, because the table upon which they depend doesn't exist yet at that point in the reload operation. We should provide a mechanism to allow database dump/reload that takes this factor into account and ignores view and other validations (e.g. for constraints) during reload. One suggestion is to add a variable option, seconded by Mike Zinner; per attached correspondence: -----Original Message----- From: Michael G. Zinner [mailto:email@example.com] Sent: Tuesday, February 14, 2006 2:22 PM To: Axel Schwenke Cc: Trudy Pelzer; Kristian Köhntopp; firstname.lastname@example.org; Edwin DeSouza Subject: Re: Are we handling views the right way? Hi, Axel Schwenke wrote: > -- cut -- > So either all tools have to be > aware of dependencies and provide measures to sort objects accordingly - > or we create a variable to temporary turn off dependency checks for > views. I like the second way much more. > -- cut -- I also would welcome a VIEW_REFERENCE_CHECKS variable. Then we can handle it the same way as FKs. -- Disable view reference checks SET @OLD_VIEW_REFERENCE_CHECKS=@@VIEW_REFERENCE_CHECKS, VIEW_REFERENCE_CHECKS=0; ... do view creation ... -- Re-enable view reference checks SET VIEW_REFERENCE_CHECKS=@OLD_VIEW_REFERENCE_CHECKS; See also BUG#17371.
Copyright (c) 2000, 2017, Oracle Corporation and/or its affiliates. All rights reserved.