1. 11 Jan, 2011 8 commits
  2. 10 Jan, 2011 10 commits
    • Mattias Jonsson's avatar
      merge · fde31114
      Mattias Jonsson authored
      fde31114
    • Mattias Jonsson's avatar
      merge · 0df98f62
      Mattias Jonsson authored
      0df98f62
    • Matthias Leich's avatar
      The fix for Bug#58414 affecting the test show_check is pushed. · 32d3cc25
      Matthias Leich authored
      Remove the test from defaults.experimental.
      32d3cc25
    • Magne Mahre's avatar
      Bug#51631 general-log flag doesn't accept "on" as a value in · 296d494e
      Magne Mahre authored
                the my.cnf, works as command
            
      Different parsing mechanisms are used for command line/my.cnf 
      options  and the SQL commands.  The former only accepted
      numeric arguments, and regarded all numbers different from 0 
      as 'true'.  Any other argument was parsed as 'false' .
            
      This patch adds the words 'true' and 'on' as valid truth
      values for boolean option arguments.
            
      A test case is not provided, as the fix is simple and
      does not warrant a separate test file (no existing
      suitable test file was found)
      
      (backported from mysql-trunk)
      296d494e
    • Mattias Jonsson's avatar
      Manual merge from 5.1 · b56308e6
      Mattias Jonsson authored
      b56308e6
    • Jon Olav Hauglid's avatar
      Bug #58933 Assertion `thd- >is_error()' fails on shutdown with ongoing · 6bbfe7c6
      Jon Olav Hauglid authored
                 OPTIMIZE TABLE
      
      OPTIMIZE TABLE for InnoDB tables is handled as recreate + analyze.
      The triggered assert checked that an error had been reported if either
      recreate or analyze failed. However the assert failed to take into
      account that they could have failed because OPTIMIZE TABLE had been
      victim of KILL QUERY, KILL CONNECTION or server shutdown.
      
      This patch adjusts the assert to take this possibility into account.
      The problem was only noticeable on debug versions of the server.
      
      Test case added to innodb_mysql_sync.test.
      6bbfe7c6
    • Magne Mahre's avatar
      Bug#58970 Problem Subquery (without referencing a table) · 90650edf
      Magne Mahre authored
                and Order By
            
      When having a UNION statement in a subquery, with no
      referenced tables (or only a reference to the virtual
      table 'dual'), the UNION did not allow an ORDER BY clause.
            
            i.e:
                SELECT(SELECT 1 AS a UNION 
                       SELECT 0 AS a 
                       ORDER BY a) AS b  or
                SELECT(SELECT 1 AS a FROM dual UNION 
                       SELECT 0 as a 
                       ORDER BY a) AS b
            
            
      In addition, an ORDER BY / LIMIT clause was not accepted
      in subqueries even for single SELECT statements with no 
      referenced tables (or with 'dual' as table reference)
            
         i.e: 
            SELECT(SELECT 1 AS a ORDER BY a) AS b  or
            SELECT(SELECT 1 AS a FROM dual ORDER BY a) AS b
            
      The fix was to allow an optional ORDER BY/LIMIT clause to
      the grammar for these cases.
            
      See also: Bug#57986
      90650edf
    • Magne Mahre's avatar
      Bug#57986 ORDER BY clause is not used after a UNION, · 1b645167
      Magne Mahre authored
                if embedded in a SELECT
                  
      An ORDER BY clause was bound to the incorrect
      (sub-)statement when used in a UNION context.
                  
      In a query like:
      SELECT * FROM a UNION SELECT * FROM b ORDER BY c
      the result of SELECT * FROM b is sorted, and then
      combined with a.  The correct behaviour is that
      the ORDER BY clause should be applied on the
      final set.   Similar behaviour was seen on LIMIT
      clauses as well.
                  
      In a UNION statement, there will be a select_lex
      object for each of the two selects, and a 
      select_lex_unit object that describes the UNION
      itself.  Similarly, the same behaviour was also
      seen on derived tables.
                  
      The bug was caused by using a grammar rule for
      ORDER BY and LIMIT that bound these elements
      to thd->lex->current_select, which points to the
      last of the two selects, instead of to the 
      fake_select_lex member of the master select_lex_unit
      object.
      
      
      sql/sql_yacc.yy:
        Need to use (opt_)union_order_or_limit to
        bind to the correct select_lex object.
      1b645167
    • Mattias Jonsson's avatar
      merge · 2f474166
      Mattias Jonsson authored
      2f474166
    • Mattias Jonsson's avatar
      merge · 770c3f3a
      Mattias Jonsson authored
      770c3f3a
  3. 08 Jan, 2011 5 commits
  4. 07 Jan, 2011 17 commits