I've been working on data import and have a number of
patches. These can all be applied with 'patch -p1'.
The patches fall in 3 categories:
A) Allow import to replace existing table content.
I've already submitted this patch but am re-submitting
the same patch as
In theory the rest of the patches are independent
of this patch, but since they touch the same code
this patch should be applied first.
B) Allow import into views.
The idea here is that if somebody's gone to the
trouble of putting an insert trigger on a view
then they'll either be able to insert to the view
or they'll get some sort of useful error message.
So, we only display the import tab for the view
if there's an insert trigger on the view.
Moves the printing of the import page
from tblproperties.php to classes/Misc.php.
Abstracts the notion of what can be imported.
Allows import into views which have an insert trigger.
Note that the test for which views have an insert
trigger should work, because the relevant catalogs have
not changed, back to 7.4. However, I've not tested
it on anything but 9.2.
C) Replace view content only when views support
Again, the assumption is that if there's a
delete trigger on the view then the trigger does something
Reworks the test for insert trigger to support
testing for any sort of trigger. (And delete
Allow replacement of view content only when there's
a delete trigger on the view.
Let me know what you think.
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
P.S. I did B) all at once, since I didn't know where
I was going with it. Splitting it into smaller patches
was a PITA. Was this worth my time?