1. 12 Jan, 2011 3 commits
    • Luis Soares's avatar
      BUG#59444: rpl_row_show_relaylog_events fails on daily-5.5 test runs · ac8e0ec1
      Luis Soares authored
      The test started failing on the same day patch for BUG 49978 was
      pushed. BUG 49978 changed part of the replication testing
      infrastructure in mysql-test-run. This caused the test to fail
      sporadically with result differences on relay log file
      names. When the test fails the relay-log filenames are shifted by
      one, eg:
      
      -show relaylog events in 'slave-relay-bin.000002' from <binlog_start>;
      +show relaylog events in 'slave-relay-bin.000003' from <binlog_start>;
      
      The problem was caused by a bad cleanup when using the include
      files:
      
        - include/setup_fake_relay_log.inc
        - include/cleanup_fake_relay_log.inc
      
      Which would leave a spurious relay-log file around (not listed in
      slave-relay-bin.index), causing the server to shift the name of
      the relay logs by one, even if cleaning up with RESET SLAVE.
      
      We fix this by removing the relay-log file when it is not needed
      anymore, ie at setup time and after recreating the fake relay-log
      index.
      
      Additionally, to make the affected test more resilient, we
      deployed a call to rpl_reset.inc (which resets both master and
      slave, including log files) before actually running the test
      case.
      
      Finally, appart from the reported bug, we also fix: (a) an
      unrelated issue with the failing test itself - in some cases, the
      test was not setting the log file name to use when it should; 
      (b) one typo.
      ac8e0ec1
    • 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 14 commits