1. 26 May, 2010 1 commit
  2. 25 May, 2010 2 commits
  3. 24 May, 2010 3 commits
    • Alexander Nozdrin's avatar
      Fix for Bug#53925 (valgrind failures in rpl.rpl_get_master_version_and_clock · eb27f163
      Alexander Nozdrin authored
      in mysql-trunk-merge).
      
      There were two problems:
        - a mistake during merge of a patch for Bug 52629 from 5.1;
        - MTR treated auxilary output of newer valgrind as an error.
      
      The fixes are:
        - Fix merge error;
        - Teach MTR to skip 'HEAP summary' section of valgrind output.
      eb27f163
    • Alexey Kopytov's avatar
      Fixed an incorrectly merged .result file. · 7ce0262b
      Alexey Kopytov authored
      7ce0262b
    • 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
  4. 23 May, 2010 2 commits
    • Alexey Kopytov's avatar
      Manual merge of mysql-5.1-bugteam to mysql-trunk-merge. · 598cf5ae
      Alexey Kopytov authored
      Conflicts:
      
         conflict      Makefile.am
         conflict      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
         conflict      mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test
         conflict      sql/opt_sum.cc
         conflict      sql/set_var.cc
         conflict      sql/sql_base.cc
         conflict      sql/sql_priv.h
         conflict      sql/sql_show.cc
      598cf5ae
    • Mattias Jonsson's avatar
      merge · f4e46c5c
      Mattias Jonsson authored
      f4e46c5c
  5. 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
  6. 20 May, 2010 4 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
    • Alexander Nozdrin's avatar
      Manual merge from mysql-trunk. · dabd4a1c
      Alexander Nozdrin authored
      Conflicts:
        - mysql-test/r/partition.result
        - mysql-test/r/variables_debug.result
        - mysql-test/t/partition.test
        - mysql-test/t/variables_debug.test
      dabd4a1c
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk-bugfixing. · a18861e4
      Alexander Nozdrin authored
      a18861e4
    • 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
  7. 19 May, 2010 7 commits
  8. 18 May, 2010 4 commits
  9. 17 May, 2010 2 commits
  10. 16 May, 2010 5 commits
  11. 14 May, 2010 3 commits
    • Alexander Nozdrin's avatar
      Patch for Bug#27863 (excessive memory usage for many small queries in a · 6facd4cb
      Alexander Nozdrin authored
      multiquery packet).
      
      Background:
      
        - a query can contain multiple SQL statements;
      
        - the server frees resources allocated to process a query when the
          whole query is handled. In other words, resources allocated to process
          one SQL statement from a multi-statement query are freed when all SQL
          statements are handled.
      
      The problem was that the parser allocated a buffer of size of the whole
      query for each SQL statement in a multi-statement query. Thus, if a query
      had many SQL-statements (so, the query was long), but each SQL statement
      was short, ther parser tried to allocate huge amount of memory (number of
      small SQL statements * length of the whole query).
      
      The memory was allocated for a so-called "cpp buffer", which is intended to
      store pre-processed SQL statement -- SQL text without version specific
      comments.
      
      The fix is to allocate memory for the "cpp buffer" once for all SQL
      statements (once for a query).
      6facd4cb
    • 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
    • Alexander Nozdrin's avatar
      Patch for Bug#21818 (Return value of ROW_COUNT() is incorrect · 4333980a
      Alexander Nozdrin authored
      for ALTER TABLE, LOAD DATA).
      
      ROW_COUNT is now assigned according to the following rules:
      
        - In my_ok():
          - for DML statements: to the number of affected rows;
          - for DDL statements: to 0.
      
        - In my_eof(): to -1 to indicate that there was a result set.
      
          We derive this semantics from the JDBC specification, where int
          java.sql.Statement.getUpdateCount() is defined to (sic) "return the
          current result as an update count; if the result is a ResultSet
          object or there are no more results, -1 is returned".
      
        - In my_error(): to -1 to be compatible with the MySQL C API and
          MySQL ODBC driver.
      
        - For SIGNAL statements: to 0 per WL#2110 specification. Zero is used
          since that's the "default" value of ROW_COUNT in the diagnostics area.
      
      sql/protocol.cc:
        Fix a typo.
      sql/sql_class.h:
        - Introduce THD::get_row_count_func() / THD::set_row_count_func();
        - Remove the CF_HAS_ROW_COUNT define
      sql/sql_parse.cc:
        CF_HAS_ROW_COUNT was eliminated.
      4333980a
  12. 13 May, 2010 1 commit
  13. 12 May, 2010 4 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
    • Jonathan Perkin's avatar
    • Jonathan Perkin's avatar
      Remove comments. · 31f5867f
      Jonathan Perkin authored
      31f5867f
    • Jonathan Perkin's avatar
      Changes to build using CMake according to existing release packages: · ce2aabb7
      Jonathan Perkin authored
       - Update/fix file layouts for each package type, add new types for
         native package formats including deb, rpm and svr4.
      
       - Build all plugins, including debug versions
      
       - Update compiler flags to match current release
      
       - Add missing @VAR@ expansions
      
       - Install correct mysqclient library symlinks
      
       - Fix icc/ia64 builds
      
       - Fix install of libmysqld-debug
      
       - Don't include mysql_embedded
      
       - Remove unpackaged manual pages to avoid missing files warnings
      
       - Don't install mtr's test suite
      ce2aabb7