1. 17 Jul, 2008 1 commit
    • Davi Arnaut's avatar
      Bug#33812: mysql client incorrectly parsing DELIMITER · c313a5af
      Davi Arnaut authored
      Revert fix for this bug as it introduced a regression
      reported in Bug#38158.
      
      
      client/mysql.cc:
        Revert changes introduced by fix for Bug#33812
      mysql-test/r/mysql.result:
        Revert changes introduced by fix for Bug#33812
      mysql-test/t/mysql_delimiter.sql:
        Revert changes introduced by fix for Bug#33812
      c313a5af
  2. 14 Jul, 2008 1 commit
  3. 30 Jun, 2008 2 commits
    • Joerg Bruehe's avatar
      Version 5.1.26 is labeled "rc". · 828d6a19
      Joerg Bruehe authored
      828d6a19
    • Mats Kindahl's avatar
      BUG#37426: RBR breaks for CHAR() UTF-8 fields > 85 chars · 711305e2
      Mats Kindahl authored
            
      In order to handle CHAR() fields, 8 bits were reserved for
      the size of the CHAR field. However, instead of denoting the
      number of characters in the field, field_length was used which
      denotes the number of bytes in the field.
      
      Since UTF-8 fields can have three bytes per character (and
      has been extended to have four bytes per character in 6.0),
      an extra two bits have been encoded in the field metadata
      work for fields of type Field_string (i.e., CHAR fields).
      
      Since the metadata word is filled, the extra bits have been
      encoded in the upper 4 bits of the real type (the most 
      significant byte of the metadata word) by computing the
      bitwise xor of the extra two bits. Since the upper 4 bits
      of the real type always is 1111 for Field_string, this 
      means that for fields of length <256, the encoding is
      identical to the encoding used in pre-5.1.26 servers, but
      for lengths of 256 or more, an unrecognized type is formed,
      causing an old slave (that does not handle lengths of 256
      or more) to stop.
      
      
      mysql-test/extra/rpl_tests/rpl_row_basic.test:
        Adding test cases for replicating UTF-8 fields of lengths
        of 256 or more (bytes).
      mysql-test/suite/binlog/r/binlog_base64_flag.result:
        Result file change.
      mysql-test/suite/binlog/t/binlog_base64_flag.test:
        Adding tests to trigger check that an error is generated when replicating from a
        5.1.25 server for tables with a CHAR(128) but not when replicating a table with a
        CHAR(63). Although the bug indicates that the limit is 83, we elected to use CHAR(63)
        since 6.0 uses 4-byte UTF-8, and anything exceeding 63 would then cause the test to fail
        when the patch is merged to 6.0.
      mysql-test/suite/bugs/combinations:
        Adding combinations file to run all bug reports in all binlog modes (where
        applicable).
      mysql-test/suite/bugs/r/rpl_bug37426.result:
        Result file change.
      mysql-test/suite/bugs/t/rpl_bug37426.test:
        Added test for reported bug.
      mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
        Result file change.
      sql/field.cc:
        Encoding an extra two bits in the most significant nibble (4 bits)
        of the metadata word. Adding assertions to ensure that no attempt
        is made to use lengths longer than supported.
        
        Extending compatible_field_size() function with an extra parameter
        holding a Relay_log_instace for error reporting.
        
        Field_string::compatible_field_size() now reports an error if field
        size for a CHAR is >255.
      sql/field.h:
        Field length is now computed from most significant 4 bits
        of metadata word, or is equal to the row pack length if
        there is no metadata.
        
        Extending compatible_field_size() function with an extra parameter
        holding a Relay_log_instace for error reporting.
      sql/rpl_utility.cc:
        Adding relay log parameter to compatible_field_size().
        
        Minor refactoring to eliminate duplicate code.
      sql/slave.cc:
        Extending rpl_master_has_bug() with a single-argument predicate function and
        a parameter to the predicate function. The predicate function can be used to
        test for extra conditions for the bug before writing an error message.
      sql/slave.h:
        Extending rpl_master_has_bug() with a single-argument predicate function and
        a parameter to the predicate function. The predicate function can be used to
        test for extra conditions for the bug before writing an error message.
        
        Also removing gratuitous default argument.
      sql/sql_insert.cc:
        Changing calls to rpl_master_has_bug() to adapt to changed signature.
      711305e2
  4. 27 Jun, 2008 3 commits
    • Joerg Bruehe's avatar
      Merge the fix for bug#37623 (Suffix "-64bit" is duplicated) · 8a2f17d1
      Joerg Bruehe authored
      from 5.0 into the 5.1.26 release clone.
      8a2f17d1
    • Joerg Bruehe's avatar
      OS X 10.5 is now a supported platform, · 30339550
      Joerg Bruehe authored
      so Apple's internal name ("darwin9") must be translated to ours ("osx10.5").
      30339550
    • Gleb Shchepa's avatar
      buckport to 5.1.26 from 6.0 · dc0e959a
      Gleb Shchepa authored
      Bug#35658 (An empty binary value leads to mysqld crash)
        
      Before this fix, the following token
        b''
      caused the parser to crash when reading the binary value from the empty string.
      The crash was caused by:
        ptr+= max_length - 1;
      because max_length is unsigned and was 0, causing an overflow.
        
      With this fix, an empty binary literal b'' is parsed as a binary value 0,
      in Item_bin_string.
      
      mysql-test/r/varbinary.result:
        Bug#35658 (An empty binary value leads to mysqld crash)
      mysql-test/t/varbinary.test:
        Bug#35658 (An empty binary value leads to mysqld crash)
      sql/item.cc:
        Bug#35658 (An empty binary value leads to mysqld crash)
      dc0e959a
  5. 20 Jun, 2008 3 commits
  6. 19 Jun, 2008 5 commits
    • Andrei Elkin's avatar
      Bug#36443 Server crashes when executing insert when insert trigger on table · e66ba2a7
      Andrei Elkin authored
                              
            The crash appeared to be a result of allocating an instance of Discrete_interval 
            automatically that that was referred in out-of-declaration scope.
                              
            Fixed with correcting backing up and restoring scheme of
            auto_inc_intervals_forced, introduced by bug#33029, by means of shallow copying;
            added simulation code that forces executing those fixes of the former bug that
            targeted at master-and-slave having incompatible bug#33029-prone versions.
      
      mysql-test/suite/bugs/r/rpl_bug33029.result:
        new results file
      mysql-test/suite/bugs/t/rpl_bug33029.test:
        test merely checks no crash happens on slave.
      sql/slave.cc:
        forcing to execute special logics implemented for bug#33029 if
        simulate_bug33029 the debug option is set.
      sql/sql_class.cc:
        swaps of backed and the actual auto_inc_intervals_forced basing on shallow coping.
      sql/structs.h:
        Removing the deep _copy() and methods associated with it;
        adding methods to Discrete_intervals_list:
            
        private `=', copy constructor to prevent using;
        private set_members();
        public  copy_shallow(), swap(), get_{head, tail, current}();
                empty_no_free() through set_members().
      e66ba2a7
    • Tatiana A. Nurnberg's avatar
      re 36818: rpl_server_id1 fails expecting slave has stopped · b4a45a71
      Tatiana A. Nurnberg authored
      On a slow environment like valgrind the test is vulnerable
      because it does not check if slave has stopped at time
      of the new session is requested `start slave;' -- disabling
      test till it is fixed.
      
      mysql-test/suite/rpl/t/disabled.def:
        disable rpl_server_id1 until test is fixed.
      b4a45a71
    • Tatiana A. Nurnberg's avatar
      Bug#36434: ha_innodb.so is installed in the wrong directory · b564002d
      Tatiana A. Nurnberg authored
      ha_innodb.so was incorrectly installed in the lib/mysql
      directory rather than in lib/mysql/plugin.
      
      Amending CS for 31736.
      
      storage/innobase/Makefile.am:
        Install innobase to plugin-dir, not lib-dir.
      b564002d
    • Tatiana A. Nurnberg's avatar
      Bug#35480: BOM detection code crashes mysql CLI with zero-sized input · 7887a52d
      Tatiana A. Nurnberg authored
      MySQL client crashed if no input was passed to it.
      
      client/mysql.cc:
        Check if there's any data before reading it!
      7887a52d
    • Tatiana A. Nurnberg's avatar
      Fixed bug #37004. · f13393db
      Tatiana A. Nurnberg authored
      The value of JOIN::tables must be set to 0 when there
      is no matching min/max row.
      
      mysql-test/r/subselect.result:
        Added a test case for bug #37004.
      mysql-test/t/subselect.test:
        Added a test case for bug #37004.
      f13393db
  7. 18 Jun, 2008 3 commits
    • Timothy Smith's avatar
    • Timothy Smith's avatar
      fix typo · 211e9c08
      Timothy Smith authored
      This change was committed to the 5.1.25 release clone, but never
      made it to the mysql-5.1 BK tree.  I'm committing it to mysql-5.1
      bzr now.
      211e9c08
    • Timothy Smith's avatar
      Bug #37024: Wrong location of messagefiles · 3facc822
      Timothy Smith authored
      make_binary_distribution.sh got clobbered by the 5.0 version during a merge.
      This caused a few packaging problems, including message files put in the wrong
      place and some missing files.  Fix is just to revert back to the 5.1 version
      from before the merge.
      
      Problem introduced in
      ChangeSet 1.2606.2.1 2008/05/13 15:56:07 kent@kent-amd64.(none)
      
      This change was made in the 5.1.25 release clone in BK, but never made it to the main mysql-5.1 BK tree.  I am adding it to mysql-5.1 bzr.
      3facc822
  8. 03 Jun, 2008 2 commits
  9. 30 May, 2008 1 commit
    • Georgi Kodinov's avatar
      Bug#37069: Make federated disabled by default · ea120c56
      Georgi Kodinov authored
      The federated storage engine is now disabled by default.
      mysql-test-run.pl is updated to enable it whenever it's required and available.
      
      mysql-test/lib/mtr_cases.pl:
        Bug#37069: mysql-test-run.pl automatically enables federated 
        for federated related tests
      sql/sql_plugin.cc:
        Bug#37069: federated is disabled by default
      ea120c56
  10. 22 May, 2008 2 commits
  11. 21 May, 2008 2 commits
  12. 20 May, 2008 7 commits
    • unknown's avatar
      Update test coverage for Bug#27430 "Crash in subquery code when in PS · 3433706a
      unknown authored
      and table DDL changed after PREPARE" to pass in embedded mode.
      
      
      mysql-test/r/ps.result:
        Update results (Bug#27430)
      mysql-test/r/ps_ddl.result:
        Update results (Bug#27430)
      mysql-test/t/ps.test:
        Add a test case for Bug#27430. ps.test is not run in --embedded-server,
        thus it now contains the part of the test for Bug#27430 that
        doesn't work in embedded server.
      mysql-test/t/ps_ddl.test:
        Move a part of the test for Bug#27430 that doesn't work
        in embedded server to ps.test, that includes not_embedded.inc.
      3433706a
    • unknown's avatar
      A number of fixes after a merge from the main 5.1 tree: · 7ce32c91
      unknown authored
      the local tree contains a fix for 
      Bug#32748 "Inconsistent handling of assignments to 
      general_log_file/slow_query_log_file",
      which changes output of a number of tests.
      
      
      mysql-test/r/general_log_file_basic.result:
        Update results (Bug#32748)
      mysql-test/r/log_output_basic.result:
        Update the test with results of the fix for Bug#32748
      mysql-test/r/slow_query_log_file_basic.result:
        Update the test with results of the fix for Bug#32748
      mysql-test/t/general_log_file_basic.test:
        Adjust to take into account the fix for Bug#32748 
        (a port from 6.0-bugteam)
      mysql-test/t/log_output_basic.test:
        Adjust to take into account the fix for Bug#32748 
        (a port from 6.0-bugteam)
      mysql-test/t/slow_query_log_file_basic.test:
        Adjust to take into account the fix for Bug#32748 
        (a port from 6.0-bugteam)
      tests/mysql_client_test.c:
        Fix a compilation warning.
      7ce32c91
    • unknown's avatar
      Bug#27430 "Crash in subquery code when in PS and table DDL changed · 3587539f
      unknown authored
      after PREPARE"
      Update test results after a merge with the main tree: the new minimum for 
      the table definition cache is 256.
      
      
      mysql-test/r/table_definition_cache_basic.result:
        Update test results: the new minimum for table definition cache is 256
      3587539f
    • unknown's avatar
      Bug#27430 "Crash in subquery code when in PS and table DDL changed after · 02c901ee
      unknown authored
       PREPARE", review fixes:
      - make the patch follow the specification of WL#4166 and remove  
      the new error that was originally introduced.
      Now the client never gets an error from reprepare, unless it failed.
      I.e. even if the statement at hand returns a completely different
      result set, this is not considered a server error.
      The C API library, that can not handle this situation, was modified to
      return a client error.
      Added additional test coverage.
      
      
      include/errmsg.h:
        Add a new client side error: now when we automatically
        reprepare a statement, the new result set may contain a different
        number of columns.
      include/mysql_com.h:
        Add a new server status to be sent to the client if the 
        number of columns in the result set is different.
      libmysql/errmsg.c:
        Add a new error message.
      libmysql/libmysql.c:
        Make the client library robust against a result set that
        contains a different number of columns from prepare time.
        Previously that could never happen, and we simply had an assert.
        That means in particular that all clients are advised to upgrade
        with transition to 5.1, if they are using prepared statements C API.
        Make mysql_stmt_store_result() and mysql_stmt_execute() robust against 
        "broken" statement handles (those that have an error).
      sql/sql_parse.cc:
        Clear transient server status flags at start of statement more 
        systematically.
      sql/share/errmsg.txt:
        Remove an error that is unused and is not part of any public release.
      sql/sql_prepare.cc:
        Instead of returning an error in case the number of result set columns
        has changed, simply update the client in server status.
        That will allow modern clients automatically recover from an error.
      tests/mysql_client_test.c:
        Add additional coverage to the cases when the number of result
        set columns changed as a result of reprepare.
        Cover conversion and truncation of result set columns.
      02c901ee
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · 4175806e
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-27430
      
      
      Makefile.am:
        Auto merged
      include/my_global.h:
        Auto merged
      mysql-test/include/mix1.inc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/my_decimal.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/set_var.h:
        Auto merged
      sql/sp.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      libmysqld/CMakeLists.txt:
        Manual merge.
      libmysqld/lib_sql.cc:
        Manual merge.
      mysql-test/t/disabled.def:
        Manual merge.
      4175806e
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-27430 · 4b13b5cb
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-27430
      
      
      sql/sql_base.cc:
        Manual merge.
      4b13b5cb
    • unknown's avatar
      Bug#27430 "Crash in subquery code when in PS and table DDL changed after · 37b2c32d
      unknown authored
      PREPARE": rename members, methods, classes to follow the spec 
      (a code review request)
      
      
      sql/mysql_priv.h:
        enum_metadata_type -> enum_table_ref_type
      sql/sp_head.cc:
        Metadata_version_observer -> Reprepare_observer
      sql/sql_base.cc:
        metadata -> table_ref
      sql/sql_class.cc:
        Replace an abstract interface with a concrete implementation.
      sql/sql_class.h:
        enum_metadata_type -> enum_table_ref_type
      sql/sql_prepare.cc:
        Move implementation of Execute_observer to sql_class.cc and
        rename the class to Reprepare_observer.
        Use getters instead of direct access to the members.
      sql/table.h:
        metadata -> table_ref
      37b2c32d
  13. 19 May, 2008 3 commits
  14. 18 May, 2008 5 commits
    • unknown's avatar
      Merge host.loc:/work/bk/5.0-bugteam · c5865cfd
      unknown authored
      into  host.loc:/work/bk/5.1-bugteam
      
      
      sql/sql_update.cc:
        Auto merged
      c5865cfd
    • unknown's avatar
      Merge host.loc:/work/bugs/5.0-bugteam-36676 · 8bc987ab
      unknown authored
      into  host.loc:/work/bk/5.0-bugteam
      
      
      8bc987ab
    • unknown's avatar
      Fixed bug#36676: multiupdate using LEFT JOIN updates only · 29e7fa25
      unknown authored
                       first row or fails with an error:
        ERROR 1022 (23000): Can't write; duplicate key in table ''
      
      The server uses intermediate temporary table to store updated
      row data.  The first column of this table contains rowid.
      Current server implementation doesn't reset NULL flag of that
      column even if the server fills a column with rowid.
      To keep each rowid unique, there is an unique index.
      An insertion into an unique index takes into account NULL
      flag of key value and ignores real data if NULL flag is set.
      So, insertion of actually different rowids may lead to two
      kind of problems.  Visible effect of each of these problems
      depends on an initial engine type of temporary table:
      
      1. If multiupdate initially creates temporary table as
      a MyISAM table (a table contains blob columns, and the
      create_tmp_table function assumes, that this table is
      large), it inserts only one single row and updates
      only rows with one corresponding rowid. Other rows are
      silently ignored. 
      
      2. If multiupdate initially creates MEMORY temporary
      table, fills it with data and reaches size limit for
      MEMORY tables (max_heap_table_size), multiupdate
      converts MEMORY table into MyISAM table and fails
      with an error:
        ERROR 1022 (23000): Can't write; duplicate key in table ''
      
      
      Multiupdate has been fixed to update the NULL flag of
      temporary table rowid columns.
      
      
      
      mysql-test/r/multi_update_tiny_hash.result:
        Added test case for bug#36676.
      mysql-test/t/multi_update_tiny_hash-master.opt:
        Added test case for bug#36676.
      mysql-test/t/multi_update_tiny_hash.test:
        Added test case for bug#36676.
      sql/sql_update.cc:
        Fixed bug#36676: multiupdate using LEFT JOIN updates only
                         first row or fails with an error:
          ERROR 1022 (23000): Can't write; duplicate key in table ''
        
        The multi_update::send_data method has been modified to reset null bits of
        fields containing rowids.
      29e7fa25
    • unknown's avatar
      Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-bugteam · 314e6e25
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-bugteam
      
      
      sql/handler.cc:
        Auto merged
      configure.in:
        merge 5.0-bugteam to 5.1-bugteam
      314e6e25
    • unknown's avatar
      Fix mysql_client_test failure in pushbuild 5.1-27430 · 1c12291b
      unknown authored
      (Bug#27430)
      
      
      sql/sql_prepare.cc:
        Fix a simple coding mistake.
      1c12291b