1. 11 Aug, 2010 2 commits
  2. 10 Aug, 2010 3 commits
  3. 09 Aug, 2010 2 commits
    • Jon Olav Hauglid's avatar
      manual merge from mysql-5.1-bugteam · 5af18b9c
      Jon Olav Hauglid authored
      5af18b9c
    • Jon Olav Hauglid's avatar
      Bug #54106 assert in Protocol::end_statement, · f62f2ea7
      Jon Olav Hauglid authored
                 INSERT IGNORE ... SELECT ... UNION SELECT ...
      
      This assert was triggered by INSERT IGNORE ... SELECT. The assert checks that a
      statement either sends OK or an error to the client. If the bug was triggered
      on release builds, it caused OK to be sent to the client instead of the correct
      error message (in this case ER_FIELD_SPECIFIED_TWICE).
      
      The reason the assert was triggered, was that lex->no_error was set to TRUE
      during JOIN::optimize() because of IGNORE. This causes all errors to be ignored.
      However, not all errors can be ignored. Some, such as ER_FIELD_SPECIFIED_TWICE
      will cause the INSERT to fail no matter what. But since lex->no_error was set,
      the critical errors were ignored, the INSERT failed and neither OK nor the
      error message was sent to the client.
      
      This patch fixes the problem by temporarily turning off lex->no_error in
      places where errors cannot be ignored during processing of INSERT ... SELECT.
      
      Test case added to insert.test.
      f62f2ea7
  4. 06 Aug, 2010 5 commits
  5. 05 Aug, 2010 3 commits
  6. 04 Aug, 2010 5 commits
  7. 03 Aug, 2010 7 commits
    • Georgi Kodinov's avatar
      merge · 6a8de839
      Georgi Kodinov authored
      6a8de839
    • Georgi Kodinov's avatar
      Bug #42144: plugin_load fails · f7cc2301
      Georgi Kodinov authored
      The enum system variables were handled inconsistently 
      as ints, unsigned int and unsigned long on various places.
      This caused problems on platforms on which 
      sizeof(int) != sizeof(long).
      Fixed by homogenizing the type of the enum variables
      to unsigned int, since it's size compatible with the C enum
      type. 
      Removed the test from the experimental list.
      f7cc2301
    • Bjorn Munch's avatar
      Bug #55582 mtr root detection (and if-expression execution) broken · cad161ad
      Bjorn Munch authored
      if() treated any non-numeric string as false
      Fixed to treat those as true instead
      Added some test cases
      Fixed missing $ in variable name in include/mix2.inc
      cad161ad
    • unknown's avatar
      Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile · 09410812
      unknown authored
      Post fix
      
      mysql-test/t/mysqlbinlog.test:
        Updated for Bug#34283
      09410812
    • unknown's avatar
      Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile · d713b439
      unknown authored
      Post fix
      
      mysql-test/t/mysqlbinlog.test:
        Updated for Bug#34283
      d713b439
    • unknown's avatar
      Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile · d4aa622f
      unknown authored
            
      With statement- or mixed-mode logging, "LOAD DATA INFILE" queries
      are written to the binlog using special types of log events.
      When mysqlbinlog reads such events, it re-creates the file in a
      temporary directory with a generated filename and outputs a
      "LOAD DATA INFILE" query where the filename is replaced by the
      generated file. The temporary file is not deleted by mysqlbinlog
      after termination.
            
      To fix the problem, in mixed mode we go to row-based. In SBR, we
      document it to remind user the tmpfile is left in a temporary
      directory.
      
      
      mysql-test/suite/binlog/r/binlog_mixed_load_data.result:
        Test result for BUG#34283.
      mysql-test/suite/binlog/t/binlog_killed_simulate.test:
        Updated for BUg#34283
      mysql-test/suite/binlog/t/binlog_mixed_load_data.test:
        Added the test file to verify that 'load data infile...' statement
        will go to row-based in mixed mode.
      mysql-test/suite/binlog/t/binlog_stm_blackhole.test:
        Updated for BUg#34283
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
        Updated for Bug#34283
      mysql-test/suite/rpl/t/rpl_loaddata.test:
        Updated for Bug#34283
      mysql-test/suite/rpl/t/rpl_loaddata_fatal.test:
        Updated for Bug#34283
      mysql-test/suite/rpl/t/rpl_loaddata_map.test:
        Updated for Bug#34283
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test:
        Updated for Bug#34283
      mysql-test/suite/rpl/t/rpl_stm_log.test:
        Updated for B
      mysys/stacktrace.c:
        Auto merge
      sql/sql_lex.cc:
        Auto merg
      sql/sql_load.cc:
        Added code to go to row-based in mixed mode for
        'load data infile ...' statement
      d4aa622f
    • unknown's avatar
      Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile · ead6ae2c
      unknown authored
      With statement- or mixed-mode logging, "LOAD DATA INFILE" queries
      are written to the binlog using special types of log events.
      When mysqlbinlog reads such events, it re-creates the file in a
      temporary directory with a generated filename and outputs a
      "LOAD DATA INFILE" query where the filename is replaced by the
      generated file. The temporary file is not deleted by mysqlbinlog
      after termination.
      
      To fix the problem, in mixed mode we go to row-based. In SBR, we
      document it to remind user the tmpfile is left in a temporary
      directory.
      
      
      
      
      mysql-test/extra/rpl_tests/rpl_loaddata.test:
        Updated for Bug#34283
      mysql-test/suite/binlog/r/binlog_mixed_load_data.result:
        Test result for BUG#34283.
      mysql-test/suite/binlog/t/binlog_killed_simulate.test:
        Updated for Bug#34283
      mysql-test/suite/binlog/t/binlog_mixed_load_data.test:
        Added the test file to verify that 'load data infile...' statement
        will go to row-based in mixed mode.
      mysql-test/suite/binlog/t/binlog_stm_blackhole.test:
        Updated for Bug#34283
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
        Updated for Bug#34283
      mysql-test/suite/rpl/t/rpl_loaddata_fatal.test:
        Updated for Bug#34283
      mysql-test/suite/rpl/t/rpl_loaddata_map.test:
        Updated for Bug#34283
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test:
        Updated for Bug#34283
      mysql-test/suite/rpl/t/rpl_stm_log.test:
        Updated for Bug#34283
      sql/sql_load.cc:
        Added code to go to row-based in mixed mode for
        'load data infile ...' statement
      ead6ae2c
  8. 02 Aug, 2010 1 commit
  9. 31 Jul, 2010 3 commits
  10. 30 Jul, 2010 9 commits
    • Davi Arnaut's avatar
      Revert revision which disabled the generating of configuration · ff42a2ef
      Davi Arnaut authored
      scripts if cmake is available. We need to always generate the
      scripts in order for the dual cmake/autotools support to work.
      ff42a2ef
    • Davi Arnaut's avatar
      Bug#45288: pb2 returns a lot of compilation warnings on linux · 705ae384
      Davi Arnaut authored
      Fix compiler warnings.
      
      mysys/stacktrace.c:
        Tag unused parameters.
      sql/sql_lex.cc:
        Variable becomes unused in non-debug builds. Also, no need to
        assert the obvious.
      705ae384
    • Alexander Nozdrin's avatar
      Update .bzrignore. · 7b52ffa1
      Alexander Nozdrin authored
      7b52ffa1
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk-bugfixing. · f203f617
      Alexander Nozdrin authored
      ******
      This patch fixes the following bugs:
        - Bug#5889: Exit handler for a warning doesn't hide the warning in
          trigger
        - Bug#9857: Stored procedures: handler for sqlwarning ignored
        - Bug#23032: Handlers declared in a SP do not handle warnings generated
          in sub-SP
        - Bug#36185: Incorrect precedence for warning and exception handlers
      
      The problem was in the way warnings/errors during stored routine execution
      were handled. Prior to this patch the logic was as follows:
      
        - when a warning/an error happens: if we're executing a stored routine,
          and there is a handler for that warning/error, remember the handler,
          ignore the warning/error and continue execution.
      
        - after a stored routine instruction is executed: check for a remembered
          handler and activate one (if any).
      
      This logic caused several problems:
      
        - if one instruction generates several warnings (errors) it's impossible
          to choose the right handler -- a handler for the first generated
          condition was chosen and remembered for activation.
      
        - mess with handling conditions in scopes different from the current one.
      
        - not putting generated warnings/errors into Warning Info (Diagnostic
          Area) is against The Standard.
      
      The patch changes the logic as follows:
      
        - Diagnostic Area is cleared on the beginning of each statement that
          either is able to generate warnings, or is able to work with tables.
      
        - at the end of a stored routine instruction, Diagnostic Area is left
          intact.
      
        - Diagnostic Area is checked after each stored routine instruction. If
          an instruction generates several condition, it's now possible to take a
          look at all of them and determine an appropriate handler.
      
      mysql-test/r/signal.result:
        Update result file:
          1. handled conditions are not cleared any more;
          2. reflect changes in signal.test
      mysql-test/r/signal_demo3.result:
        Update result file: handled conditions are not cleared any more.
        Due to playing with max_error_count, resulting warning lists
        have changed.
      mysql-test/r/sp-big.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/r/sp-bugs.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/r/sp-code.result:
        Update result file:
          1. handled conditions are not cleared any more.
          2. add result for a new test case in sp-code.test.
      mysql-test/r/sp-error.result:
        Update result file:
          1. handled conditions are not cleared any more.
          2. add result for a new test case in sp-error.test.
      mysql-test/r/sp.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/r/sp_trans.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/r/strict.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/r/view.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/suite/funcs_1/r/innodb_storedproc_02.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/suite/funcs_1/r/memory_storedproc_02.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/suite/funcs_1/r/myisam_storedproc_02.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/suite/funcs_1/r/storedproc.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/suite/rpl/r/rpl_row_sp005.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/suite/rpl/r/rpl_row_trig003.result:
        Update result file: handled conditions are not cleared any more.
      mysql-test/t/signal.test:
        Make a test case more readable in the result file.
      mysql-test/t/sp-code.test:
        Add a test case for Bug#23032 checking that
        No Data takes precedence on Warning.
      mysql-test/t/sp-error.test:
        Adding test cases for:
          - Bug#23032
          - Bug#36185
          - Bug#5889
          - Bug#9857
      mysql-test/t/sp.test:
        Fixing test case to reflect behavioral changes made by the patch.
      sql/sp_head.cc:
        Reset the per-statement warning count before executing
        a stored procedure instruction.
        
        Move to a separate function code which checks the
        completion status of the executed statement and searches
        for a handler.
        
        Remove redundant code now that search for a handler is
        done after execution, errors are always pushed.
      sql/sp_pcontext.h:
        Remove unused code.
      sql/sp_rcontext.cc:
        - Polish sp_rcontext::find_handler(): use sp_rcontext::m_hfound instead
          of an extra local variable;
        
        - Remove sp_rcontext::handle_condition();
        
        - Introduce sp_rcontext::activate_handler(), which prepares
          previously found handler for execution.
        
        - Move sp_rcontext::enter_handler() code into activate_handler(),
          because enter_handler() is used only from there;
        
        - Cleanups;
        
        - Introduce DBUG_EXECUTE_IF() for a test case in sp-code.test
      sql/sp_rcontext.h:
        - Remove unused code
        - Cleanups
      sql/sql_class.cc:
        Merge THD::raise_condition_no_handler() into THD::raise_condition().
        After the patch raise_condition_no_handler() was called
        in raise_condition() only.
      sql/sql_class.h:
        Remove raise_condition_no_handler().
      sql/sql_error.cc:
        Remove Warning_info::reserve_space() -- handled conditions are not
        cleared any more, so there is no need for RESIGNAL to re-push them.
      sql/sql_error.h:
        Remove Warning_info::reserve_space().
      sql/sql_signal.cc:
        Handled conditions are not cleared any more,
        so there is no need for RESIGNAL to re-push them.
      f203f617
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk-bugfixing. · 3ad5e9bd
      Alexander Nozdrin authored
      3ad5e9bd
    • Luis Soares's avatar
    • Luis Soares's avatar
      7d0ca7ab
    • Luis Soares's avatar
      374a6fd2
    • Georgi Kodinov's avatar
      null merge · 9e0fbca7
      Georgi Kodinov authored
      9e0fbca7