~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

« back to all changes in this revision

Viewing changes to sql/sql_base.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-07-21 07:09:29 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20150721070929-mg4dpqkgg3it1ajf
Tags: upstream-5.6.25
ImportĀ upstreamĀ versionĀ 5.6.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
1561
1561
  DBUG_ASSERT(!thd->slave_thread ||
1562
1562
              thd->system_thread != SYSTEM_THREAD_SLAVE_WORKER);
1563
1563
 
 
1564
  /*
 
1565
    Ensure we don't have open HANDLERs for tables we are about to close.
 
1566
    This is necessary when close_temporary_tables() is called as part
 
1567
    of execution of BINLOG statement (e.g. for format description event).
 
1568
  */
 
1569
  mysql_ha_rm_temporary_tables(thd);
1564
1570
  if (!mysql_bin_log.is_open())
1565
1571
  {
1566
1572
    TABLE *tmp_next;
1567
 
    for (table= thd->temporary_tables; table; table= tmp_next)
 
1573
    for (TABLE *t= thd->temporary_tables; t; t= tmp_next)
1568
1574
    {
1569
 
      tmp_next= table->next;
1570
 
      close_temporary(table, 1, 1);
 
1575
      tmp_next= t->next;
 
1576
      mysql_lock_remove(thd, thd->lock, t);
 
1577
      close_temporary(t, 1, 1);
1571
1578
    }
1572
1579
    thd->temporary_tables= 0;
1573
1580
    if (thd->slave_thread)
1696
1703
        }
1697
1704
 
1698
1705
        next= table->next;
 
1706
        mysql_lock_remove(thd, thd->lock, table);
1699
1707
        close_temporary(table, 1, 1);
1700
1708
      }
1701
1709
      thd->clear_error();
6545
6553
          Use own arena for Prepared Statements or data will be freed after
6546
6554
          PREPARE.
6547
6555
        */
6548
 
        Prepared_stmt_arena_holder ps_arena_holder(
6549
 
          thd,
6550
 
          register_tree_change &&
6551
 
            thd->stmt_arena->is_stmt_prepare_or_first_stmt_execute());
 
6556
        Prepared_stmt_arena_holder ps_arena_holder(thd, register_tree_change);
6552
6557
 
6553
6558
        /*
6554
6559
          create_item() may, or may not create a new Item, depending on