1. 16 Mar, 2007 1 commit
    • unknown's avatar
      Bug#26231 - select count(*) on myisam table returns wrong value · 396f84aa
      unknown authored
                  when index is used
      
      When the table contained TEXT columns with empty contents
      ('', zero length, but not NULL) _and_ strings starting with
      control characters like tabulator or newline, the empty values
      were not found in a "records in range" estimate. Hence count(*)
      missed these records.
      
      The reason was a different set of search flags used for key
      insert and key range estimation.
      
      I decided to fix the set of flags used in range estimation.
      Otherwise millions of databases around the world would require
      a repair after an upgrade.
      
      The consequence is that the manual must be fixed, which claims
      that TEXT columns are compared with "end space padding". This
      is true for CHAR/VARCHAR but wrong for TEXT. See also bug 21335.
      
      
      myisam/mi_range.c:
        Bug#26231 - select count(*) on myisam table returns wrong value
                    when index is used
        Added SEARCH_UPDATE to the search flags so that it compares
        like write/update/delete operations do. Only so it expects
        the keys at the place where they have been inserted.
      myisam/mi_search.c:
        Bug#26231 - select count(*) on myisam table returns wrong value
                    when index is used
        Added some comments to explain how _mi_get_binary_pack_key()
        works.
      mysql-test/r/myisam.result:
        Bug#26231 - select count(*) on myisam table returns wrong value
                    when index is used
        Added a test.
      mysql-test/t/myisam.test:
        Bug#26231 - select count(*) on myisam table returns wrong value
                    when index is used
        Added test result.
      396f84aa
  2. 05 Mar, 2007 1 commit
    • unknown's avatar
      Bug#26464 - insert delayed + update + merge = corruption · da9c659c
      unknown authored
      Using INSERT DELAYED on MERGE tables could lead to table
      corruptions.
      
      The manual lists a couple of storage engines, which can be
      used with INSERT DELAYED. MERGE is not in this list.
      
      The attempt to try it anyway has not been rejected yet.
      This bug was not detected earlier as it can work under
      special circumstances. Most notable is low concurrency.
      
      To be safe, this patch rejects any attempt to use INSERT
      DELAYED on MERGE tables.
      
      
      mysql-test/r/merge.result:
        Bug#26464 - insert delayed + update + merge = corruption
        Added test result.
      mysql-test/t/merge.test:
        Bug#26464 - insert delayed + update + merge = corruption
        Added test.
      sql/ha_myisammrg.h:
        Bug#26464 - insert delayed + update + merge = corruption
        Removed HA_CAN_INSERT_DELAYED flag from table_flags().
        The insert delayed thread upgrades the lock from the first
        entry in MYSQL_LOCK::locks only. Hence it is incapable to
        handle MERGE tables, which have as many entries in this
        array as they have MyISAM sub-tables.
      da9c659c
  3. 13 Feb, 2007 2 commits
  4. 12 Feb, 2007 4 commits
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1-opt · 38fa86a1
      unknown authored
      into  mysql.com:/home/hf/work/25492/my41-25492
      
      
      38fa86a1
    • unknown's avatar
      bug #25492 (Invalid deallocation in mysql_stmt_fetch) · fd76e148
      unknown authored
      
      libmysqld/lib_sql.cc:
        code modified to prevent freeing of memory that wasn't malloc-ed.
        Now we check if MYSQL_STMT::result was used.
      fd76e148
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-maint · 8a34c4bb
      unknown authored
      into  mysql.com:/home/tnurnberg/24660/41-24660
      
      
      sql/table.cc:
        Auto merged
      8a34c4bb
    • unknown's avatar
      Bug#24660: "enum" field type definition problem · 4dc7c1aa
      unknown authored
      ENUMs weren't allowed to have character 0xff, a perfectly good character in some locales.
      This was circumvented by mapping 0xff in ENUMs to ',', thereby prevent actual commas from
      being used. Now if 0xff makes an appearance, we find a character not used in the enum and
      use that as a separator. If no such character exists, we throw an error.
      
      Any solution would have broken some sort of existing behaviour. This solution should
      serve both fractions (those with 0xff and those with ',' in their enums), but
      WILL REQUIRE A DUMP/RESTORE CYCLE FROM THOSE WITH 0xff IN THEIR ENUMS. :-/
      That is, mysqldump with their current server, and restore when upgrading to one with
      this patch.
      
      
      mysql-test/r/type_enum.result:
        Bug#24660: "enum" field type definition problem
        
        Show that enums can now contain NAMES_SEP_CHAR (0xff, which is a perfectly respectable
        char in some locales), or ',', or both.
      mysql-test/t/type_enum.test:
        Bug#24660: "enum" field type definition problem
        
        Show that enums can now contain NAMES_SEP_CHAR (0xff, which is a perfectly respectable
        char in some locales), or ',', or both.
      sql/table.cc:
        Bug#24660: "enum" field type definition problem
        
        Revert fix for Bug#20922.
      sql/unireg.cc:
        Bug#24660: "enum" field type definition problem
        
        Use a field-separator for ENUM-values that is not part of those values. If impossible,
        throw error.
      4dc7c1aa
  5. 08 Feb, 2007 2 commits
  6. 07 Feb, 2007 1 commit
  7. 06 Feb, 2007 8 commits
  8. 05 Feb, 2007 2 commits
  9. 02 Feb, 2007 5 commits
  10. 01 Feb, 2007 7 commits
    • unknown's avatar
      Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint · 3b801101
      unknown authored
      into  mysql.com:/home/ram/work/b26012/b26012.4.1
      
      
      sql/field.h:
        Auto merged
      3b801101
    • unknown's avatar
      Fix for bug #26012: missed Field_double::size_of() · 4e1772e9
      unknown authored
      As we have Field_double::not_fixed we must have Field_double::size_of().
      
      
      sql/field.h:
        Fix for bug #26012: missed Field_double::size_of()
          - Field_double::size_of() added.
      4e1772e9
    • unknown's avatar
      Merge dev3-63.(none):/home/zhl/mysql/tree-merge/4.1/mysql-4.1-ndb-bj · bdd52e89
      unknown authored
      into  dev3-63.(none):/home/zhl/mysql/tree-merge/4.1/mysql-4.1-ndb
      
      
      bdd52e89
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 5698114c
      unknown authored
      into  chilla.local:/home/mydev/mysql-4.1-axmrg
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      5698114c
    • unknown's avatar
      Valgrind error fixes · 2df29225
      unknown authored
      Notes:
      This patch doesn't fix all issues in the tree and we need jani's fix for that
      This patch shoud not be merged into 5.0
      
      
      mysql-test/r/ps.result:
        result fix
      mysql-test/r/symlink.result:
        result fix
      mysql-test/t/ps.test:
        test is moved to 'symlink' test
      mysql-test/t/symlink.test:
        test from 'ps' test
      sql/field_conv.cc:
        valgrind error fix: backport from 5.0
      sql/mysqld.cc:
        release of ssl_context
      vio/viosslfactories.c:
        release of ssl_context
      mysql-test/valgrind.supp:
        New BitKeeper file ``mysql-test/valgrind.supp''
        This file is backported from 5.0, added suppressing of OpenSSL errors
      2df29225
    • unknown's avatar
      Merge chilla.local:/home/mydev/mysql-4.0-axmrg · 62fdcb54
      unknown authored
      into  chilla.local:/home/mydev/mysql-4.1-axmrg
      
      
      include/my_global.h:
        Auto merged
      include/my_pthread.h:
        Auto merged
      include/thr_alarm.h:
        Auto merged
      mysys/default.c:
        Auto merged
      mysys/my_pthread.c:
        Auto merged
      mysys/thr_alarm.c:
        Auto merged
      mysys/my_thr_init.c:
        Manual merged
      sql/mysqld.cc:
        Manual merged
      62fdcb54
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines · a94b1b50
      unknown authored
      into  chilla.local:/home/mydev/mysql-4.1-axmrg
      
      
      a94b1b50
  11. 31 Jan, 2007 7 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint · 70fe372a
      unknown authored
      into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
      
      
      configure.in:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      scripts/mysqld_multi.sh:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      70fe372a
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 659a1255
      unknown authored
      into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
      
      
      configure.in:
        Auto merged
      mysql-test/r/range.result:
        Auto merged
      mysql-test/t/range.test:
        Auto merged
      659a1255
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint · 53946550
      unknown authored
      into  qualinost.(none):/home/mtaylor/src/mysql-4.1-maint
      
      
      53946550
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-4.1-engines · ab3abe12
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/WL3567/mysql-4.1-engines
      
      
      ab3abe12
    • unknown's avatar
      WL#3567 - MERGE engine: a check for underlying table conformance · f7b3c7c5
      unknown authored
      When a merge table is opened compare column and key definition of
      underlying tables against column and key definition of merge table.
      
      If any of underlying tables have different column/key definition
      refuse to open merge table.
      
      
      mysql-test/r/merge.result:
        A test case for WL#3456.
      mysql-test/t/merge.test:
        A test case for WL#3456.
      sql/ha_myisam.cc:
        Moved a part of code that converts TABLE object to MyISAM key and column
        definition to a separate function.
        
        Added check_definition() function that compares MyISAM table definitions.
      sql/ha_myisammrg.cc:
        Check if underlying table definition conforms to merge table definition,
        and in case underlying table definition differs, refuse to open merge
        table.
      f7b3c7c5
    • unknown's avatar
      Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint · fee0649c
      unknown authored
      into  mysql.com:/home/ram/work/b19690/b19690.4.1
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      fee0649c
    • unknown's avatar
      fix for bug #19690: ORDER BY eliminates rows from the result · faad7355
      unknown authored
      Depending on the queries we use different data processing methods
      and can lose some data in case of double (and decimal in 4.1) fields.
      
      The fix consists of two parts:
      1. double comparison changed, now double a is equal to double b 
      if (a-b) is less than 5*0.1^(1 + max(a->decimals, b->decimals)). 
      For example, if a->decimals==1, b->decimals==2, a==b if (a-b)<0.005
      2. if we use a temporary table, store double values there as is 
      to avoid any data conversion (rounding).
      
      
      mysql-test/r/type_float.result:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - test result
      mysql-test/t/type_float.test:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - test case
      sql/field.cc:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - use not_fixed flag instead of dec to check bounds.
      sql/field.h:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - Field_Double::not_fixed flag introduced, which is set if dec == NOT_FIXED_DEC
            and is used in the ::store() to check bounds. 
          - new constructor introduced (with not_fixed_arg parameter).
      sql/init.cc:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - fill log_01[] array with 0.1 powers.
      sql/item_cmpfunc.cc:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - compare_real_fixed() and compare_e_real_fixed() introduced,
            they consider double a == double b if a-b is less than 'precision',
            'precision' is set to 5*0.1^(1 + max(a->decimals, b->decimals)), 
            for example, if a->decimals==1, b->decimals==2, 'precision' is 0.005
          - use the above functions if both arguments are fixed.
      sql/item_cmpfunc.h:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - Arg_comparator::presision introduced.
          - Arg_comparator::compare_real_fixed(), Arg_comparator::compare_e_real_fixed() introduced.
      sql/mysql_priv.h:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - log_01 array of 0.1 powers added.
      sql/mysqld.cc:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - log_01 array of 0.1 powers added.
      sql/sql_select.cc:
        fix for bug #19690: ORDER BY eliminates rows from the result
          - if we create double field in a temporary table, set not_fixed flag
            (use proper constructor) to avoid data conversion 
            in the Field_double::store(). Otherwise we can lose some data.
      faad7355