An error occurred fetching the project authors.
  1. 07 Apr, 2011 1 commit
  2. 15 Mar, 2011 1 commit
  3. 22 Dec, 2009 1 commit
    • Alexey Kopytov's avatar
      Backport of WL #2934: Make/find library for doing float/double · 12f364ec
      Alexey Kopytov authored
                            to string conversions and vice versa" 
      Initial import of the dtoa.c code and custom wrappers around it 
      to allow its usage from the server code. 
       
      Conversion of FLOAT/DOUBLE values to DECIMAL ones or strings 
      and vice versa has been significantly reworked. As the new 
      algoritms are more precise than the older ones, results of such 
      conversions may not always match those obtained from older 
      server versions. This in turn may break compatibility for some 
      applications. 
       
      This patch also fixes the following bugs: 
      - bug #12860 "Difference in zero padding of exponent between 
      Unix and Windows" 
      - bug #21497 "DOUBLE truncated to unusable value" 
      - bug #26788 "mysqld (debug) aborts when inserting specific 
      numbers into char fields" 
      - bug #24541 "Data truncated..." on decimal type columns 
      without any good reason" 
      12f364ec
  4. 10 Sep, 2009 1 commit
    • Marc Alff's avatar
      WL#2110 (SIGNAL) · 63e56390
      Marc Alff authored
      WL#2265 (RESIGNAL)
      
      Manual merge of SIGNAL and RESIGNAL to mysql-trunk-signal,
      plus required dependencies.
      63e56390
  5. 21 May, 2009 1 commit
    • Ramil Kalimullin's avatar
      Fix for bug#44743: Join in combination with concat does not always work · 985df4dc
      Ramil Kalimullin authored
              bug#44766: valgrind error when using convert() in a subquery
      
      Problem: input and output buffers may be the same 
      converting a string to some charset. 
      That may lead to wrong results/valgrind warnings.  
      
      Fix: use different buffers.
      
      
      mysql-test/r/cast.result:
        Fix for bug#44743: Join in combination with concat does not always work
                bug#44766: valgrind error when using convert() in a subquery
          - test result.
      mysql-test/r/func_concat.result:
        Fix for bug#44743: Join in combination with concat does not always work
                bug#44766: valgrind error when using convert() in a subquery
          - test result.
      mysql-test/t/cast.test:
        Fix for bug#44743: Join in combination with concat does not always work
                bug#44766: valgrind error when using convert() in a subquery
          - test case.
      mysql-test/t/func_concat.test:
        Fix for bug#44743: Join in combination with concat does not always work
                bug#44766: valgrind error when using convert() in a subquery
          - test case.
      sql/item.cc:
        Fix for bug#44743: Join in combination with concat does not always work
                bug#44766: valgrind error when using convert() in a subquery
          - comment added.
      sql/item_strfunc.cc:
        Fix for bug#44743: Join in combination with concat does not always work
                bug#44766: valgrind error when using convert() in a subquery
          - '&args[0]->str_value' used as a parameter of args[0]->val_str(),
            as 'str' may be equal to 'str_value' which we use as the output buffer
            converting strings.
      sql/sql_string.cc:
        Fix for bug#44743: Join in combination with concat does not always work
                bug#44766: valgrind error when using convert() in a subquery
          - input and output buffers must NOT be the same.
      985df4dc
  6. 11 Dec, 2007 1 commit
    • unknown's avatar
      Bug#31990: MINUTE() and SECOND() return bogus results when used on a DATE · 08b256f9
      unknown authored
      HOUR(), MINUTE(), ... returned spurious results when used on a DATE-cast.
      This happened because DATE-cast object did not overload get_time() method
      in superclass Item. The default method was inappropriate here and
      misinterpreted the data.
      
      Patch adds missing method; get_time() on DATE-casts now returns SQL-NULL
      on NULL input, 0 otherwise. This coincides with the way DATE-columns
      behave.
      
      Also fixes similar bug in Date-Field now.
      
      
      mysql-test/r/cast.result:
        Show that HOUR(), MINUTE(), ... return sensible values when used
        on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
        Show that this coincides with how DATE-columns behave.
      mysql-test/r/type_date.result:
        Show that HOUR(), MINUTE(), ... return sensible values when used
        on DATE-fields.
      mysql-test/t/cast.test:
        Show that HOUR(), MINUTE(), ... return sensible values when used
        on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
        Show that this coincides with how DATE-columns behave.
      mysql-test/t/type_date.test:
        Show that HOUR(), MINUTE(), ... return sensible values when used
        on DATE-fields.
      sql/field.cc:
        Add get_time() method to DATE-field object to overload
        the method in Field superclass that would return spurious
        results. Return zero-result.
      sql/field.h:
        Add get_time() declaration to date-field class
      sql/item_timefunc.cc:
        Add get_time() method to DATE-cast object to overload
        the method in Item superclass that would return spurious
        results. Return zero-result; flag NULL if input was NULL.
      sql/item_timefunc.h:
        Add get_time() declaration to DATE-cast object.
      08b256f9
  7. 07 Dec, 2007 1 commit
    • unknown's avatar
      WL #2934 "Make/find library for doing float/double to string conversions · 04116597
      unknown authored
      and vice versa"
      Initial import of the dtoa.c code and custom wrappers around it to allow
      its usage from the server code.
      
      Conversion of FLOAT/DOUBLE values to DECIMAL ones or strings and vice
      versa has been significantly reworked. As the new algoritms are more
      precise than the older ones, results of such conversions may not always
      match those obtained from older server versions. This in turn may break
      compatibility for some applications.
      
      This patch also fixes the following bugs:
      - bug #12860 "Difference in zero padding of exponent between Unix and
      Windows"
      - bug #21497 "DOUBLE truncated to unusable value"
      - bug #26788 "mysqld (debug) aborts when inserting specific numbers into
      char fields"
      - bug #24541 "Data truncated..." on decimal type columns without any
      good reason"
      
      
      BitKeeper/deleted/.del-strtod.c:
        Rename: strings/strtod.c -> BitKeeper/deleted/.del-strtod.c
      client/Makefile.am:
        Added dtoa.c
      client/sql_string.cc:
        Replaced sprintf() with a new wrapper around dtoa()
      include/m_string.h:
        Added declarations for the new double to/from string conversion 
        functions.
      libmysql/Makefile.shared:
        Removed strtod.c, added dtoa.c
      libmysql/libmysql.c:
        Replaced sprintf() with my_gcvt(). We must use the same conversion
        method in both server and client lib.
      mysql-test/r/archive_gis.result:
        Fixed tests to take additional precision from dtoa() into account.
      mysql-test/r/cast.result:
        Fixed tests to take the formatting changes into account.
      mysql-test/r/func_group.result:
        Fixed tests to take additional precision from dtoa() into account.
      mysql-test/r/func_math.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
      mysql-test/r/func_str.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
      mysql-test/r/gis.result:
        Fixed tests to take additional precision from dtoa() into account.
      mysql-test/r/innodb_gis.result:
        Fixed tests to take additional precision from dtoa() into account.
      mysql-test/r/insert.result:
        Fixed tests to take additional precision from dtoa() into account.
      mysql-test/r/mysqldump.result:
        No need for result substitution since we do not rely on system behavior
        anymore.
      mysql-test/r/ndb_gis.result:
        Fixed tests to take additional precision from dtoa() into account.
      mysql-test/r/parser.result:
        Fixed tests to take additional precision from dtoa() into account.
      mysql-test/r/ps_2myisam.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
      mysql-test/r/ps_3innodb.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
      mysql-test/r/ps_4heap.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
      mysql-test/r/ps_5merge.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
      mysql-test/r/ps_7ndb.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
      mysql-test/r/select.result:
        Fixed tests to take additional precision from dtoa() into account.
      mysql-test/r/sp.result:
        Fixed tests to take additional precision from dtoa() into account.
        Decimal 2.7182818284590452354 is now converted to the double value of
        2.718281828459045, not 2.718281828459. Thus we get additional precision
        from the subsequent calculations.
      mysql-test/r/strict.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
      mysql-test/r/type_decimal.result:
        Added a test case for bug #24541.
      mysql-test/r/type_float.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
        Added test cases for bugs #12860, #21497 and #26788.
      mysql-test/r/type_newdecimal.result:
        Fixed tests to take additional precision from dtoa() and formatting
        changes into account.
      mysql-test/r/variables.result:
        Fixed tests to take the formatting changes into account.
      mysql-test/r/view.result:
        Fixed tests to take additional precision from dtoa() into account.
      mysql-test/t/cast.test:
        No need to replace the results for Windows anymore.
      mysql-test/t/insert.test:
        Added test cases from bug #26788.
      mysql-test/t/mysqldump.test:
        Fixed tests to take additional precision from dtoa() into account.
        No need for results substitution because we do not rely on system
        behavior anymore.
      mysql-test/t/type_decimal.test:
        Added a test case for bug #24541.
      mysql-test/t/type_float.test:
        Added test cases for bugs #12860, #21497 and #26788.
      mysql-test/t/type_newdecimal.test:
        Removed replace_result which is pointless with our own floating point
        conversion library.
        Added a reference for WL#3977.
      sql/field.cc:
        Replaced the field.cc's own constant for the maximum double->string 
        conversion buffer with the one defined in m_string.h
        Replaced double->string conversion code with the new wrappers around
        dtoa().
        Fixed a bug in Field_real::truncate() which led to incorrect results
        when +-Infinity was passed as an input number.
        Fixed Field_blob::store(double) to use NOT_FIXED_DEC instead of 2 as
        precision, so that my_gcvt() is now used for conversion.
      sql/field.h:
        Moved NOT_FIXED_DEC to m_string.h because we now use this constant in
        floating point <-> string conversion routines.
      sql/item.cc:
        If a result of a numeric functions is stored in a string field, follow
        the same rules as in Field_str::store(double), i.e. take the field width
        into account.
      sql/log_event.cc:
        Replaced sprintf() with my_gcvt().
      sql/mysql_priv.h:
        Moved log_10[] from strtod.c to mysqld.c, because we don't need it in
        libmystrings anymore.
      sql/mysqld.cc:
        Moved log_10[] from strtod.c to mysqld.c, because we don't need it in
        libmystrings anymore.
      sql/sql_show.cc:
        Replaced sprintf() with my_fcvt().
      sql/sql_string.cc:
        Replace the double->string conversion code with the new wrappers around
        dtoa().
      sql/unireg.h:
        Moved FLOATING_POINT_BUFFER from unireg.h to m_string.h so it can be
        used in libmystrings.
      strings/Makefile.am:
        Removed strtod.c, added dtoa.c
      strings/decimal.c:
        Replaced sprintf() with my_gcvt().
        Changed double2decimal() to print the digits to a string buffer, then
        use my_strtod().
      strings/dtoa.c:
        Initial import of the dtoa code and custom wrappers around it to allow
        its usage from the server code.
      04116597
  8. 08 Nov, 2007 1 commit
    • unknown's avatar
      Bug#31990: MINUTE() and SECOND() return bogus results when used on a DATE · b1fc4b9e
      unknown authored
      HOUR(), MINUTE(), ... returned spurious results when used on a DATE-cast.
      This happened because DATE-cast object did not overload get_time() method
      in superclass Item. The default method was inappropriate here and
      misinterpreted the data.
      
      Patch adds missing method; get_time() on DATE-casts now returns SQL-NULL
      on NULL input, 0 otherwise. This coincides with the way DATE-columns
      behave.
      
      
      mysql-test/r/cast.result:
        Show that HOUR(), MINUTE(), ... return sensible values when used
        on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
        Show that this coincides with how DATE-columns behave.
      mysql-test/t/cast.test:
        Show that HOUR(), MINUTE(), ... return sensible values when used
        on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
        Show that this coincides with how DATE-columns behave.
      sql/item_timefunc.cc:
        Add get_time() method to DATE-cast object to overload
        the method in Item superclass that would return spurious
        results. Return zero-result; flag NULL if input was NULL.
      sql/item_timefunc.h:
        Add get_time() declaration to DATE-cast object.
      b1fc4b9e
  9. 19 Jul, 2007 1 commit
    • unknown's avatar
      Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag. · a131428f
      unknown authored
      The Item_date_typecast::val_int function doesn't reset null_value flag.
      This makes all values that follows the first null value to be treated as nulls
      and led to a wrong result.
      
      Now the Item_date_typecast::val_int function correctly sets the null_value flag
      for both null and non-null values.
      
      
      mysql-test/t/cast.test:
        Added a test case for the bug#29898:  Item_date_typecast::val_int doesn't reset
        the null_value flag.
      mysql-test/r/cast.result:
        Added a test case for the bug#29898:  Item_date_typecast::val_int doesn't reset
        the null_value flag.
      sql/item_timefunc.cc:
        Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag.
        Now the Item_date_typecast::val_int function correctly sets the null_value flag
        for both null and non-null values.
      a131428f
  10. 10 May, 2007 1 commit
  11. 09 May, 2007 1 commit
    • unknown's avatar
      Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect · 82b7c543
      unknown authored
      Missing check for overflow added to the Item_decimal_typecast::val_decimal
      
      
      include/decimal.h:
        Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
        decimal_intg() declaration
      mysql-test/r/cast.result:
        Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
        result fixed
      mysql-test/r/type_newdecimal.result:
        Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
        test result
      mysql-test/t/type_newdecimal.test:
        Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
        test case added
      sql/item_func.cc:
        Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
        now we check for possible ovreflow in Item_decimal_typecast::val_decimal
      sql/my_decimal.h:
        Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
        my_decimal_intg() implemented
      strings/decimal.c:
        Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
        decimal_intg() implemented
      82b7c543
  12. 03 May, 2007 1 commit
    • unknown's avatar
      Bug#23656: Wrong conversion result of a DATETIME to integer using CAST function. · 1a0e3a28
      unknown authored
      The generic string to int conversion was used by the Item_func_signed and
      the Item_func_unsigned classes to convert DATE/DATETIME values to the
      SIGNED/UNSIGNED type. But this conversion produces wrong results for such
      values.
      
      Now if the item which result has to be converted can return its result as
      longlong then the item->val_int() method is used to allow the item to carry
      out the conversion itself and return the correct result.
      This condition is checked in the Item_func_signed::val_int() and the
      Item_func_unsigned::val_int() functions.
      
      
      mysql-test/t/cast.test:
        Added a test case for the bug#23656: Wrong conversion result of a DATETIME to integer using CAST function.
      mysql-test/r/cast.result:
        Added a test case for the bug#23656: Wrong conversion result of a DATETIME to integer using CAST function.
      sql/item_func.cc:
        Bug#23656: Wrong conversion result of a DATETIME to integer using CAST function.
        Now if the item which result has to be converted can return its result as
        longlong then the item->val_int() method is used to allow the item to carry
        out the conversion itself and return the correct result.
        This condition is checked in the Item_func_signed::val_int() and the
        Item_func_unsigned::val_int() functions.
      1a0e3a28
  13. 04 Dec, 2006 1 commit
    • unknown's avatar
      fix for bug #23938: ISNULL on DATE AND CAST AS DATE returns false for null values · 665004c8
      unknown authored
      Set null_value in case of wrong data.
      
      
      mysql-test/r/cast.result:
        fix for bug #23938: ISNULL on DATE AND CAST AS DATE returns false for null values
          - test result.
      mysql-test/t/cast.test:
        fix for bug #23938: ISNULL on DATE AND CAST AS DATE returns false for null values
          - test case.
      sql/item_timefunc.cc:
        fix for bug #23938: ISNULL on DATE AND CAST AS DATE returns false for null values
          - set null_value in case of error.
      665004c8
  14. 08 Aug, 2006 1 commit
    • unknown's avatar
      Bug#16172 DECIMAL data type processed incorrectly · 66f6b5ba
      unknown authored
      issue an 'overflow warning' if result value is bigger than max possible value
      
      
      include/decimal.h:
        Bug#16172 DECIMAL data type processed incorrectly
        new function decimal_intg()
      mysql-test/r/cast.result:
        Bug#16172 DECIMAL data type processed incorrectly
        result fix
      mysql-test/r/type_newdecimal.result:
        Bug#16172 DECIMAL data type processed incorrectly
        test result
      mysql-test/r/view.result:
        Bug#16172 DECIMAL data type processed incorrectly
        result fix
      mysql-test/t/type_newdecimal.test:
        Bug#16172 DECIMAL data type processed incorrectly
        test case
      sql/item_create.cc:
        Bug#16172 DECIMAL data type processed incorrectly
        do not increase decimal part on 2(according to manual)
      sql/my_decimal.h:
        Bug#16172 DECIMAL data type processed incorrectly
        new function my_decimal_intg()
      strings/decimal.c:
        Bug#16172 DECIMAL data type processed incorrectly
        new function decimal_intg()
      66f6b5ba
  15. 28 Jul, 2006 1 commit
    • unknown's avatar
      BUG#14940 "MySQL choose wrong index", v.2 · ef452e19
      unknown authored
      - Make the range-et-al optimizer produce E(#table records after table 
                                                 condition is applied),
      - Make the join optimizer use this value,
      - Add "filtered" column to EXPLAIN EXTENDED to show 
        fraction of records left after table condition is applied
      - Adjust test results, add comments
      
      
      mysql-test/r/archive_gis.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/auto_increment.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/bdb_gis.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/bench_count_distinct.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/binlog_stm_blackhole.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/case.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/cast.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/compress.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/ctype_collate.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/ctype_cp1250_ch.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/date_formats.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/distinct.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/fulltext.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_compress.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_crypt.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_default.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_encrypt.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_gconcat.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_group.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_if.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_in.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_like.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_math.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_op.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_regexp.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_set.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_str.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_system.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_test.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/func_time.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/gis.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/group_by.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/group_min_max.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/having.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/heap.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/heap_hash.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/index_merge.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/index_merge_innodb.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/index_merge_ror.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/innodb_gis.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/insert_update.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/join.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/join_nested.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/key_diff.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/myisam.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/ndb_gis.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/negation_elimination.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/null.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/olap.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/partition_pruning.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/query_cache.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/row.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/rpl_get_lock.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/rpl_master_pos_wait.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/select.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/ssl.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/ssl_compress.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/subselect.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/type_blob.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/union.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/varbinary.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/variables.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/r/view.result:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/t/ctype_cp1250_ch.test:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/t/func_like.test:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/t/group_min_max.test:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/t/index_merge_ror.test:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/t/index_merge_ror_cpk.test:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/t/join.test:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      mysql-test/t/partition_pruning.test:
        BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
      sql/opt_range.cc:
        BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows -
          estimate of #records that will match the table condition.
      sql/sql_class.cc:
        BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED
      sql/sql_select.cc:
        BUG#14940: 
        - Make the join optimizer to use TABLE::quick_condition_rows=
          = E(#table records after filtering with table condition) 
        - Add "filtered" column to output of EXPLAIN EXTENDED
      sql/sql_select.h:
        BUG#14940: Added comments
      sql/table.h:
        BUG#14940: Added comments
      ef452e19
  16. 12 Jul, 2006 1 commit
    • unknown's avatar
      Bug #17903: cast to char results in binary · 2fc276d5
      unknown authored
        The character set was not being properly initialized in CAST() with
        a type like "CHAR(2) BINARY", which resulted in incorrect results or
        even a crash.
      
      
      mysql-test/r/cast.result:
        Add new results
      mysql-test/t/cast.test:
        Add new regression test
      sql/sql_yacc.yy:
        Make sure Lex->charset is set to NULL when nothing follows BINARY
        in type declaration.
      2fc276d5
  17. 15 Jun, 2006 1 commit
    • unknown's avatar
      item_cmpfunc.h, cast.result: · e4bfa961
      unknown authored
        Post fix for bug#16377
      
      
      mysql-test/r/cast.result:
        Post fix for bug#16377
      sql/item_cmpfunc.h:
        Post fix for bug#16377
      e4bfa961
  18. 14 Jun, 2006 2 commits
    • unknown's avatar
      Many files: · b2f30816
      unknown authored
        After merge fix
      
      
      mysql-test/r/func_time.result:
        After merge fix
      mysql-test/r/func_concat.result:
        After merge fix
      mysql-test/r/cast.result:
        After merge fix
      sql/item_cmpfunc.h:
        After merge fix
      sql/item_cmpfunc.cc:
        After merge fix
      sql/field.cc:
        After merge fix
      b2f30816
    • unknown's avatar
      Bug#8663 cant use bgint unsigned as input to cast · a1017b09
      unknown authored
      Problem: cast to unsigned limited result to 
      max signed bigint 9223372036854775808,
      instead of max unsigned bigint 18446744073709551615.
      
      Fix: don't use args[0]->val_int() when casting from
      a floating point number, use val() instead, with range checkings,
      special to unsigned data type.
      
      item_func.cc:
        Special handling of cast from REAL_RESULT
        to unsigned int: we cannot execute args[0]->val_int()
        because it cuts max allowed value to LONGLONG_INT,
        instead of ULONGLONG_INT required.
      count_distinct3.test:
        Getting rid of "Data truncated; out of range ..." warnings.
      cast.test, cast.result:
        Adding test case.
      ps.result:
        Fixing that cast from 6570515219.6535 
        to unsigned didn't round to 6570515220,
        and returned 6570515219 instead.
      
      
      mysql-test/r/cast.result:
        Adding test case.
      mysql-test/r/ps.result:
        Fixing that cast from 6570515219.6535 
        to unsigned didn't round to 6570515220,
        and returned 6570515219 instead.
      mysql-test/t/cast.test:
        Adding test case.
      mysql-test/t/count_distinct3.test:
        Get rid of "wring unsigned value"
        warnings.
      sql/item_func.cc:
        Special handling of cast from REAL)RESULT
        to unsigned int: we cannot execute args[0]->val_int()
        because it cuts max allowed value to LONGLONG_INT,
        instead of ULONGLONG_INT required.
      a1017b09
  19. 13 Jun, 2006 1 commit
    • unknown's avatar
      Fixed bug#16377: result of DATE/TIME functions were compared as strings which · 47311e8e
      unknown authored
      can lead to a wrong result.
      
      All date/time functions has the STRING result type thus their results are
      compared as strings. The string date representation allows a user to skip 
      some of leading zeros. This can lead to wrong comparison result if a date/time 
      function result is compared to such a string constant.
      
      The idea behind this bug fix is to compare results of date/time functions
      and data/time constants as ints, because that date/time representation is 
      more exact. To achieve this the agg_cmp_type() is changed to take in the
      account that a date/time field or an date/time item should be compared 
      as ints.
      
      This bug fix is partially back ported from 5.0.
      
      The agg_cmp_type() function now accepts THD as one of parameters. 
      In addition, it now checks if a date/time field/function is present in the
      list. If so, it tries to coerce all constants to INT to make date/time
      comparison return correct result. The field for the constant coercion is
      taken from the Item_field or constructed from the Item_func. In latter case
      the constructed field will be freed after conversion of all constant items.
      Otherwise the result is same as before - aggregated with help of the
      item_cmp_type() function.
      
      From the Item_func_between::fix_length_and_dec() function removed the part
      which was converting date/time constants to int if possible. Now this is 
      done by the agg_cmp_type() function.
      
      The new function result_as_longlong() is added to the Item class. 
      It indicates that the item is a date/time item and result of it can be
      compared as int. Such items are date/time fields/functions.
      
      Correct val_int() methods are implemented for classes Item_date_typecast, 
      Item_func_makedate, Item_time_typecast, Item_datetime_typecast. All these
      classes are derived from Item_str_func and Item_str_func::val_int() converts
      its string value to int without regard to the date/time type of these items.
      
      Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
      functions are changed to substitute result type of an item with the INT_RESULT
      if the item is a date/time item and another item is a constant. This is done
      to get a correct result of comparisons like date_time_function() = string_constant.
      
      
      mysql-test/r/cast.result:
        Fixed wrong test case result after bug fix#16377.
      sql/item_timefunc.h:
        Fixed bug#16377: result of DATE/TIME functions were compared as strings which
        can lead to a wrong result.
        The result_as_longlong() function is set to return TRUE for these classes:
        Item_date, Item_date_func, Item_func_curtime, Item_func_sec_to_time,
        Item_date_typecast, Item_time_typecast, Item_datetime_typecast,
        Item_func_makedate.
      sql/item_timefunc.cc:
        Fixed bug#16377: result of DATE/TIME functions were compared as strings which
        can lead to a wrong result.Correct val_int() methods are implemented for classes Item_date_typecast, 
        Item_func_makedate, Item_time_typecast, Item_datetime_typecast.
      sql/item_cmpfunc.h:
        Fixed bug#16377: result of DATE/TIME functions were compared as strings which
        can lead to a wrong result.
        Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
        functions are changed to substitute result type of an item with the INT_RESULT
        if the item is a date/time item and another item is a constant.
      sql/field.cc:
        Fixed bug#16377: result of DATE/TIME functions were compared as strings which
        can lead to a wrong result.
        Field::set_warning(), Field::set_datetime_warning() now use current_thd to get thd if table isn't set.
      sql/item_cmpfunc.cc:
        Fixed bug#16377: result of DATE/TIME functions were compared as strings which
        can lead to a wrong result.
        The agg_cmp_type() function now accepts THD as one of parameters. 
        In addition, it now checks if a date/time field/function is present in the
        list. If so, it tries to coerce all constants to INT to make date/time
        comparison return correct result. The field for the constant coercion is
        taken from the Item_field or constructed from the Item_func. In latter case
        the constructed field will be freed after conversion of all constant items.
        Otherwise the result is same as before - aggregated with help of the
        item_cmp_type() function.
      sql/item.h:
        The new function result_as_longlong() is added to the Item class. 
        It indicates that the item is a date/time item and result of it can be
        compared as int. Such items are date/time fields/functions.
      mysql-test/t/func_time.test:
        Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
        can lead to a wrong result.
      mysql-test/r/func_time.result:
        Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
        can lead to a wrong result.
      47311e8e
  20. 29 Mar, 2006 1 commit
    • unknown's avatar
      Additional 5.0 fix for · fa65771e
      unknown authored
      Bug#15098: CAST(column double TO signed int), wrong result
      which was fixed originally in 4.1.
      
      
      mysql-test/r/cast.result:
        Fixing test results
      sql/field.cc:
        Adding a "truncated value" warning.
      fa65771e
  21. 28 Mar, 2006 1 commit
    • unknown's avatar
      cast.result: · 17d2b065
      unknown authored
        After merge fix.
      
      
      mysql-test/r/cast.result:
        After merge fix.
      17d2b065
  22. 22 Feb, 2006 1 commit
    • unknown's avatar
      Bug#10460 SHOW CREATE TABLE uses inconsistent upper/lower case · 31a7a0d6
      unknown authored
      mysql-test/r/alter_table.result:
        Update test result
      mysql-test/r/analyse.result:
        Update test result
      mysql-test/r/archive.result:
        Update test result
      mysql-test/r/archive_bitfield.result:
        Update test result
      mysql-test/r/archive_gis.result:
        Update test result
      mysql-test/r/bdb.result:
        Update test result
      mysql-test/r/bdb_gis.result:
        Update test result
      mysql-test/r/bigint.result:
        Update test result
      mysql-test/r/binary.result:
        Update test result
      mysql-test/r/case.result:
        Update test result
      mysql-test/r/cast.result:
        Update test result
      mysql-test/r/constraints.result:
        Update test result
      mysql-test/r/create.result:
        Update test result
      mysql-test/r/ctype_collate.result:
        Update test result
      mysql-test/r/ctype_create.result:
        Update test result
      mysql-test/r/ctype_latin1_de.result:
        Update test result
      mysql-test/r/ctype_many.result:
        Update test result
      mysql-test/r/ctype_mb.result:
        Update test result
      mysql-test/r/ctype_recoding.result:
        Update test result
      mysql-test/r/ctype_sjis.result:
        Update test result
      mysql-test/r/ctype_tis620.result:
        Update test result
      mysql-test/r/ctype_ucs.result:
        Update test result
      mysql-test/r/ctype_ujis.result:
        Update test result
      mysql-test/r/ctype_utf8.result:
        Update test result
      mysql-test/r/default.result:
        Update test result
      mysql-test/r/events.result:
        Update test result
      mysql-test/r/federated.result:
        Update test result
      mysql-test/r/fulltext.result:
        Update test result
      mysql-test/r/func_gconcat.result:
        Update test result
      mysql-test/r/func_group.result:
        Update test result
      mysql-test/r/func_math.result:
        Update test result
      mysql-test/r/func_misc.result:
        Update test result
      mysql-test/r/func_str.result:
        Update test result
      mysql-test/r/func_system.result:
        Update test result
      mysql-test/r/gis-rtree.result:
        Update test result
      mysql-test/r/heap.result:
        Update test result
      mysql-test/r/index_merge_innodb.result:
        Update test result
      mysql-test/r/information_schema.result:
        Update test result
      mysql-test/r/innodb.result:
        Update test result
      mysql-test/r/innodb_gis.result:
        Update test result
      mysql-test/r/key.result:
        Update test result
      mysql-test/r/merge.result:
        Update test result
      mysql-test/r/myisam.result:
        Update test result
      mysql-test/r/mysqldump-max.result:
        Update test result
      mysql-test/r/mysqldump.result:
        Update test result
      mysql-test/r/ndb_bitfield.result:
        Update test result
      mysql-test/r/ndb_gis.result:
        Update test result
      mysql-test/r/ndb_partition_key.result:
        Update test result
      mysql-test/r/null.result:
        Update test result
      mysql-test/r/partition.result:
        Update test result
      mysql-test/r/partition_02myisam.result:
        Update test result
      mysql-test/r/partition_mgm_err.result:
        Update test result
      mysql-test/r/partition_range.result:
        Update test result
      mysql-test/r/ps_2myisam.result:
        Update test result
      mysql-test/r/ps_3innodb.result:
        Update test result
      mysql-test/r/ps_4heap.result:
        Update test result
      mysql-test/r/ps_5merge.result:
        Update test result
      mysql-test/r/ps_6bdb.result:
        Update test result
      mysql-test/r/rpl_mixed_ddl_dml.result:
        Update test result
      mysql-test/r/rpl_multi_engine.result:
        Update test result
      mysql-test/r/rpl_ndb_UUID.result:
        Update test result
      mysql-test/r/show_check.result:
        Update test result
      mysql-test/r/sp-vars.result:
        Update test result
      mysql-test/r/sp.result:
        Update test result
      mysql-test/r/sql_mode.result:
        Update test result
      mysql-test/r/strict.result:
        Update test result
      mysql-test/r/subselect.result:
        Update test result
      mysql-test/r/symlink.result:
        Update test result
      mysql-test/r/synchronization.result:
        Update test result
      mysql-test/r/system_mysql_db.result:
        Update test result
      mysql-test/r/temp_table.result:
        Update test result
      mysql-test/r/trigger.result:
        Update test result
      mysql-test/r/type_binary.result:
        Update test result
      mysql-test/r/type_bit.result:
        Update test result
      mysql-test/r/type_bit_innodb.result:
        Update test result
      mysql-test/r/type_blob.result:
        Update test result
      mysql-test/r/type_decimal.result:
        Update test result
      mysql-test/r/type_enum.result:
        Update test result
      mysql-test/r/type_float.result:
        Update test result
      mysql-test/r/type_nchar.result:
        Update test result
      mysql-test/r/type_newdecimal.result:
        Update test result
      mysql-test/r/type_set.result:
        Update test result
      mysql-test/r/type_timestamp.result:
        Update test result
      mysql-test/r/type_varchar.result:
        Update test result
      mysql-test/r/union.result:
        Update test result
      mysql-test/r/user_var.result:
        Update test result
      mysql-test/r/variables.result:
        Update test result
      sql/sql_show.cc:
        Make ouput from SHOW CREATE TABLE use uppercase for "CHARACTER SET", "COLLATE", "DEFAULT", "ON UPDATE" and "AUTO_INCREMENT"
      31a7a0d6
  23. 06 Dec, 2005 1 commit
    • unknown's avatar
      Bug#15098 CAST(column double TO signed int), wrong result · 4ccd3761
      unknown authored
      field.cc:
        Adding longlong range checking to return
        LONGLONG_MIN or LONGLONG_MAX when out of range. 
        Using (longlong) cast only when range is ok.
      cast.test:
        Adding test case.
      cast.result:
        Fixing results accordingly.
      
      
      sql/field.cc:
        Bug#15098 CAST(column double TO signed int), wrong result
        Adding longlong range checking.
      mysql-test/t/cast.test:
        Bug#15098 CAST(column double TO signed int), wrong result
        Adding longlong range checking.
      mysql-test/r/cast.result:
        Fixing results accordingly.
      4ccd3761
  24. 21 Nov, 2005 2 commits
    • unknown's avatar
      cast.result: · 8b497b04
      unknown authored
        Fixing test results accordingly.
      item_timefunc.cc:
        Displaying BINARY or CHAR in error messages,
        depending on the character set.
      
      
      sql/item_timefunc.cc:
        Displaying BINARY or CHAR in error messages,
        depending on the character set.
      mysql-test/r/cast.result:
        Fixing test results accordingly.
      8b497b04
    • unknown's avatar
      Additional fix for Bug#14255 CAST(x AS BINARY(N)) does not pad · d2a07f9e
      unknown authored
      cast.result:
      cast.test:
        Avoid 0x00 byte in test results, use HEX instead.
      
      
      mysql-test/t/cast.test:
        Additional fix for Bug#14255 CAST(x AS BINARY(N)) does not pad
        Avoid 0x00 byte in test results, use HEX instead.
      mysql-test/r/cast.result:
        Additional fix for Bug#14255 CAST(x AS BINARY(N)) does not pad
      d2a07f9e
  25. 13 Oct, 2005 3 commits
    • unknown's avatar
      Merged from 4.1. · 2a25659b
      unknown authored
      2a25659b
    • unknown's avatar
      select.result, mysqldump-max.result: · 6bf7a0f3
      unknown authored
        after merge fix.
      range.result:
        fixing result accordingly
        ,
      cast.result:
        after merge fix
      range.test:
        Avoid SELECT'ing of BINARY column not to output 0x00 bytes.
      
      
      mysql-test/t/range.test:
        Avoid SELECT'ing of BINARY column not to output 0x00 bytes.
      mysql-test/r/cast.result:
        after merge fix
      mysql-test/r/mysqldump-max.result:
        after merge fix.
      mysql-test/r/range.result:
        fixing result accordingly
        ,
      mysql-test/r/select.result:
        after merge fix.
      6bf7a0f3
    • unknown's avatar
      type_binary.result, type_binary.test: · 60e411eb
      unknown authored
        new file
      mysql_fix_privilege_tables.sql, mysql_create_system_tables.sh:
        Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding.
      Many files:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
        Adding true BINARY/VARBINARY: new pad_char structure member.
      ctype-bin.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
        New strnxfrm, with two trailing length bytes.
      field.cc:
        Adding true BINARY/VARBINARY.
      
      
      sql/field.cc:
        Adding true BINARY/VARBINARY.
      strings/ctype-big5.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-bin.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
        New strnxfrm, with two trailing length bytes.
      strings/ctype-cp932.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-czech.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-euc_kr.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-eucjpms.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-extra.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-gb2312.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-gbk.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-latin1.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-simple.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-sjis.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-tis620.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-uca.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-ucs2.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-ujis.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-utf8.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-win1250ch.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      include/m_ctype.h:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      mysql-test/t/alter_table.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/binary.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/cast.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/ctype_cp1251.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/ctype_many.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/federated.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/func_in.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/ndb_condition_pushdown.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/ndb_types.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/sp.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/type_blob.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/alter_table.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/binary.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/cast.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/ctype_cp1251.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/ctype_many.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/federated.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/func_in.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/ndb_condition_pushdown.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/ndb_types.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/sp.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/system_mysql_db.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/type_blob.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      scripts/mysql_create_system_tables.sh:
        Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding.
      scripts/mysql_fix_privilege_tables.sql:
        Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding.
      60e411eb
  26. 28 Sep, 2005 1 commit
  27. 25 Sep, 2005 1 commit
    • unknown's avatar
      Fixed error found during review of new pushed code · 466b46a6
      unknown authored
      client/mysql.cc:
        Don't use c_ptr() for cgets() and ensure buffer is not overwritten
      mysql-test/r/cast.result:
        More test for CAST(0x.... as signed)
      sql/opt_sum.cc:
        Fix bugs found during review
        - Changed code to be able to remove one if
        - Ensure that count == 0 only if is_exact_count == TRUE
      sql/sql_delete.cc:
        Ensure 'allow_sum_func' is reset before call to setup_conds
      sql/sql_lex.cc:
        allow_sum_func doesn't have to be reset for each query
        (It's to be reset in setup_fields() or before call to setup_conds()
      sql/sql_load.cc:
        Move set of auto_increment_field_not_null so that it's not set if field value is NULL
      sql/sql_prepare.cc:
        allow_sum_func doesn't have to be reset for each query
        (It's to be reset in setup_fields() or before call to setup_conds()
      sql/sql_update.cc:
        Ensure 'allow_sum_func' is reset before call to setup_conds
      466b46a6
  28. 22 Sep, 2005 1 commit
    • unknown's avatar
      Fix CAST(1.0e+300 TO SIGNED). (Bug #13344) · 13fa84a7
      unknown authored
      mysql-test/r/cast.result:
        Update results
      mysql-test/t/cast.test:
        Add regression test
      sql/item.h:
        Cap Item_real::val_int() to LONGLONG_MIN and LONGLONG_MAX.
      13fa84a7
  29. 15 Jun, 2005 2 commits
    • unknown's avatar
      cast.result, cast.test: · 1575df00
      unknown authored
        Added test case for bug #11283.
      field.h, field.cc:
        Fixed bug #11283: wrong conversion from varchar to decimal.
        Added methods Field_string::val_decimal,
        Field_varstring::val_decimal, Field_blob::val_decimal.
        They are not inherited from the base class Field_longstr
        anymore.
      
      
      sql/field.cc:
        Fixed bug #11283: wrong conversion from varchar to decimal.
        Added methods Field_string::val_decimal,
        Field_varstring::val_decimal, Field_blob::val_decimal.
        They are not inherited from the base class Field_longstr
        anymore.
      sql/field.h:
        Fixed bug #11283: wrong conversion from varchar to decimal.
        Added methods Field_string::val_decimal,
        Field_varstring::val_decimal, Field_blob::val_decimal.
        They are not inherited from the base class Field_longstr
        anymore.
      mysql-test/t/cast.test:
        Added test case for bug #11283.
      mysql-test/r/cast.result:
        Added test case for bug #11283.
      1575df00
    • unknown's avatar
      Fix for bug #10337 (cast(NULL DECIMAL) crashes the server) · e4cdb193
      unknown authored
      mysql-test/r/cast.result:
        test result fixed
      mysql-test/t/cast.test:
        test case added
      sql/item_func.cc:
        checks for NULL added
      strings/decimal.c:
        we need to return specified 'scale' for the rounded decimal
      e4cdb193
  30. 30 Apr, 2005 1 commit
    • unknown's avatar
      After merge fixes · d1d474c8
      unknown authored
      Makefile.am:
        Added target test-force
      mysql-test/r/cast.result:
        Updated results after merge
      d1d474c8
  31. 29 Apr, 2005 1 commit
    • unknown's avatar
      CAST(string_argument AS UNSIGNED) didn't work for big integers above the signed range. (Bug #7036) · 97b08214
      unknown authored
      Produce warnings of wrong cast of strings to signed/unsigned.
      Don't block not resolved IP's if DNS server is down (Bug #8467)
      Fix compiler problems with MinGW (Bug #8872)
      
      
      configure.in:
        Fix compiler problems with MinGW (Bug #8872)
      include/config-win.h:
        Fix compiler problems with MinGW (Bug #8872)
      include/my_global.h:
        Fix compiler problems with MinGW (Bug #8872)
      mysql-test/r/cast.result:
        Test for cast to signed/unsigned outside of range (Bug #7036)
      mysql-test/t/cast.test:
        Test for cast to signed/unsigned outside of range (Bug #7036)
      mysys/default.c:
        Cleanup (combine identical code). 
        Done mainly by Jani
      sql/field.h:
        Added cast_to_int_type() to ensure that enums are casted as numbers
      sql/hostname.cc:
        Don't block not resolved IP's if DNS server is down (Bug #8467)
      sql/item.h:
        Added cast_to_int_type() to ensure that enums are casted as numbers
      sql/item_func.cc:
        CAST(string_argument AS UNSIGNED) didn't work for big integers above the
        signed range. (Bug #7036)
        Produce warnings of wrong cast of strings to signed/unsigned
      sql/item_func.h:
        CAST(string_argument AS UNSIGNED) didn't work for big integers above the
        signed range. (Bug #7036)
      97b08214
  32. 08 Apr, 2005 1 commit
  33. 01 Apr, 2005 1 commit
    • unknown's avatar
      Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902) · db7561ec
      unknown authored
      CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912)
      ALTER TABLE now fails in STRICT mode if it generates warnings.
      Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)
      
      
      mysql-test/r/bigint.result:
        New warning added
      mysql-test/r/cast.result:
        Added testing of wrong CAST's of strings to numbers and numbers to strings
      mysql-test/r/create.result:
        Added test for wrong default values (#5902)
      mysql-test/r/func_if.result:
        Changed tests to produce less warnings
      mysql-test/r/func_misc.result:
        New warning
      mysql-test/r/func_str.result:
        Added missing drop table
        Changed test to produce less warnings
        New warnings
      mysql-test/r/ndb_index_unique.result:
        Removed wrong default usage
      mysql-test/r/ps_1general.result:
        Changed tests to produce less warnings
      mysql-test/r/row.result:
        New warnings
      mysql-test/r/rpl_session_var.result:
        Changed tests to produce less warnings
      mysql-test/r/strict.result:
        New tests for CAST() and zero date handling
      mysql-test/r/subselect.result:
        Changed tests to produce less warnings
      mysql-test/r/type_ranges.result:
        Changed tests to produce less warnings
      mysql-test/t/cast.test:
        Added testing of wrong CAST's of strings to numbers and numbers to strings
      mysql-test/t/create.test:
        Added test for wrong default values (#5902)
      mysql-test/t/func_if.test:
        Changed tests to produce less warnings
      mysql-test/t/func_str.test:
        Added missing drop table
        Changed test to produce less warnings
        New warnings
      mysql-test/t/ndb_index_unique.test:
        Removed wrong default usage
      mysql-test/t/ps_1general.test:
        Changed tests to produce less warnings
      mysql-test/t/rpl_session_var.test:
        Changed tests to produce less warnings
      mysql-test/t/strict.test:
        New tests for CAST() and zero date handling
      mysql-test/t/subselect.test:
        Changed tests to produce less warnings
      mysql-test/t/type_ranges.test:
        Changed tests to produce less warnings
      sql/Makefile.am:
        Added new include file
      sql/field.cc:
        Added warnings for zero dates for DATE, DATETIME and TIMESTAMP
        Moved Field_blob::max_length() to a more appropriate position
        Changed type for 'level' in set_warning() to avoid casts
      sql/field.h:
        Changed type for 'level' in set_warning() to avoid casts
      sql/field_conv.cc:
        Copy date and datetime fields through string in 'traditional' mode to detect zero dates
      sql/item.cc:
        Removed compiler warnings
        Give warnings for wrong CAST of strings -> number
      sql/item.h:
        Moved Item_string::val_real() and ::val_int() to item.cc
      sql/item_row.cc:
        Better detection of null values (which doesn't produce warnings)
      sql/item_sum.cc:
        Better detection of null values (which doesn't produce warnings)
      sql/item_timefunc.cc:
        Give warnings for wrong CAST of number -> string
      sql/my_decimal.cc:
        Fixed typo in comment
      sql/mysql_priv.h:
        Removed prototype for static function
        Moved defines for error handling to sql_error.h (to be able to use these in field.h)
      sql/mysqld.cc:
        Simplify code
      sql/sql_class.h:
        Moved to sql_error.h
      sql/sql_load.cc:
        Removed wrong cast
      sql/sql_parse.cc:
        Fixed wrong printf()
      sql/sql_table.cc:
        Made mysql_prepare_table() static
        Changed references to pointers to make code more readable
        ALTER TABLE now aborts if one gets warnings in STRICT mode
      sql/time.cc:
        Fixed possible wrong call
      sql/unireg.cc:
        Removed one call to current_thd
        Give errors if one uses a wrong DEFAULT value
      db7561ec
  34. 07 Mar, 2005 1 commit
  35. 21 Feb, 2005 1 commit
    • unknown's avatar
      Tests modified to coved decimal-related code · cd32f960
      unknown authored
      mysql-test/r/analyse.result:
        test result extended
      mysql-test/r/cast.result:
        test result extended
      mysql-test/r/func_group.result:
        test result extended
      mysql-test/r/subselect.result:
        test result extended
      mysql-test/t/analyse.test:
        test extended
      mysql-test/t/cast.test:
        test extended
      mysql-test/t/func_group.test:
        test extended
      mysql-test/t/subselect.test:
        test extended
      cd32f960