1. 13 Jan, 2011 1 commit
    • Luis Soares's avatar
      BUG#59444 · 0ac54682
      Luis Soares authored
      Refactoring effort on test case rpl_show_relaylog_events
      requested by reviewers.
      0ac54682
  2. 12 Jan, 2011 3 commits
    • Luis Soares's avatar
      BUG#59444: rpl_row_show_relaylog_events fails on daily-5.5 test runs · 0ef30fe7
      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.
      
      mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc:
        Added call to rpl_reset.inc.
        Deployed missing instructions to get the binlog file name 
        before including show_relaylog/binlog_events.inc
      0ef30fe7
    • Martin Hansson's avatar
      Merge of fix for Bug#58207. · 2fbee31f
      Martin Hansson authored
      2fbee31f
    • Martin Hansson's avatar
      Bug#58207: invalid memory reads when using default column value and · 3c5662c1
      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.
      3c5662c1
  3. 11 Jan, 2011 8 commits
  4. 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
  5. 08 Jan, 2011 5 commits
  6. 07 Jan, 2011 13 commits