~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to sql/item_subselect.cc

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-14 23:59:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120214235922-cux5uek1e5l0hje9
Tags: 5.5.20-0ubuntu1
* New upstream release.
* d/mysql-server-5.5.mysql.upstart: Fix stop on to make sure mysql is
  fully stopped before shutdown commences. (LP: #688541) Also simplify
  start on as it is redundant.
* d/control: Depend on upstart version which has apparmor profile load
  script to prevent failure on upgrade from lucid to precise.
  (LP: #907465)
* d/apparmor-profile: need to allow /run since that is the true path
  of /var/run files. (LP: #917542)
* d/control: mysql-server-5.5 has files in it that used to be owned
  by libmysqlclient-dev, so it must break/replace it. (LP: #912487)
* d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
  change compiler back to system default.
* d/rules: Turn off embedded libedit/readline.(Closes: #659566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1690
1690
                               select_subselect *result_arg,
1691
1691
                               Item_subselect *item_arg)
1692
1692
  :subselect_engine(item_arg, result_arg),
1693
 
   prepared(0), optimized(0), executed(0),
 
1693
   prepared(0), optimized(0), executed(0), optimize_error(0),
1694
1694
   select_lex(select), join(0)
1695
1695
{
1696
1696
  select_lex->master_unit()->item= item_arg;
1700
1700
void subselect_single_select_engine::cleanup()
1701
1701
{
1702
1702
  DBUG_ENTER("subselect_single_select_engine::cleanup");
1703
 
  prepared= optimized= executed= 0;
 
1703
  prepared= optimized= executed= optimize_error= 0;
1704
1704
  join= 0;
1705
1705
  result->cleanup();
1706
1706
  DBUG_VOID_RETURN;
1892
1892
int subselect_single_select_engine::exec()
1893
1893
{
1894
1894
  DBUG_ENTER("subselect_single_select_engine::exec");
 
1895
 
 
1896
  if (optimize_error)
 
1897
    DBUG_RETURN(1);
 
1898
 
1895
1899
  char const *save_where= thd->where;
1896
1900
  SELECT_LEX *save_select= thd->lex->current_select;
1897
1901
  thd->lex->current_select= select_lex;
1899
1903
  {
1900
1904
    SELECT_LEX_UNIT *unit= select_lex->master_unit();
1901
1905
 
 
1906
    DBUG_EXECUTE_IF("bug11747970_simulate_error",
 
1907
                    DBUG_SET("+d,bug11747970_raise_error"););
 
1908
 
1902
1909
    optimized= 1;
1903
1910
    unit->set_limit(unit->global_parameters);
1904
1911
    if (join->optimize())
1905
1912
    {
1906
1913
      thd->where= save_where;
1907
 
      executed= 1;
 
1914
      optimize_error= 1;
1908
1915
      thd->lex->current_select= save_select;
1909
1916
      DBUG_RETURN(join->error ? join->error : 1);
1910
1917
    }