title: MySQL not updating information_schema, unless I manually run ANALYZE TABLE `myTable`
body: <p>I have the need to get last id (primary key) of a table (InnoDB), and to do so I perform the following query:</p>
  
  <pre><code>SELECT (SELECT `AUTO_INCREMENT` FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = 'mySchema' AND `TABLE_NAME` = 'myTable') - 1;
  </code></pre>
  
  <p>which returns the wrong AUTO_INCREMENT. The problem is the TABLES table of information_schema is not updated with the current value, unless I run the following query:</p>
  
  <pre><code>ANALYZE TABLE `myTable`;
  </code></pre>
  
  <p>Why doesn't MySQL update information_schema automatically, and how could I fix this behavior?<br>
  Running MySQL Server 8.0.13 X64.</p>