1. 06 Apr, 2010 1 commit
  2. 05 Apr, 2010 1 commit
  3. 01 Apr, 2010 1 commit
  4. 31 Mar, 2010 1 commit
    • Mats Kindahl's avatar
      WL#5030: Split and remove mysql_priv.h · 23d8586d
      Mats Kindahl authored
      This patch:
      
      - Moves all definitions from the mysql_priv.h file into
        header files for the component where the variable is
        defined
      - Creates header files if the component lacks one
      - Eliminates all include directives from mysql_priv.h
      - Eliminates all circular include cycles
      - Rename time.cc to sql_time.cc
      - Rename mysql_priv.h to sql_priv.h
      23d8586d
  5. 26 Mar, 2010 1 commit
  6. 24 Mar, 2010 3 commits
    • Alexey Kopytov's avatar
    • Alexey Kopytov's avatar
      Manual merge of mysql-trunk into mysql-trunk-merge. · d95c1e3b
      Alexey Kopytov authored
      Conflicts:
      
      Text conflict in client/mysqlbinlog.cc
      Text conflict in mysql-test/Makefile.am
      Text conflict in mysql-test/collections/default.daily
      Text conflict in mysql-test/r/mysqlbinlog_row_innodb.result
      Text conflict in mysql-test/suite/rpl/r/rpl_typeconv_innodb.result
      Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
      Text conflict in mysql-test/suite/rpl/t/rpl_row_create_table.test
      Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test
      Text conflict in mysql-test/suite/rpl/t/rpl_typeconv_innodb.test
      Text conflict in mysys/charset.c
      Text conflict in sql/field.cc
      Text conflict in sql/field.h
      Text conflict in sql/item.h
      Text conflict in sql/item_func.cc
      Text conflict in sql/log.cc
      Text conflict in sql/log_event.cc
      Text conflict in sql/log_event_old.cc
      Text conflict in sql/mysqld.cc
      Text conflict in sql/rpl_utility.cc
      Text conflict in sql/rpl_utility.h
      Text conflict in sql/set_var.cc
      Text conflict in sql/share/Makefile.am
      Text conflict in sql/sql_delete.cc
      Text conflict in sql/sql_plugin.cc
      Text conflict in sql/sql_select.cc
      Text conflict in sql/sql_table.cc
      Text conflict in storage/example/ha_example.h
      Text conflict in storage/federated/ha_federated.cc
      Text conflict in storage/myisammrg/ha_myisammrg.cc
      Text conflict in storage/myisammrg/myrg_open.c
      d95c1e3b
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk-bugfixing. · ae715642
      Alexander Nozdrin authored
      ae715642
  7. 23 Mar, 2010 2 commits
  8. 22 Mar, 2010 9 commits
  9. 21 Mar, 2010 3 commits
  10. 20 Mar, 2010 3 commits
  11. 19 Mar, 2010 7 commits
    • Vladislav Vaintroub's avatar
      Fix errors when building release · b1073a22
      Vladislav Vaintroub authored
      - package some more perl scripts on Windows (mysqlhotcopy and mysqldumpslow)
      - do not try to pack .map files (no more produced)
      - (CMake-unrelated) fix debug build on FreeBSD, trying to use uninitialized attribute
      MY_MUTEX_INIT_FAST
      b1073a22
    • Sergey Glukhov's avatar
      Bug#51242 HAVING clause on table join produce incorrect results · ad6e00e3
      Sergey Glukhov authored
      The problem is that when we make conditon for
      grouped result const part of condition is cut off.
      It happens because some parts of 'having' condition
      which refer to outer join become const after
      make_join_statistics. These parts may be lost
      during further having condition transformation
      in JOIN::exec. The fix is adding 'having'
      condition check for const tables after
      make_join_statistics is performed.
      
      
      mysql-test/r/having.result:
        test case
      mysql-test/t/having.test:
        test result
      sql/sql_select.cc:
        added 'having' condition check for const tables
        after make_join_statistics is performed.
      ad6e00e3
    • Andrei Elkin's avatar
      Bug #51648 DBUG_SYNC_POINT is not defined on all platforms and mtr cant pre-check that · c3cd608a
      Andrei Elkin authored
      
      DBUG_SYNC_POINT has at least one strong limitation that it's not defined
      on all platforms. It has issues cooperating with @@debug.
      All in all its functionality is superseded by DEBUG_SYNC facility and
      there is no reason to maintain the old less flexible one.
      
      Fixed with adding debug_sync_set_action() function as a facility to set up
      a sync-action in the server sources code and re-writing existing simulations
      (found 3) to use it.
      Couple of tests have been reworked as well.
      
      The patch offers a pattern for setting sync-points in replication threads
      where the standard DEBUG_SYNC does not suffice to reach goals.
      
      
      
      
      
      mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test:
        rewriting the test from GET_LOCK()-based to DEBUG_SYNC-based;
        a pattern of usage DEBUG_SYNC for replication testing is provided.
      mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result:
        results are changed.
      mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test:
        rewriting the test from GET_LOCK()-based to DEBUG_SYNC-based;
        limiting the test to run only with MIXED binlog-format as the test last
        some 10 secs sensitively contributing to the total of tests run.
      mysql-test/suite/rpl/t/rpl_show_slave_running.test:
        rewriting the test from GET_LOCK()-based to DEBUG_SYNC-based.
      sql/debug_sync.cc:
        adding debug_sync_set_action() function as a facility to set up
        a sync-action in the server sources code.
      sql/debug_sync.h:
        externalizing debug_sync_set_action().
      sql/item_func.cc:
        purging sources from DBUG_SYNC_POINT.
      sql/mysql_priv.h:
        purging sources from DBUG_SYNC_POINT.
      sql/slave.cc:
        rewriting failure simulations to base on DEBUG_SYNC rather than GET_LOCK()-based DBUG_SYNC_POINT.
      sql/sql_repl.cc:
        removing an orphan failure simulation line because no counterpart in tests existing.
      c3cd608a
    • Alexey Kopytov's avatar
      Manual merge. · 72afe82a
      Alexey Kopytov authored
      72afe82a
    • Martin Hansson's avatar
      Post-push fix to disable a subset of the test case for Bug#47762. · a76b8f9a
      Martin Hansson authored
      This has been back-ported from 6.0 as the problems proved to afflict 
      5.1 as well.
      The fix exposed two new bugs. They were reported as follows.
            
      Bug no 52174: Sometimes wrong plan when reading a MAX value 
      from non-NULL index
            
      Bug no 52173: Reading NULL value from non-NULL index gives wrong 
      result in embedded server 
            
      Both bugs taken together affect a much smaller class of queries than #47762, 
      so the fix stays for now.
      a76b8f9a
    • Sergey Glukhov's avatar
      Bug#51598 Inconsistent behaviour with a COALESCE statement inside an IN comparison · d1c2e850
      Sergey Glukhov authored
      Optimizer erroneously translated LEFT JOIN into INNER JOIN.
      It leads to cutting rows with NULL right side. It happens
      because Item_row uses not_null_tables() method form the
      base(Item) class and does not calculate 'null tables'
      properly. The fix is adding calculation of 'not null tables'
      to Item_row.
      
      
      mysql-test/r/join_outer.result:
        test result
      mysql-test/t/join_outer.test:
        test case
      sql/item_row.cc:
        adding calculation of 'not null tables' to Item_row.
      sql/item_row.h:
        adding calculation of 'not null tables' to Item_row.
      d1c2e850
    • Sergey Glukhov's avatar
      Bug#51494 crash with join, explain and 'sounds like' operator · caa1ccb0
      Sergey Glukhov authored
      The crash happens because of discrepancy between values of
      conts_tables and join->const_table_map(make_join_statisctics).
      Calculation of conts_tables used condition with
      HA_STATS_RECORDS_IS_EXACT flag check. Calculation of
      join->const_table_map does not use this flag check.
      In case of MERGE table without union with index
      the table does not become const table and
      thus join_read_const_table() is not called
      for the table. join->const_table_map supposes
      this table is const and later in make_join_select
      this table is used for making&calculation const
      condition. As table record buffer is not populated
      it leads to crash.
      The fix is adding a check if an engine supports
      HA_STATS_RECORDS_IS_EXACT flag before updating
      join->const_table_map.
      
      
      mysql-test/r/merge.result:
        test result
      mysql-test/t/merge.test:
        test case
      sql/sql_select.cc:
        adding a check if an engine supports
        HA_STATS_RECORDS_IS_EXACT flag before updating
        join->const_table_map.
      caa1ccb0
  12. 18 Mar, 2010 3 commits
    • Alexey Kopytov's avatar
      Bug #8433: Overflow must be an error · 2acfdc50
      Alexey Kopytov authored
       
      All numeric operators and functions on integer, floating point 
      and DECIMAL values now throw an 'out of range' error rather 
      than returning an incorrect value or NULL,  when the result is 
      out of supported range for the corresponding data type. 
       
      Some test cases in the test suite had to be updated 
      accordingly either because the test case itself relied on a 
      value returned in case of a numeric overflow, or because a 
      numeric overflow was the root cause of the corresponding bugs. 
      The latter tests are no longer relevant, since the expressions 
      used to trigger the corresponding bugs are not valid anymore. 
      However, such test cases have been adjusted and kept "for the 
      record". 
      
      mysql-test/r/func_math.result:
        Added test cases for bug #8433. 
        Updated results of the test case for bug #31236.
      mysql-test/r/func_misc.result:
        Streamlined test cases.
      mysql-test/r/func_test.result:
        Streamlined test cases.
      mysql-test/r/select.result:
        Streamlined test cases.
      mysql-test/r/sp.result:
        Streamlined test cases.
      mysql-test/r/strict.result:
        Streamlined test cases.
      mysql-test/r/type_newdecimal.result:
        Streamlined test cases.
      mysql-test/suite/sys_vars/r/sql_slave_skip_counter_basic.result:
        Streamlined test cases.
      mysql-test/suite/sys_vars/t/sql_slave_skip_counter_basic.test:
        Streamlined test cases.
      mysql-test/t/func_math.test:
        Added test cases for bug #8433. 
        Updated results of the test case for bug #31236.
      mysql-test/t/func_misc.test:
        Streamlined test cases.
      mysql-test/t/func_test.test:
        Streamlined test cases.
      mysql-test/t/select.test:
        Streamlined test cases.
      mysql-test/t/sp.test:
        Streamlined test cases.
      mysql-test/t/strict.test:
        Streamlined test cases.
      mysql-test/t/type_newdecimal.test:
        Streamlined test cases.
      sql/item_create.cc:
        Changed Item_func_cot() to be defined as a standalone Item
        rather than a combination of "1 / TAN(x)".
      sql/item_func.cc:
        Throw an 'out of range' error rather than returning an  
        incorrect value or NULL,  when the result of a numeric 
        operator or a function is out of supported range for  
        the corresponding data type.
      sql/item_func.h:
        Added validation helpers as inline methods of Item_func.
      sql/share/errmsg-utf8.txt:
        New ER_DATA_OUT_OF_RANGE error.
      2acfdc50
    • John H. Embretsen's avatar
      Bug#52060 - test udf fails on Snow Leopard · b4537076
      John H. Embretsen authored
      reverse DNS lookup of "localhost" returns "broadcasthost" on Snow Leopard, and NULL on most others.
      Simply ignore the output, as this is not an essential part of UDF testing.
      b4537076
    • Omer BarNir's avatar
      Test suites for engine testing, moved from test-extra so will be available · c92b9b73
      Omer BarNir authored
      for general use.
      
      
      mysql-test/Makefile.am:
        Adding directories of additional test suites
      mysql-test/mysql-stress-test.pl:
        Adding check for additional errors checking during test run
      c92b9b73
  13. 17 Mar, 2010 5 commits
    • Vladislav Vaintroub's avatar
      Bug #52149 - packaging differences in CMake build · c8e32a83
      Vladislav Vaintroub authored
      Corrected some packaging bugs:
      - install mysqlservices library
      - install libmysqlclient_r.so.{16,16.0.0} as links
        to libmysqlclient.so
      - install libmysqld-debug.a
      - install my_safe_process, my_safe_kill and
        symlinks to mysql-test-run.pl (mtr, mysql-test-run)
        into correct place ${INSTALL_MYSQLTESTDIR}
      
      
      cmake/install_layout.cmake:
        Fix typo
      cmake/install_macros.cmake:
        Refactor INSTALL_SYMLINK to allow arbitrary symlink paths.
        Old version of this macro would make link extension the same 
        as in target. This was not sufficient in some scenarios 
        (would not allow for example libmysqlclient_r.so.16=>./libmysqlclient.so 
        link)
      libmysql/CMakeLists.txt:
        Install extra symlinks to libmysqlclient.so
        (libmysqlclient_r.so.16 and libmysqlclient_r.so.16.0.0)
        for backward compatiblity.
      libmysqld/CMakeLists.txt:
        install libmysqld-debug.a
      libservices/CMakeLists.txt:
        install mysqlservices library
      mysql-test/lib/My/SafeProcess/CMakeLists.txt:
        install my_safe_process, my_safe_kill into  correct place
      c8e32a83
    • Mats Kindahl's avatar
      Merging with mysql-5.1-bugteam · 96d4a038
      Mats Kindahl authored
      96d4a038
    • Mats Kindahl's avatar
      BUG#49618: Field length stored incorrectly in binary log · 2c5f439d
      Mats Kindahl authored
                 for InnoDB
                  
      The class Field_bit_as_char stores the metadata for the
      field incorrecly because bytes_in_rec and bit_len are set
      to (field_length + 7 ) / 8 and 0 respectively, while
      Field_bit has the correct values field_length / 8 and
      field_length % 8.
                  
      Solved the problem by re-computing the values for the
      metadata based on the field_length instead of using the
      bytes_in_rec and bit_len variables.
                  
      To handle compatibility with old server, a table map
      flag was added to indicate that the bit computation is
      exact. If the flag is clear, the slave computes the
      number of bytes required to store the bit field and
      compares that instead, effectively allowing replication
      *without conversion* from any field length that require
      the same number of bytes to store.
      
      
      mysql-test/suite/rpl/t/rpl_typeconv_innodb.test:
        Adding test to check compatibility for bit field
        replication when using InnoDB
      sql/field.cc:
        Extending compatible_field_size() with flags from
        table map to allow fields to check master info.
      sql/field.h:
        Extending compatible_field_size() with flags from
        table map to allow fields to check master info.
      sql/log.cc:
        Removing table map flags since they are not used
        outside table map class.
      sql/log_event.cc:
        Removing flags parameter from table map constructor
        since it is not used and does not have to be exposed.
      sql/log_event.h:
        Adding flag to denote that bit length for bit field type
        is exact and not potentially rounded to even bytes.
      sql/rpl_utility.cc:
        Adding fields to table_def to store table map flags.
      sql/rpl_utility.h:
        Removing obsolete comment and adding flags to store
        table map flags from master.
      2c5f439d
    • Georgi Kodinov's avatar
      Bug #49838: DROP INDEX and ADD UNIQUE INDEX for same index may corrupt · ae49d971
      Georgi Kodinov authored
         definition at engine
      
      If a single ALTER TABLE contains both DROP INDEX and ADD INDEX using 
      the same index name (a.k.a. index modification) we need to disable 
      in-place alter table because we can't ask the storage engine to have 
      two copies of the index with the same name even temporarily (if we 
      first do the ADD INDEX and then DROP INDEX) and we can't modify 
      indexes that are needed by e.g. foreign keys if we first do 
      DROP INDEX and then ADD INDEX.
      Fixed the problem by disabling in-place ALTER TABLE for these cases.
      ae49d971
    • Luis Soares's avatar
      Merged bundle from bug report. · 9c1918a7
      Luis Soares authored
      9c1918a7