1. 29 Sep, 2006 1 commit
    • unknown's avatar
      bug #16813 (WITH CHECK OPTION fails with UPDATE) · b0a8acab
      unknown authored
      We use the condition from CHECK OPTION twice handling UPDATE command.
      First we construnct 'update_cond' AND 'option_cond'
      condition to select records to be updated, then we check the
      'option_cond' for the updated row.
      The problem is that first 'AND' condition is optimized during the 'select'
      which can break 'option_cond' structure, so it will be unusable for
      the sectond use - to check the updated row.
      Possible soultion is either use copy of the condition in the first
      use or to make optimization less traumatic for the operands.
      I picked the first one. 
      
      
      mysql-test/r/view.result:
        result fixed
      mysql-test/t/view.test:
        testcase
      sql/table.cc:
        now we use the copy of the CHECK OPTION condition to construct
        the select's condition
      b0a8acab
  2. 18 Sep, 2006 5 commits
  3. 16 Sep, 2006 1 commit
    • unknown's avatar
      Fixed bug #21493: crash for the second execution of a function · 48bafe40
      unknown authored
      containing a select statement that uses an aggregating IN subquery.
      Added a parameter to the function fix_prepare_information 
      to restore correctly the having clause for the second execution.
      Saved andor structure of the having conditions at the proper moment
      before any calls of split_sum_func2 that could modify the having structure
      adding new Item_ref objects. (These additions, are produced not with 
      the statement mem_root, but rather with the execution mem_root.)
      
      
      mysql-test/r/sp.result:
        Added a test case for bug #21493.
      mysql-test/t/sp.test:
        Added a test case for bug #21493.
      sql/sql_delete.cc:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      sql/sql_insert.cc:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      sql/sql_lex.cc:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      sql/sql_lex.h:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      sql/sql_update.cc:
        Fixed bug #21493: crash for the second execution of a function
        containing a select statement that uses an aggregating IN subquery.
        Added a parameter to the function fix_prepare_information 
        to restore correctly the having clause for the second execution.
      48bafe40
  4. 15 Sep, 2006 28 commits
  5. 14 Sep, 2006 5 commits