1. 25 May, 2010 6 commits
  2. 24 May, 2010 1 commit
    • unknown's avatar
      Bug #49741 test files contain explicit references to bin/relay-log positions · 7e80f1c5
      unknown authored
      Some of the test cases reference to binlog position and
      these position numbers are written into result explicitly.
      It is difficult to maintain if log event format changes. 
      
      There are a couple of cases explicit position number appears, 
      we handle them in different ways
      A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options
         Use --replace_result to mask them.
      B. 'SHOW BINLOG EVENT ...'
         Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. 
         show_binlog_events.inc file's function is enhanced by given
         $binlog_file and $binlog_limit.
      C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc'
         For the test cases just care a few items in the result of 'SHOW SLAVE STATUS',
         only the items related to each test case are showed.
         'show_slave_status.inc' is rebuild, only the given items in $status_items
         will be showed.
         'check_slave_is_running.inc' and 'check_slave_no_error.inc'
         and 'check_slave_param.inc' are auxiliary files helping
         to show running status and error information easily.
      
      
      mysql-test/extra/binlog_tests/binlog.test:
        It only cares whether current binlog file index is changed, so it is ok
        with 'show_master_status.inc' instead of 'show mater status'.
      mysql-test/extra/binlog_tests/blackhole.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/extra/rpl_tests/rpl_deadlock.test:
        Use 'check_slave_is_running.inc' instead of 'show_slave_status2.inc'.
      mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
        Use 'wait_for_slave_sql_error.inc' and 'ait_for_slave_sql_error_and_skip.inc' instead of 'show slave status'.
      mysql-test/extra/rpl_tests/rpl_flsh_tbls.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test:
        It is need now to give a error number, so use 'wait_for_slave_io_to_stop.inc'
        instead of 'wait_for_slave_io_error.inc'.
      mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/extra/rpl_tests/rpl_log.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
        se 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
        se 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/extra/rpl_tests/rpl_reset_slave.test:
        Use 'show_slave_status.inc' instead of 'show_slave_status2.inc' statement.
        Use 'check_slave_no_error.inc' to simplify the check that there is no error.
      mysql-test/extra/rpl_tests/rpl_row_basic.test:
        Use 'check_slave_is_running.inc' to verify that Slave threads are running well.
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
      mysql-test/extra/rpl_tests/rpl_row_tabledefs.test:
        Use 'show_slave_error_status_and_skip.inc' instead of 'show slave status'.
      mysql-test/include/check_slave_is_running.inc:
        To make sure both sql and io thread are running well. If not, the test will be aborted.
      mysql-test/include/check_slave_no_error.inc:
        To make sure both sql and io thread have no error. If not, the test will be aborted.
      mysql-test/include/get_relay_log_pos.inc:
        According to the position of a log event in master binlog file,
        find the peer position of a log event in relay log file.
      mysql-test/include/rpl_stmt_seq.inc:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/include/show_binlog_events.inc:
        Add two options $binlog_file and $binlog_limit for showing binlog events from different binlog files or/and given different limits on position or row number.
      mysql-test/include/show_rpl_debug_info.inc:
        Add 'SELECT NOW()' in the debug information.
      mysql-test/include/show_slave_status.inc:
        It's more clean and tidy Only the given columns of slave status are printed.
      mysql-test/include/test_fieldsize.inc:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/include/wait_for_binlog_event.inc:
        Use show_rpl_debug_info.inc instead of 'SHOW BINLOG EVENTS'.
      mysql-test/include/wait_for_slave_io_error.inc:
        Add $slave_io_errno and $show_slave_io_error, it waits only a given error.
      mysql-test/include/wait_for_slave_param.inc:
        Use die instead of exit.
      mysql-test/include/wait_for_slave_sql_error.inc:
        Add $slave_sql_errno and $show_slave_sql_error, it waits only a given error.
      mysql-test/include/wait_for_status_var.inc:
        Use die instead of exit.
      mysql-test/r/flush_block_commit_notembedded.result:
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/r/multi_update.result:
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/suite/binlog/r/binlog_innodb.result:
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/suite/binlog/r/binlog_row_binlog.result:
        Position in the result of 'show master status' is replaced by '#'.
      mysql-test/suite/binlog/r/binlog_stm_binlog.result:
        Position in the result of 'show master status' is replaced by '#'.
      mysql-test/suite/binlog/t/binlog_innodb.test:
        It checks whether somethings are binlogged, so we use 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/suite/binlog/t/binlog_stm_binlog.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/bugs/r/rpl_bug36391.result:
        Position in the result of 'show master status' is replaced by '#'.
      mysql-test/suite/bugs/t/rpl_bug12691.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/bugs/t/rpl_bug36391.test:
        'show master status' is replaced by 'show_master_status.inc'.
        Position in the result of 'show master status' is replaced by '#'.
      mysql-test/suite/engines/funcs/r/rpl_000015.result:
        It checks whether somethings are binlogged, 
        so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/suite/engines/funcs/t/rpl_000015.test:
        Use 'check_slave_is_running.inc' to verify that Slave threads are running well.
      mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test:
        Use 'query_vertical SHOW SLAVE STATUS' instead of 'show slave status'.
        There is no status columns in the result file, for no slave exists on master's server.
      mysql-test/suite/engines/funcs/t/rpl_change_master.test:
        This test just care whether Read_Master_Log_Pos is equal to Exec_Master_Log_Pos after 'CHANGE MASTER ..'. So 'show slave status' is removed and just check the value of Read_Master_Log_Pos and Exec_Master_Log_Pos.
      mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test:
        We doesn't really need the statement.
      mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test:
        Just show Relay_Log_File, running status and error informations.
        Use 'check_slave_is_running.inc' to verify that Slave threads are running well.
      mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/engines/funcs/t/rpl_log_pos.test:
        Mask the explicit positions in the result file.
        Use 'check_slave_no_error.inc' to simplify the check that there is no error.
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/engines/funcs/t/rpl_row_drop.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/engines/funcs/t/rpl_row_until.test:
        Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
        
        Mask the explicit binary log positions in the result file.
      mysql-test/suite/engines/funcs/t/rpl_server_id1.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
        Use 'check_slave_no_error.inc' to simplify the check that there is no error.
      mysql-test/suite/engines/funcs/t/rpl_server_id2.test:
        It doesn't really need in this test.
      mysql-test/suite/engines/funcs/t/rpl_slave_status.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/manual/t/rpl_replication_delay.test:
        Use 'show_slave_status.inc' instead of 'show slave status'.
      mysql-test/suite/parts/t/rpl_partition.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl/include/rpl_mixed_ddl.inc:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_000015.test:
        Use 'show_slave_status.inc' instead of 'show_slave_status2.inc'.
      mysql-test/suite/rpl/t/rpl_binlog_grant.test:
        Use 'wait_for_binlog_event.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_bug33931.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/rpl/t/rpl_change_master.test:
        This test just care whether Read_Master_Log_Pos is equal to Exec_Master_Log_Pos after 'CHANGE MASTER ..'. So 'show slave status' is removed and just check the value of Read_Master_Log_Pos and Exec_Master_Log_Pos.
      mysql-test/suite/rpl/t/rpl_critical_errors.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
        Mask the explicit position numbers in result file.
        It is restricted running on SBR, for it want to binlog 'set @A=1' statement.
      mysql-test/suite/rpl/t/rpl_empty_master_crash.test:
        It doesn't need in this test.
      mysql-test/suite/rpl/t/rpl_flushlog_loop.test:
        UUse 'check_slave_is_running.inc' and 'show_slave_status.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test:
        Use 'wait_for_slave_io_error.inc' to wait the given io thread error happening.
      mysql-test/suite/rpl/t/rpl_grant.test:
        It doesn't need in this test.
      mysql-test/suite/rpl/t/rpl_incident.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl/t/rpl_known_bugs_detection.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/rpl/t/rpl_loaddata_fatal.test:
        Use 'wait_for_slave_sql_error_and_skip.inc' to wait the given sql thread error happening and then skip the event. There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/rpl/t/rpl_log_pos.test:
        Use 'wait_for_slave_io_error.inc' to wait the given io thread error happening.
        There is no need to print the result of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_replicate_do.test:
        Use 'show_slave_status.inc' instead of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_rotate_logs.test:
        Use 'show_slave_status.inc' instead of 'show_slave_status2.inc'.
      mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_row_create_table.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_row_drop.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_row_until.test:
        Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
      mysql-test/suite/rpl/t/rpl_skip_error.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_slave_skip.test:
        Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and mask the explicit position number in the 'CHANGE MASTER' statements.
      mysql-test/suite/rpl/t/rpl_sp.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_ssl.test:
        Use 'show_slave_status.inc' instead of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_ssl1.test:
        Use 'show_slave_status.inc' instead of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_stm_until.test:
        Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
      mysql-test/suite/rpl/t/rpl_temporary_errors.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave status'.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test:
        Mask master_log_pos and master_log_file
      mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/t/alter_table-big.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/t/create-big.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/t/ctype_cp932_binlog_stm.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/t/flush_block_commit_notembedded.test:
        It checks whether somethings are binlogged, 
        so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/t/multi_update.test:
        It checks whether somethings are binlogged, 
        so we using 'wait_binlog_event.inc' instead of 'show master status'.
      mysql-test/t/sp_trans_log.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      7e80f1c5
  3. 23 May, 2010 1 commit
  4. 21 May, 2010 2 commits
    • Gleb Shchepa's avatar
      Bug #53804: serious flaws in the alter database .. upgrade · d72a4710
      Gleb Shchepa authored
                  data directory name command
      
      The check_db_name function has been modified to validate tails of
      #mysql50#-prefixed database names for compliance with MySQL 5.0
      database name encoding rules (the check_table_name function call
      has been reused).
      
      
      mysql-test/r/renamedb.result:
        Updated test case.
      mysql-test/r/upgrade.result:
        Test case for bug #53804.
      mysql-test/t/renamedb.test:
        Updated test case.
      mysql-test/t/upgrade.test:
        Test case for bug #53804.
      sql/mysql_priv.h:
        Bug #53804: serious flaws in the alter database .. upgrade
                    data directory name command
        
        The check_mysql50_prefix has been added.
      sql/sql_table.cc:
        Bug #53804: serious flaws in the alter database .. upgrade
                    data directory name command
        
        - The check_mysql50_prefix has been added.
        - The check_n_cut_mysql50_prefix function has been refactored
        to share code with new check_mysql50_prefix function.
      sql/table.cc:
        Bug #53804: serious flaws in the alter database .. upgrade
                    data directory name command
        
        The check_db_name function has been modified to validate tails of
        #mysql50#-prefixed database names for compliance with MySQL 5.0
        database name encoding rules.
      d72a4710
    • Mattias Jonsson's avatar
      merge into mysql-5.1-bugteam · 6ef03ea3
      Mattias Jonsson authored
      sql/ha_partition.cc:
        Bug#49477, added safety that a partitioned table cannot be
        temporary.
      6ef03ea3
  5. 20 May, 2010 2 commits
    • Sven Sandberg's avatar
      BUG#52987: mysqldump fails if umask=0077 · 37b02cd7
      Sven Sandberg authored
      Problem: The test case mysqldump reads a file that must
      be world-readable. The test did not force the file to be
      world-readable, so if the tree was branched with a umask
      of 0077, the test would fail.
      Fix: chmod the file.
      
      
      mysql-test/t/mysqldump.test:
        Added chmod so that the file is guaranteed to be world-readable.
      37b02cd7
    • Sergey Glukhov's avatar
      Bug#52884 mysql-test-run does not work with --debug option · b8af4ab2
      Sergey Glukhov authored
      Server crashes on 64bit linux with 'double free or corruption'
      message, on 32bit mysql-test-run silently fails on bootstrap
      stage. The problem is that FreeState() is called twice
      for init_settings struct in _db_end_ function.
      The fix is to remove superfluous FreeState() call.
      Additional fix:
      fixed discrepancy of result file when
      debug & valgrind options are enabled
      for MTR.
      
      dbug/dbug.c:
        The problem is that FreeState() is called twice
        for init_settings struct in _db_end_ function.
        The fix is to remove superfluous FreeState() call.
      mysql-test/r/variables_debug.result:
        fixed discrepancy of result file when
        debug & valgrind options are enabled
        for MTR.
      mysql-test/t/variables_debug.test:
        fixed discrepancy of result file when
        debug & valgrind options are enabled
        for MTR.
      sql/set_var.cc:
        fixed discrepancy of result file when
        debug & valgrind options are enabled
        for MTR.
      b8af4ab2
  6. 19 May, 2010 4 commits
  7. 18 May, 2010 1 commit
    • Sergey Glukhov's avatar
      Bug#48729 SELECT ... FROM INFORMATION_SCHEMA.ROUTINES causes memory to grow · 36be33b0
      Sergey Glukhov authored
      Analysis showed that in case of accessing I_S table
      ROUTINES we perform unnecessary allocations
      with get_field() function for every processed row that
      in their turn causes significant memory growth.
      the fix is to avoid use of get_field().
      
      
      sql/sql_show.cc:
        Functions store_schema_proc() are changed
        to avoid use of get_field() function.
      36be33b0
  8. 16 May, 2010 3 commits
  9. 14 May, 2010 1 commit
    • Gleb Shchepa's avatar
      Bug #53450: Crash / assertion "virtual int · 9cbb009b
      Gleb Shchepa authored
                  ha_myisam::index_first(uchar*)") at assert.c:81
      
      Single-table DELETE crash/assertion similar to single-table
      UPDATE bug 14272.
      
      Same resolution as for the bug 14272:
      Don't run index scan when we should use quick select.
      This could cause failures because there are table handlers (like federated)
      that support quick select scanning but do not support index scanning.
      
      
      mysql-test/r/delete.result:
        Test case for bug #53450.
      mysql-test/t/delete.test:
        Test case for bug #53450.
      sql/sql_delete.cc:
        Bug #53450: Crash / assertion "virtual int
                    ha_myisam::index_first(uchar*)") at assert.c:81
        
        The mysql_delete function has been modified to not to use
        init_read_record_idx instead of init_read_record for the
        quick select.
      9cbb009b
  10. 13 May, 2010 1 commit
  11. 12 May, 2010 3 commits
    • Ramil Kalimullin's avatar
      Fix for bug#52051: Aggregate functions incorrectly returns · feb03a82
      Ramil Kalimullin authored
            NULL from outer join query
            
            Problem: optimising MIN/MAX() queries without GROUP BY clause
            by replacing the aggregate expression with a constant, we may set it
            to NULL disregarding the fact that there may be outer joins involved.
            
            Fix: don't replace MIN/MAX() with NULL if there're outer joins.
            
            Note: the fix itself is just
            - if (!count)
            + if (!count && !outer_tables)
                set to NULL
            
            The rest of the patch eliminates repeated code to improve speed
            and for easy maintenance of the code.
      
      
      mysql-test/r/group_by.result:
                Fix for bug#52051: Aggregate functions incorrectly returns
                NULL from outer join query
                  - test result.
      mysql-test/t/group_by.test:
                Fix for bug#52051: Aggregate functions incorrectly returns
                NULL from outer join query
                  - test case.
      sql/opt_sum.cc:
                Fix for bug#52051: Aggregate functions incorrectly returns
                NULL from outer join query
                  - optimising MIN/MAX() queries without GROUP BY clause by
                replacing them with a constant, take into account that
                there're may be outer joins involved.
                  - repeated code for MIN/MAX optimization in the opt_sum_query()
                eliminated by introducing new functions that read MIN/MAX values
                using index and combining MIN/MAX cases to one.
      feb03a82
    • Staale Smedseng's avatar
      Bug #49756 Rows_examined is always 0 in the slow query log for · 330864fc
      Staale Smedseng authored
      update statements
            
      Only SELECT statements report any examined rows in the slow
      log. Slow UPDATE, DELETE and INSERT statements report 0 rows
      examined, unless the statement has a condition including a
      SELECT substatement.
            
      This patch adds counting of examined rows for the UPDATE and
      DELETE statements. An INSERT ... VALUES statement will still 
      not report any rows as examined.
      
      
      
      sql/sql_class.h:
        Added more docs for THD::examined_row_count.
      sql/sql_delete.cc:
        Add incrementing thd->examined_row_count.
      sql/sql_update.cc:
        Add incrementing thd->examined_row_count.
      330864fc
    • Sven Sandberg's avatar
      BUG#50410: rpl_ndb tests should run with binlog_format=row · 29c8c152
      Sven Sandberg authored
      Problem: The rpl_ndb did not set binlog_format explicitly. Since
      the default is binlog_format=statement, it means that the suite
      ran with that. ndb does not support binlog_format=statement,
      and many tests were skipped because they sourced
      include/have_binlog_format_row_or_mixed.inc
      Fix: set binlog_format=row explicitly in the configuration file
      for the rpl_ndb suite.
      
      
      Makefile.am:
        Removed duplicate run of rpl_ndb suite with binlog_format=row.
        Now that rpl_ndb is run with binlog_format=row by default, this
        run that explicitly changes to binlog_format=row is not needed,
        because it is covered by the following run.
      mysql-test/suite/rpl_ndb/my.cnf:
        cluster only supports binlog_format=row.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result:
        updated result file
      mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test:
        This test is supposed to use binlog_format=STATEMENT on
        master. It uses innodb on master, so statement format is
        supported.
      29c8c152
  12. 11 May, 2010 2 commits
    • Martin Hansson's avatar
      00cd994d
    • Martin Hansson's avatar
      Bug#48157: crash in Item_field::used_tables · 79e60f0a
      Martin Hansson authored
            
      MySQL handles the join syntax "JOIN ... USING( field1,
      ... )" and natural joins by building the same parse tree as
      a corresponding join with an "ON t1.field1 = t2.field1 ..."
      expression would produce. This parse tree was not cleaned up
      properly in the following scenario. If a thread tries to
      lock some tables and finds that the tables were dropped and
      re-created while waiting for the lock, it cleans up column
      references in the statement by means a per-statement free
      list. But if the statement was part of a stored procedure,
      column references on the stored procedure's free list
      weren't cleaned up and thus contained pointers to freed
      objects.
            
      Fixed by adding a call to clean up the current prepared
      statement's free list.
      
      This is a backport from MySQL 5.1
      79e60f0a
  13. 10 May, 2010 3 commits
    • Mattias Jonsson's avatar
      merge · 6fa04cad
      Mattias Jonsson authored
      6fa04cad
    • Martin Hansson's avatar
      Bug#50939: Loose Index Scan unduly relies on engine to · 6d0425b1
      Martin Hansson authored
      remember range endpoints
      
      The Loose Index Scan optimization keeps track of a sequence
      of intervals. For the current interval it maintains the
      current interval's endpoints. But the maximum endpoint was
      not stored in the SQL layer; rather, it relied on the
      storage engine to retain this value in-between reads. By
      coincidence this holds for MyISAM and InnoDB. Not for the
      partitioning engine, however.
      
      Fixed by making the key values iterator 
      (QUICK_RANGE_SELECT) keep track of the current maximum endpoint.
      This is also more efficient as we save a call through the
      handler API in case of open-ended intervals.
      
      The code to calculate endpoints was extracted into 
      separate methods in QUICK_RANGE_SELECT, and it was possible to
      get rid of some code duplication as part of fix.
      6d0425b1
    • Jim Winstead's avatar
      Using an initial command with mysql_options(..., MYSQL_INIT_COMMAND, ...) · 6170e64f
      Jim Winstead authored
      that generated multiple result sets (such as a stored procedure or a
      multi-statement command) would leave the connection unusable. (Bug #42373)
      
      A side-effect of this bug fix is to make MYSQL_INIT_COMMAND settings ignored
      when connecting from within the server, but none of the existing mechanisms
      for connecting from within the server use or need to set the initial command.
      6170e64f
  14. 09 May, 2010 1 commit
  15. 08 May, 2010 1 commit
    • He Zhenxing's avatar
      Bug#53189 Table map version unused and can be removed · df0b6707
      He Zhenxing authored
      MYSQL_BIN_LOG m_table_map_version member and it's associated 
      functions were not used in the logic of binlogging and replication,
      this patch removed all related code.
      
      sql/log.cc:
        removed unused m_table_map_version variable and functions
      sql/log.h:
        removed unused m_table_map_version variable and functions
      sql/log_event.h:
        Removed unused LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F flag
      sql/sql_class.cc:
        Removed unused LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F flag
      sql/sql_load.cc:
        Removed unused LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F flag
      sql/table.cc:
        removed unused table_map_version variable
      sql/table.h:
        removed unused table_map_version variable
      df0b6707
  16. 07 May, 2010 3 commits
    • Luis Soares's avatar
      BUG#49522: Replication problem with mixed MyISAM/InnoDB · 2646306c
      Luis Soares authored
      When using a non-transactional table (t1) on the master 
      and with autocommit disabled, no COMMIT is recorded 
      in the binary log ending the statement. Therefore, if 
      the slave has t1 in a transactional engine, then it will 
      be as if a transaction is started but never ends. This is
      actually BUG#29288 all over again.
      
      We fix this by cherrypicking the cset for BUG#29288 which
      was pushed to a later mysql version. The revision picked
      was: mats@sun.com-20090923094343-bnheplq8n95opjay .
      
      Additionally, a test case for covering the scenario depicted
      in the bug report is included in this cset.
      2646306c
    • Martin Hansson's avatar
      Merge of fix for Bug#52357 · 721ec081
      Martin Hansson authored
      721ec081
    • Sergey Glukhov's avatar
      Bug#53334 Incorrect result for InnoDB in LEFT JOIN with impossible condition · 278ae9a8
      Sergey Glukhov authored
      The fix actually reverts the change introduced
      by the patch for bug 51494.
      The fact is that patches for bugs 52177&48419
      fix bugs 51194&50575 as well.
      
      
      
      mysql-test/r/innodb_mysql.result:
        test case
      mysql-test/t/innodb_mysql.test:
        test case
      sql/sql_select.cc:
        reverted wrong fix for bug 51494
      278ae9a8
  17. 06 May, 2010 3 commits
    • Gleb Shchepa's avatar
      Bug #53088: mysqldump with -T & --default-character-set set · bd2a517b
      Gleb Shchepa authored
                  truncates text/blob to 766 chars
      
      mysqldump and SELECT ... INTO OUTFILE truncated long BLOB/TEXT
      values to size of 766 bytes (MAX_FIELD_WIDTH or 255 * 3 + 1).
      
      The select_export::send_data method has been modified to
      reallocate a conversion buffer for long field data.
      
      
      mysql-test/r/mysqldump.result:
        Test case for bug #53088.
      mysql-test/r/outfile_loaddata.result:
        Test case for bug #53088.
      mysql-test/t/mysqldump.test:
        Test case for bug #53088.
      mysql-test/t/outfile_loaddata.test:
        Test case for bug #53088.
      sql/sql_class.cc:
        Bug #53088: mysqldump with -T & --default-character-set set
                    truncates text/blob to 766 chars
        
        The select_export::send_data method has been modified to
        reallocate a conversion buffer for long field data.
      bd2a517b
    • Martin Hansson's avatar
      Merge of fix for Bug#52357 · 0c82d3f3
      Martin Hansson authored
      0c82d3f3
    • Martin Hansson's avatar
      Bug#52357: Assertion failed: join->best_read in · 1eada910
      Martin Hansson authored
      greedy_search optimizer_search_depth=0
      
      The algorithm inside restore_prev_nj_state failed to
      properly update the counters within the NESTED_JOIN
      tree. The counter was decremented each time a table in the
      node was removed from the QEP, the correct thing to do being
      only to decrement it when the last table in the child node
      was removed from the plan. This lead to node counters
      getting negative values and the plan thus appeared
      impossible. An assertion caught this.
      
      Fixed by not recursing up the tree unless the last table in
      the join nest node is removed from the plan
      1eada910
  18. 05 May, 2010 1 commit
    • Georgi Kodinov's avatar
      On behalf of Kristofer : · addd0a3e
      Georgi Kodinov authored
      Bug#53417 my_getwd() makes assumptions on the buffer sizes which not always hold true
            
      The mysys library contains many functions for rewriting file paths. Most of these
      functions makes implicit assumptions on the buffer sizes they write to. If a path is put
      in my_realpath() it will propagate to my_getwd() which assumes that the buffer holding
      the path name is greater than 2. This is not true in cases.
            
      In the special case where a VARBIN_ITEM is passed as argument to the LOAD_FILE function
      this can lead to a crash.
            
      This patch fixes the issue by introduce more safe guards agaist buffer overruns.
      addd0a3e
  19. 04 May, 2010 1 commit