> 1. Need to be able to specify the format of the temp table names to
> be sure name clashes can be avoided (a user may have tables
> that begin with underscore, for example).
Hi Tim,
My puzzle with that is what syntax to use. It could look like
"--rename-tables=_new_%s", which is powerful enough to let people name the
temp table whatever they need to, but the %s there seems a little
bothersome so I made the initial decision to code in an
arcane-enough-seeming temp name. Perhaps there should be two options,
like --load-atomic and --rename-prefix=xyz, even though they are
interdependent?
> 2. "rename-tables" isn't very self-explanatory. I'd suggest
> --load-atomic which describes what it's doing rather than how.
Yes, I think --load-atomic sounds better, too.
> 3. Put all the new tables in place at once (fast), then delete the
> old (slow). This can be done using the RENAME command:
> RENAME zip TO _zip_old;
> RENAME _zip TO zip;
> Although RENAME is atomic and one could rename all the tables
> (thus avoiding the need to lock tables) I'm not sure how RENAME
> behaves if some of the tables don't exist.
RENAME is faster than DROP?
I also don't know what happens if you try to rename or drop an innodb
table that holds a foreign key.
- JD