News for hackers. Stuff that matters.
Re: by moehm on Saturday December 16, 2023 @08:49AM (#38664159)
I'm not familiar with the concept of 'online' DDL. Does asynchron means I sacrifice consistency in this example?

   ALTER TABLE ADD COLUMN foo; 
   SELECT * FROM table;
   -- may return column foo, or may not?
DDL is still not safe to use in transactions, right?
Re: by earayu on Saturday December 16, 2023 @09:21AM (#38664378)
Online DDL is typically executed asynchronously. This has the benefit of making DDL more manageable and not impact the availability of the database due to MDL locks or consuming too many resources. After executing an Online DDL, a JobId will be returned. Subsequently, the progress can be checked using the JobId, and some control commands can also be executed, such as suspending, resuming, or canceling.
Re: by earayu on Saturday December 16, 2023 @09:22AM (#38664385)
As for the transactional nature of DDL - MySQL does not support using DDL in transactions (each DDL is a separate transaction).