What is the location of mysql self-value-added storage?
Today, the editor will share with you the relevant knowledge about the location of mysql self-value-added preservation, detailed content and clear logic. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
1. The self-increment of the MyISAM engine is stored in the data file.
2. The self-increment of the InnoDB engine. In MySQL5.7 and previous versions, the self-increment is stored in memory and will not last.
Every time you restart, when you open the table for the first time, you will find the self-increment max (id), and then use the max (id) + step as the current self-increment.
Select max (ai_col) from table_name for update
In higher versions of MySQL, self-increment changes are recorded in redolog, and rebooting relies on redolog to restore pre-restart values.
These are all the contents of the article "what is the location of self-value-added preservation of mysql". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.