1. 12 Jan, 2011 2 commits
    • Martin Hansson's avatar
      Merge of fix for Bug#58207. · b48abbc5
      Martin Hansson authored
      b48abbc5
    • Martin Hansson's avatar
      Bug#58207: invalid memory reads when using default column value and · fc42cbac
      Martin Hansson authored
      tmptable needed
      
      The function DEFAULT() works by modifying the the data buffer pointers (often
      referred to as 'record' or 'table record') of its argument. This modification
      is done during name resolution (fix_fields().) Unfortunately, the same
      modification is done when creating a temporary table, because default values
      need to propagate to the new table.
      
      Fixed by skipping the pointer modification for fields that are arguments to
      the DEFAULT function.
      fc42cbac
  2. 11 Jan, 2011 8 commits
  3. 10 Jan, 2011 10 commits
    • Mattias Jonsson's avatar
      merge · 43803d01
      Mattias Jonsson authored
      43803d01
    • Mattias Jonsson's avatar
      merge · 208a0fab
      Mattias Jonsson authored
      208a0fab
    • Matthias Leich's avatar
      The fix for Bug#58414 affecting the test show_check is pushed. · 30652c4f
      Matthias Leich authored
      Remove the test from defaults.experimental.
      30652c4f
    • Magne Mahre's avatar
      Bug#51631 general-log flag doesn't accept "on" as a value in · d690da66
      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)
      d690da66
    • Mattias Jonsson's avatar
      Manual merge from 5.1 · 1a46e493
      Mattias Jonsson authored
      1a46e493
    • Jon Olav Hauglid's avatar
      Bug #58933 Assertion `thd- >is_error()' fails on shutdown with ongoing · 04823e33
      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.
      04823e33
    • Magne Mahre's avatar
      Bug#58970 Problem Subquery (without referencing a table) · 0a2a470b
      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
      0a2a470b
    • Magne Mahre's avatar
      Bug#57986 ORDER BY clause is not used after a UNION, · 4d692809
      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.
      4d692809
    • Mattias Jonsson's avatar
      merge · 99e95e8d
      Mattias Jonsson authored
      99e95e8d
    • Mattias Jonsson's avatar
      merge · 945f6faa
      Mattias Jonsson authored
      945f6faa
  4. 08 Jan, 2011 5 commits
  5. 07 Jan, 2011 15 commits