Hacker News new | past | comments | ask | show | jobs | submit login

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?



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.


As for the transactional nature of DDL - MySQL does not support using DDL in transactions (each DDL is a separate transaction).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: