title: Unable to complete transaction; Lock wait timeout exceeded; try restarting transaction
body: <p>When I try to run the code below:</p>
  
  <pre><code>    $conBud = Propel::getConnection(MyTestBudgetPeer::DATABASE_NAME); // DATABASE_NAME = 'Budget'
      $conBud-&gt;beginTransaction();        
      $conIn = Propel::getConnection(MyTestInvoicePeer::DATABASE_NAME);  // DATABASE_NAME = 'Invoice'
      $conIn-&gt;beginTransaction();
      $idcl = '1235';
      try
      {
        // Do db udpates related to database Budget (here around 15 tables and 500 data rows are update)
         // budExModel is a table, primary id from this table is used to update InvoiceTest Table below
         $idtest = $budExModel-&gt;save($conBud);
         ...
        // Code to Update one table for database Invoice (only one table)
        // Create a Criteria object that will select the correct rows from the database
          $selectCriteria = new Criteria();
          $selectCriteria-&gt;add(InvoiceTestPeer::IDCL, $idcl, Criteria::EQUAL);            
          $selectCriteria-&gt;setDbName(InvoiceTestPeer::DATABASE_NAME);
          // Create a Criteria object includes the value you want to set
          $updateCriteria = new Criteria();
          $updateCriteria-&gt;add(InvoiceTestPeer::IDTEST, $idtest);
          // Execute the query
          BasePeer::doUpdate($selectCriteria, $updateCriteria, $conIn);
  
          $conBud-&gt;commit();
          $conIn-&gt;commit();           
      } catch (Exception $e)
      {
          $conBud-&gt;rollBack();
          $conIn-&gt;rollBack(); 
      }
  </code></pre>
  
  <p>I get error: <code>["Unable to execute UPDATE statement [UPDATE</code>invoice_test<code>SET</code>IDTEST<code>=:p1 WHERE invoice_test.IDCL=:p2 ] [wrapped: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction]</code></p>
  
  <blockquote>
    <p>Lock wait timeout exceeded; try restarting transaction</p>
  </blockquote>
  
  <p>Error I am getting is for the table/db which has lesser data and only processes for one table.</p>
  
  <p>Is this not allowed for mysql? </p>
  
  <p>I already changed innodb_lock_wait_timeout and tried restarting mysql so they are not an option.</p>
  
  <pre><code>Edit: Here IDTEST I am trying to udpate for table invoice_test is an fk from Table Budget_test from database Budget.
  </code></pre>