~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.cc

  • Committer: Brian Aker
  • Date: 2010-11-08 08:02:36 UTC
  • mto: (1921.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1916.
  • Revision ID: brian@tangent.org-20101108080236-8gaumfjlec0webqm
Second pass on move code to global lock encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1650
1650
  }
1651
1651
 
1652
1652
  table->reginfo.lock_type=TL_WRITE;
1653
 
  if (! ((*lock)= mysql_lock_tables(session, &table, 1,
1654
 
                                    DRIZZLE_LOCK_IGNORE_FLUSH, &not_used)))
 
1653
  if (! ((*lock)= session->mysql_lock_tables(&table, 1, DRIZZLE_LOCK_IGNORE_FLUSH, &not_used)))
1655
1654
  {
1656
1655
    if (*lock)
1657
1656
    {
1658
 
      mysql_unlock_tables(session, *lock);
 
1657
      session->mysql_unlock_tables(*lock);
1659
1658
      *lock= 0;
1660
1659
    }
1661
1660
 
1787
1786
    table->cursor->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
1788
1787
    if (m_plock)
1789
1788
    {
1790
 
      mysql_unlock_tables(session, *m_plock);
 
1789
      session->mysql_unlock_tables(*m_plock);
1791
1790
      *m_plock= NULL;
1792
1791
      m_plock= NULL;
1793
1792
    }
1817
1816
 
1818
1817
  if (m_plock)
1819
1818
  {
1820
 
    mysql_unlock_tables(session, *m_plock);
 
1819
    session->mysql_unlock_tables(*m_plock);
1821
1820
    *m_plock= NULL;
1822
1821
    m_plock= NULL;
1823
1822
  }