4 ms·
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 * FR
by moehm 3y ago
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?
- earayu 3y agoOnline 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.
- earayu 3y agoAs for the transactional nature of DDL - MySQL does not support using DDL in transactions (each DDL is a separate transaction).