1. 13 Jan, 2010 1 commit
    • Mats Kindahl's avatar
      WL#5151: Conversion between different types when · a3c44675
      Mats Kindahl authored
               replicating
      
      Replace c_ptr() calls with c_ptr_safe() calls to
      avoid valgrind warnings.
      
      Adding code to to handle the case that no metadata
      was present in the table map for the column.
      
      Allow first parameter to unpack_row() to be NULL,
      in which case no source tables is used and hence
      no checks nor conversions are done.
      
      Clarifying some comments and fixing documentation
      for unpack_row().
      a3c44675
  2. 21 Dec, 2009 1 commit
    • Mats Kindahl's avatar
      WL#5151: Conversion between different types when replicating · a22bc99f
      Mats Kindahl authored
      Bug#49836 reports that the geometry type does not work
      with WL#5151 applied.
      
      The GEOMETRY type inherits the blob comparison function,
      which read the pack length from the metadata. The GEOMETRY
      type does not fill in the metadata with anything sensible,
      so it is always zero, meaning that the pack length for the
      source type is considered zero, rendering it always "smaller"
      than the target type which has pack length 4 (without pointer).
      
      This patch fixes the problem by defining
      Field_geom::pack_length_from_metadata() to always use the
      same as Field_geom::row_pack_length().
      a22bc99f
  3. 18 Dec, 2009 1 commit
    • Mats Kindahl's avatar
      WL#5151: Conversion between different types · b524f272
      Mats Kindahl authored
               when replicating
      
      The function create_virtual_tmp_table does not
      set db_low_byte_first in the same way as
      create_tmp_table does, causing copying from
      the virtual table to a real table to get strange
      values for SET types on big-endian machines.
      b524f272
  4. 16 Dec, 2009 2 commits
  5. 15 Dec, 2009 1 commit
    • Mats Kindahl's avatar
      BUG#49618: Field length stored incorrectly in binary log · f43ca025
      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.
      f43ca025
  6. 14 Dec, 2009 2 commits
    • Mats Kindahl's avatar
      WL#5151: Conversion between different types when replicating · c701fe6a
      Mats Kindahl authored
      Fixing minor error when printing SQL types from master and cleaning some code.
      
      Updating result files.
      c701fe6a
    • Mats Kindahl's avatar
      WL#5151: Conversion between different types when replicating · c63df11f
      Mats Kindahl authored
      Row-based replication requires the types of columns on the
      master and slave to be approximately the same (some safe
      conversions between strings are allowed), but does not
      allow safe conversions between fields of similar types such
      as TINYINT and INT.
      
      This patch implement type conversions between similar fields
      on the master and slave.
      
      The conversions are controlled using a new variable
      SLAVE_TYPE_CONVERSIONS of type SET('ALL_LOSSY','ALL_NON_LOSSY').
      
      Non-lossy conversions are any conversions that do not run the
      risk of losing any information, while lossy conversions can
      potentially truncate the value. The column definitions are
      checked to decide if the conversion is acceptable.
      
      If neither conversion is enabled, it is required that the
      definitions of the columns are identical on master and slave.
      
      Conversion is done by creating an internal conversion table,
      unpacking the master data into it, and then copy the data to
      the real table on the slave.
      c63df11f
  7. 21 Oct, 2009 1 commit
  8. 20 Oct, 2009 1 commit
  9. 19 Oct, 2009 2 commits
  10. 18 Oct, 2009 1 commit
  11. 17 Oct, 2009 1 commit
  12. 16 Oct, 2009 10 commits
  13. 15 Oct, 2009 8 commits
  14. 14 Oct, 2009 8 commits