title: Mysql autoincrement bug in insert select
body: <p>Can anyone suggest me the workaround for the following bug in mysql.</p>
  
  <pre><code>  http://bugs.mysql.com/bug.php?id=61058
  </code></pre>
  
  <p>This bug was reported long ago (2007) with mysql 5.0, but i am still facing same issue with mysql 5.6. I have followed this post which first gave some insight for this problem.</p>
  
  <p><a href="https://stackoverflow.com/questions/12226105/mysql-auto-increment-jumps-when-insert-select">Mysql auto increment jumps when insert-select</a></p>
  
  <p>Followed the post as some one suggested preferably setting </p>
  
  <pre><code>ALTER TABLE `test` AUTO_INCREMENT = 1; 
  </code></pre>
  
  <p>which will not work in my case where i have a stored procedure which will run in background as an event for a specified time.</p>
  
  <p>Can anyone please suggest me for a workaround....??</p>
  
  <p>Thanks in advance</p>