>>>>> "Pierre" == Pierre Moret <pierre@stripped> writes:
Pierre> Paul DuBois wrote:
>> Or drop the original table, then use ALTER TABLE to rename the new
>> one to the original name.
Pierre> That was an option too, but in this case, I guess I can't properly lock
Pierre> the table, right?
Pierre> What happens to the locks when I do that?
Pierre> LOCK TABLES Object WRITE, Object_in WRITE;
Pierre> DROP TABLE Object;
Pierre> ALTER TABLE Object_in RENAME Object;
Pierre> UNLOCK TABLES;
Pierre> What will happen to the clients that are waiting for the locks to be
Pierre> released? Will they then get access to the new table, or could this
Pierre> cause some problem?
In the above cases there will be a short instant when the client may
get an error message that the table Object is missing.
On the other hand, the above is MUCH faster than your original code.