title: Concurrency in MySQL Innodb Transactions when executing 2 seperated queries
body: <pre><code>My Schema
  
  Table Articles
  id -&gt; AUTO_INCREMENT
  article_name -&gt; STRING
  hash_id -&gt; STRING
  </code></pre>
  
  <p>this is my code, Python</p>
  
  <pre><code>cursor.execute("Insert into articles(id,article_name) values (NULL,'Harry Potter')")
  
  id = cursor.lastrowid # Gets the AUTO_INCRENT value
  
  hash_id = hash_id_function(id) # converts INT to Non-Sequential eg. '112' -&gt; '23jk32j'
  
  cursor.execute("UPDATE Articles set hash_id='23jk32j' where id='112'")
  </code></pre>
  
  <p>Whenever a READ occurs, I want the ROW to contain the hashid (Above 2 Queries must have executed fully) </p>
  
  <p>How can i achieve this with Transactions, Considering that MySQL(Innodb) has to wait for my pythonic <code>hash_id_function</code> to execute?</p>