Brian Aker wrote:
Hi!

I was just about to guy RENAME TABLE and then realized that it has one difference with ALTER TABLE... it doesn't do TEMPORARY TABLES.
So if I change it, it now does temporary tables... which makes me wonder...

Can this just go away? If someone really wants this they can write an alias in 
the client for it.

As a number of folks have already mentioned, the perceived[1] ability to do atomic renames *of multiple tables in a single statement* is the main benefit of RENAME TABLE, and this is a nice feature.

So, I would say, keep it.

Cheers,

Jay

[1] I'm still questioning whether this behaviour (of renaming multiple tables) is actually atomic after looking through the code. What the code ensures is that if one of the tables is not renamed properly, all the tables will have their original names restored. However, because there is no transactional state to this SQL statement, if the power cuts out halfway through the operation to rename a list of tables, I see nothing in the code which would recover the original table names on a restart of the server. So, it's kind of a "phony" atomicity since it is not guaranteed to be consistent or durable.



_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to