An error occurred fetching the project authors.
  1. 11 Feb, 2010 1 commit
    • Alexander Barkov's avatar
      WL#2649 Number-to-string conversions · 702166bc
      Alexander Barkov authored
      added:
        include/ctype_numconv.inc
        mysql-test/include/ctype_numconv.inc
        mysql-test/r/ctype_binary.result
        mysql-test/t/ctype_binary.test
        Adding tests
      
      modified:
      
        mysql-test/r/bigint.result
        mysql-test/r/case.result
        mysql-test/r/create.result
        mysql-test/r/ctype_cp1251.result
        mysql-test/r/ctype_latin1.result
        mysql-test/r/ctype_ucs.result
        mysql-test/r/func_gconcat.result
        mysql-test/r/func_str.result
        mysql-test/r/metadata.result
        mysql-test/r/ps_1general.result
        mysql-test/r/ps_2myisam.result
        mysql-test/r/ps_3innodb.result
        mysql-test/r/ps_4heap.result
        mysql-test/r/ps_5merge.result
        mysql-test/r/show_check.result
        mysql-test/r/type_datetime.result
        mysql-test/r/type_ranges.result
        mysql-test/r/union.result
        mysql-test/suite/ndb/r/ps_7ndb.result
        mysql-test/t/ctype_cp1251.test
        mysql-test/t/ctype_latin1.test
        mysql-test/t/ctype_ucs.test
        mysql-test/t/func_str.test
          Fixing tests
      
      
        @ sql/field.cc
           - Return str result using my_charset_numeric.
           - Using real multi-byte aware str_to_XXX functions
             to handle tricky charset values propely (e.g. UCS2)
        @ sql/field.h
           - Changing derivation of non-string field types to DERIVATION_NUMERIC.
           - Changing binary() for numeric/datetime fields to always
           return TRUE even if charset is not my_charset_bin. We need
           this to keep ha_base_keytype() return HA_KEYTYPE_BINARY.
           - Adding BINARY_FLAG into some fields, because it's not
           being set automatically anymore with
           "my_charset_bin to my_charset_numeric" change.
          - Changing derivation for numeric/datetime datatypes to a weaker
            value, to make "SELECT concat('string', field)" use character
            set of the string literal for the result of the function.
        @ sql/item.cc
           - Implementing generic val_str_ascii().
           - Using max_char_length() instead of direct read of max_length
             to make "tricky" charsets like UCS2 work.
             NOTE: in the future we'll possibly remove all direct reads of max_length
           - Fixing Item_num::safe_charset_converter().
             Previously it alligned binary string to
             character string (for example by adding leading 0x00
             when doing binary->UCS2 conversion). Now it just
             converts from my_charset_numbner to "tocs".
           - Using val_str_ascii() in Item::get_time() to make UCS2 arguments work.
           - Other misc changes
        @ sql/item.h
           - Changing MY_COLL_CMP_CONV and MY_COLL_ALLOW_CONV to
             bit operations instead of hard-coded bit masks.
           - Addding new method DTCollation.set_numeric().
           - Adding new methods to Item.
           - Adding helper functions to make code look nicer:
             agg_item_charsets_for_string_result()
             agg_item_charsets_for_comparison()
           - Changing charset for Item_num-derived items
             from my_charset_bin to my_charset_numeric
             (which is an alias for latin1).
        @ sql/item_cmpfunc.cc
           - Using new helper functions
           - Other misc changes
        @ sql/item_cmpfunc.h
           - Fixing strcmp() to return max_length=2.
             Previously it returned 1, which was wrong,
             because it did not fit '-1'.
        @ sql/item_func.cc
           - Using new helper functions
           - Other minor changes
        @ sql/item_func.h
           - Removing unused functions
           - Adding helper functions
             agg_arg_charsets_for_string_result()
             agg_arg_charsets_for_comparison()
           - Adding set_numeric() into constructors of numeric items.
           - Using fix_length_and_charset() and fix_char_length()
             instead of direct write to max_length.
        @ sql/item_geofunc.cc
           - Changing class for Item_func_geometry_type and
             Item_func_as_wkt from Item_str_func to
             Item_str_ascii_func, to make them return UCS2 result
             properly (when character_set_connection=ucs2).
        @ sql/item_geofunc.h
           - Changing class for Item_func_geometry_type and
             Item_func_as_wkt from Item_str_func to
             Item_str_ascii_func, to make them return UCS2 result
             properly (when @@character_set_connection=ucs2).
        @ sql/item_strfunc.cc
           - Implementing Item_str_func::val_str().
           - Renaming val_str to val_str_ascii for some items,
             to make them work with UCS2 properly.
           - Using new helper functions
           - All single-argument functions that expect string
             result now call this method:
             agg_arg_charsets_for_string_result(collation, args, 1);
             This enables character set conversion to @@character_set_connection
             in case of pure numeric input.
        @ sql/item_strfunc.h
           - Introducing Item_str_ascii_func - for functions
             which return pure ASCII data, for performance purposes,
             as well as for the cases when the old implementation
             of val_str() was heavily 8-bit oriented and implementing
             a UCS2-aware version is tricky.
        @ sql/item_sum.cc
           - Using new helper functions.
        @ sql/item_timefunc.cc
           - Using my_charset_numeric instead of my_charset_bin.
           - Using fix_char_length(), fix_length_and_charset()
             and fix_length_and_charset_datetime()
             instead of direct write to max_length.
           - Using tricky-charset aware function str_to_time_with_warn()
        @ sql/item_timefunc.h
           - Using new helper functions for charset and length initialization.
           - Changing base class for Item_func_get_format() to make
             it return UCS2 properly (when character_set_connection=ucs2).
        @ sql/item_xmlfunc.cc
           - Using new helper function
        @ sql/my_decimal.cc
           - Adding a new DECIMAL to CHAR converter
             with real multibyte support (e.g. UCS2)
      
        @ sql/mysql_priv.h
           - Introducing a new derivation level for numeric/datetime data types.
           - Adding macros for my_charset_numeric and MY_REPERTOIRE_NUMERIC.
           - Adding prototypes for str_set_decimal()
           - Adding prototypes for character-set aware str_to_xxx() functions.
        @ sql/protocol.cc
           - Changing charsetnr to "binary" client-side metadata for
             numeric/datetime data types.
        @ sql/time.cc
           - Adding to_ascii() helper function, to convert a string
             in any character set to ascii representation. In the
             future can be extended to understand digits written
             in various non-Latin word scripts.
           - Adding real multy-byte character set aware versions for str_to_XXXX,
             to make these these type of queries work correct:
               INSERT INTO t1 SET datetime_column=ucs2_expression;
         @  strings/ctype-ucs2.c
           - endptr was not calculated correctly. INSERTing of UCS2
             values into numeric columns returned warnings about
             truncated wrong data.
      702166bc
  2. 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
  3. 30 Sep, 2009 1 commit
    • Guilhem Bichot's avatar
      Fix for BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL and TIMESTAMP": · 12e82203
      Guilhem Bichot authored
      DECIMAL and TIMESTAMP used to have NUM_FLAG, but NEWDECIMAL was forgotten.
      It's correct that TIMESTAMP does not have the flag nowadays (manual will be updated, connectors
      developers will be notified).
      
      client/mysqldump.c:
        IS_NUM_FIELD(f) removed and replaced by its definition (f>flags & NUM_FLAG).
      include/mysql.h:
        - IS_NUM_FIELD() is removed because name is too close to IS_NUM() and it is not used a lot
        - INTERNAL_NUM_FIELD() is removed:
          * it forgets to test NEWDECIMAL (when IS_NUM() was updated for NEWDECIMAL we forgot
          to update INTERNAL_NUM_FIELD()), that's why client didn't mark NEWDECIMAL with NUM_FLAG (a bug).
          * it has an obsolete test for length of the TIMESTAMP field: test became accidentally wrong when length
          of TIMESTAMP was changed to always be 19 (when the format was changed from YYYYMMDDhhmmss to
          YYYY-MM-DD hh:mm:ss), never 8 or 14 anymore. That obsolete test caused TIMESTAMP to lose NUM_FLAG,
          which was an accidental but good change (see below).
          * IS_NUM() should be used instead
        - IS_NUM(f) is changed: TIMESTAMP used to be parsable as a number without quotes (when it was formatted as
        "YYYYMMDDhhmmss"); but it is not anymore (now that it is "YYYY-MM-DD hh:mm:ss"), so it should not have NUM_FLAG
        (mysqldump needs to quote TIMESTAMP values), so IS_NUM() should return false for it.
      libmysqld/lib_sql.cc:
        use IS_NUM() instead of INTERNAL_NUM_FIELD()
      mysql-test/r/bigint.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/metadata.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/mysqldump.result:
        DECIMAL columns are not quoted anymore by mysqldump. Which is ok, the parser does not need '' for them
      mysql-test/r/ps_2myisam.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/ps_3innodb.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/ps_4heap.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/ps_5merge.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/suite/ndb/r/ps_7ndb.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/t/metadata.test:
        test for BUG#42980
      sql-common/client.c:
        use IS_NUM() instead of INTERNAL_NUM_FIELD()
      12e82203
  4. 05 Feb, 2009 1 commit
    • Gleb Shchepa's avatar
      Bug #39265: fix for the bug 33699 should be reverted · b9d02d46
      Gleb Shchepa authored
      Documented behaviour was broken by the patch for bug 33699
      that actually is not a bug.
      
      This fix reverts patch for bug 33699 and reverts the
      UPDATE of NOT NULL field with NULL query to old
      behavior.
      
      
      mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/include/ps_modify.inc:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/r/auto_increment.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/r/csv_not_null.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/r/null.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/r/ps_2myisam.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/r/ps_3innodb.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/r/ps_4heap.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/r/ps_5merge.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/r/warnings.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/suite/ndb/r/ps_7ndb.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/suite/rpl/t/rpl_err_ignoredtable.test:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/t/auto_increment.test:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/t/csv_not_null.test:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/t/null.test:
        Bug #39265: fix for the bug 33699 should be reverted
      mysql-test/t/warnings.test:
        Bug #39265: fix for the bug 33699 should be reverted
      sql/sql_update.cc:
        Bug #39265: fix for the bug 33699 should be reverted
      b9d02d46
  5. 15 Aug, 2008 1 commit
    • Chad MILLER's avatar
      Bug#37301 Length and Max_length differ with no obvious reason(2nd version) · 21598ea0
      Chad MILLER authored
      Length value is the length of the field,
      Max_length is the length of the field value.
      So Max_length can not be more than Length.
      The fix: fixed calculation of the Item_empty_string item length
      
      (Patch applied and queued on demand of Trudy/Davi.)
      
      sql/item.h:
        fixed calculation of the item length
      sql/sql_show.cc:
        removed unnecessary code
      21598ea0
  6. 11 Jan, 2008 1 commit
    • unknown's avatar
      Bug#33699: The UPDATE statement allows NULL as new value on a NOT NULL · a114ede2
      unknown authored
      columns (default datatype value is assigned).
      
      The mysql_update function has been modified to generate
      an error when trying to set a NOT NULL field to NULL rather than a warning
      in the set_field_to_null_with_conversions function.
      
      
      
      mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
        Updated test case (for bug#33699).
      mysql-test/include/ps_modify.inc:
        Updated test case (for bug#33699).
      mysql-test/r/auto_increment.result:
        Updated test case (for bug#33699).
      mysql-test/r/null.result:
        Updated test case (for bug#33699).
      mysql-test/r/ps_2myisam.result:
        Updated test case (for bug#33699).
      mysql-test/r/ps_3innodb.result:
        Updated test case (for bug#33699).
      mysql-test/r/ps_4heap.result:
        Updated test case (for bug#33699).
      mysql-test/r/ps_5merge.result:
        Updated test case (for bug#33699).
      mysql-test/r/warnings.result:
        Updated test case (for bug#33699).
      mysql-test/suite/ndb/r/ps_7ndb.result:
        Updated test case (for bug#33699).
      mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
        Updated test case (for bug#33699).
      mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
        Updated test case (for bug#33699).
      mysql-test/suite/rpl/t/rpl_err_ignoredtable.test:
        Updated test case (for bug#33699).
      mysql-test/t/auto_increment.test:
        Updated test case (for bug#33699).
      mysql-test/t/null.test:
        Updated test case (for bug#33699).
      mysql-test/t/warnings.test:
        Updated test case (for bug#33699).
      sql/sql_update.cc:
        Bug#33699: The mysql_update function has been modified to generate
        an error when trying to set a NOT NULL field to NULL rather than
        a warning in the set_field_to_null_with_conversions function.
      tests/mysql_client_test.c:
        Updated test case (for bug#33699).
      a114ede2
  7. 06 Dec, 2007 1 commit
    • unknown's avatar
      Bug#31177: Server variables can't be set to their current values · 4618d68d
      unknown authored
      additional fixes for BDB and correct assignment of both signed
      and unsigned 64-bit data to unsigned system variables
      
      
      mysql-test/r/ps_2myisam.result:
        account for UNSIGNED_FLAG
      mysql-test/r/ps_3innodb.result:
        account for UNSIGNED_FLAG
      mysql-test/r/ps_4heap.result:
        account for UNSIGNED_FLAG
      mysql-test/r/ps_5merge.result:
        account for UNSIGNED_FLAG
      mysql-test/r/ps_6bdb.result:
        account for UNSIGNED_FLAG
      mysql-test/r/ps_7ndb.result:
        account for UNSIGNED_FLAG
      mysys/my_getopt.c:
        We have correct signed/unsigned information now, so we no longer
        need to err on the side of caution.
      sql/item_func.cc:
        Copy unsigned info over from entry so the item's data
        correctly describe it.
      sql/mysqld.cc:
        BDB log buffer size: default can't be less than minimum
      sql/set_var.cc:
        Handle signedness of in-values correctly when assigning to
        unsigned types, all the way up to 64-bit. Use handler from
        all three unsigned sysvar types.
      sql/set_var.h:
        thd_ulonglong: Override default check with one for unsigned types
      4618d68d
  8. 20 Nov, 2007 1 commit
    • unknown's avatar
      Bug #32400: Complex SELECT query returns correct result · 870d4681
      unknown authored
       only on some occasions
      
      Referencing an element from the SELECT list in a WHERE 
      clause is not permitted. The namespace of the WHERE
      clause is the table columns only. This was not enforced
      correctly when resolving outer references in sub-queries.
      
      Fixed by not allowing references to aliases in a 
      sub-query in WHERE.
      
      
      mysql-test/include/ps_query.inc:
        Bug #32400: fixed old test queries
      mysql-test/r/ps_2myisam.result:
        Bug #32400: fixed old test queries
      mysql-test/r/ps_3innodb.result:
        Bug #32400: fixed old test queries
      mysql-test/r/ps_4heap.result:
        Bug #32400: fixed old test queries
      mysql-test/r/ps_5merge.result:
        Bug #32400: fixed old test queries
      mysql-test/r/ps_6bdb.result:
        Bug #32400: fixed old test queries
      mysql-test/r/ps_7ndb.result:
        Bug #32400: fixed old test queries
      mysql-test/r/subselect.result:
        Bug #32400: test case
      mysql-test/t/subselect.test:
        Bug #32400: test case
      sql/item.cc:
        Bug #32400: don't allow references to aliases in WHERE
      tests/mysql_client_test.c:
        Bug #32400: fixed old test queries
      870d4681
  9. 13 Nov, 2007 1 commit
    • unknown's avatar
      Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS · b1b1d627
      unknown authored
      command and reported to a client.
      
      The fact that a timestamp field will be set to NO on UPDATE wasn't shown 
      by the SHOW COMMAND and reported to a client through connectors. This led to
      problems in the ODBC connector and might lead to a user confusion.
      
      A new filed flag called ON_UPDATE_NOW_FLAG is added. 
      Constructors of the Field_timestamp set it when a field should be set to NOW
      on UPDATE.
      
      The get_schema_column_record function now reports whether a timestamp field
      will be set to NOW on UPDATE.
      
      
      mysql-test/t/information_schema.test:
        A test case adjusted after fixing the bug#30081.
      mysql-test/r/type_timestamp.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/type_ranges.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/show_check.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/ps_5merge.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/ps_4heap.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/ps_3innodb.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/ps_2myisam.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/metadata.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/log_tables.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/information_schema.result:
        A test case adjusted after fixing the bug#30081.
      mysql-test/r/grant.result:
        Adjusted a test case after fixing bug#30081.
      tests/mysql_client_test.c:
        A test case adjusted after fixing the bug#30081.
      sql/sql_show.cc:
        Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
        command and reported to a client.
        The get_schema_column_record function now reports whether a timestamp field
        will be set to NOW on UPDATE.
      sql/field.cc:
        Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
        command and reported to a client.
        Constructors of the Field_timestamp set the ON_UPDATE_NOW_FLAG on a field when
        it should be set to NOW on UPDATE.
      include/mysql_com.h:
        Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
        command and reported to a client.
        A new filed flag called ON_UPDATE_NOW_FLAG  is added.
      client/mysql.cc:
        Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
        command and reported to a client.
        The fieldflag2str function is adjusted to print the ON_UPDATE_NOW_FLAG.
      b1b1d627
  10. 19 Oct, 2007 1 commit
  11. 18 Oct, 2007 1 commit
    • unknown's avatar
      Bug #31221: Optimizer incorrectly identifies impossible WHERE clause · 787a4b48
      unknown authored
       No warning was generated when a TIMESTAMP with a non-zero time part
       was converted to a DATE value. This caused index lookup to assume
       that this is a valid conversion and was returning rows that match 
       a comparison between a TIMESTAMP value and a DATE keypart.
       Fixed by generating a warning on such a truncation.
      
      
      mysql-test/r/derived.result:
        Bug #31221: fixed an existing not-precise test case
      mysql-test/r/ps_2myisam.result:
        Bug #31221: Warnings cased by existing tests
      mysql-test/r/ps_3innodb.result:
        Bug #31221: Warnings cased by existing tests
      mysql-test/r/ps_4heap.result:
        Bug #31221: Warnings cased by existing tests
      mysql-test/r/ps_5merge.result:
        Bug #31221: Warnings cased by existing tests
      mysql-test/r/ps_6bdb.result:
        Bug #31221: Warnings cased by existing tests
      mysql-test/r/ps_7ndb.result:
        Bug #31221: Warnings cased by existing tests
      mysql-test/r/type_date.result:
        Bug #31221: Warnings cased by existing tests
      mysql-test/r/type_datetime.result:
        Bug #31221: test case
      mysql-test/t/derived.test:
        Bug #31221: fixed an existing not-precise test case
      mysql-test/t/type_date.test:
        Bug #31221: test case
      sql/field.cc:
        Bug #31221: 
         - Upgraded fix for bug 29729
         - issue a warning only if the hh:mm:ss.msec is not zero consistently 
           for all the Field_newdate::store function
      sql/item_timefunc.cc:
        Bug #31221: don't ignore the errors when storing data
      787a4b48
  12. 29 Jun, 2007 1 commit
    • unknown's avatar
      Follow up to the patch for the BUG#10491. · 54c3809d
      unknown authored
      mysql-test/r/ps_1general.result:
        Update result file.
      mysql-test/r/ps_2myisam.result:
        Update result file.
      mysql-test/r/ps_3innodb.result:
        Update result file.
      mysql-test/r/ps_4heap.result:
        Update result file.
      mysql-test/r/ps_5merge.result:
        Update result file.
      tests/mysql_client_test.c:
        Fix test -- after field changing character set to utf8 in the server,
        length should be calculated differently.
      54c3809d
  13. 04 Jun, 2007 1 commit
  14. 30 May, 2007 1 commit
    • unknown's avatar
      backport of Bug#11491 Misleading error message if not NULL column set to NULL, SQL mode TRADITIONAL · 11b08410
      unknown authored
      mysql-test/r/auto_increment.result:
        result fix
      mysql-test/r/create.result:
        result fix
      mysql-test/r/insert.result:
        result fix
      mysql-test/r/insert_select.result:
        result fix
      mysql-test/r/insert_update.result:
        result fix
      mysql-test/r/key.result:
        result fix
      mysql-test/r/null.result:
        result fix
      mysql-test/r/null_key.result:
        result fix
      mysql-test/r/ps_2myisam.result:
        result fix
      mysql-test/r/ps_3innodb.result:
        result fix
      mysql-test/r/ps_4heap.result:
        result fix
      mysql-test/r/ps_5merge.result:
        result fix
      mysql-test/r/ps_6bdb.result:
        result fix
      mysql-test/r/ps_7ndb.result:
        result fix
      mysql-test/r/strict.result:
        result fix
      mysql-test/r/view.result:
        result fix
      mysql-test/r/warnings.result:
        result fix
      mysql-test/t/strict.test:
        test fix
      11b08410
  15. 25 May, 2007 1 commit
    • unknown's avatar
      decimal buffer overflow bug fixed · 454fca74
      unknown authored
      mysql-test/r/ps_2myisam.result:
        test result fixed
      mysql-test/r/ps_3innodb.result:
        test result fixed
      mysql-test/r/ps_4heap.result:
        test result fixed
      mysql-test/r/ps_5merge.result:
        test result fixed
      mysql-test/r/ps_7ndb.result:
        test result fixed
      sql/my_decimal.h:
        DECIMAL_MAX_STR_LENGTH fixed
      454fca74
  16. 21 May, 2007 1 commit
    • unknown's avatar
      Bug #28361 Buffer overflow in DECIMAL code on Windows · d2c985e3
      unknown authored
      result max length changed for the 'decimal' fields
      so test results have to be fixed
      
      
      mysql-test/r/ps_2myisam.result:
        Bug #28361 Buffer overflow in DECIMAL code on Windows 
        test result fixed
      mysql-test/r/ps_3innodb.result:
        Bug #28361 Buffer overflow in DECIMAL code on Windows 
        test result fixed
      mysql-test/r/ps_4heap.result:
        Bug #28361 Buffer overflow in DECIMAL code on Windows 
        test result fixed
      mysql-test/r/ps_5merge.result:
        Bug #28361 Buffer overflow in DECIMAL code on Windows 
        test result fixed
      mysql-test/r/ps_7ndb.result:
        Bug #28361 Buffer overflow in DECIMAL code on Windows 
        test result fixed
      d2c985e3
  17. 18 May, 2007 1 commit
    • unknown's avatar
      Bug#26277 User variable returns one type in SELECT @v and other for CREATE as SELECT @v · 755ae21b
      unknown authored
      - Adding variable m_cached_result_type to keep the variable type consistent
        during the execution of a statement.
      - Before each result set is returned to the client the description of each
        column is sent as meta data.
        Previously the result type for a column could change if the hash variable
        entry changed between statements. This caused the result set of the query
        to alternate column types in certain cases which is not supported by MySQL
        client-server protocol. Example:
        Previously this sequence:
          SET @A:=1;
          SELECT @A:="text", @A;
        would return "text", "text";
       
        After the change the SELECT returns "text", 0
        The reson for this is that previously the result set from 'SELECT @A;'
        would always be of the type STRING, whereas now the type of the variable
        is taken from the last SET statement. However, 'SELECT @A:="text"' will
        return type of STRING since the right side of the assignment is used.
      
      
      mysql-test/r/ps_2myisam.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/ps_3innodb.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/ps_4heap.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/ps_5merge.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/ps_7ndb.result:
        Changed test result because SQL type of a user variable now
        more accurately represents its Item type: since Item type of a variable
        can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
        result set metadata now can be either MYSQL_TYPE_VARCHAR,
        MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
        
        Previously it was always MYSQL_TYPE_VARCHAR.
        
        In particular, integer variables now have changed from
        MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
      mysql-test/r/sp-vars.result:
        Added test case. Previously variables could change their variable type during 
        the execution of a statement.
        Which variable type to use in the statement is specified in
        any previous statement.
      mysql-test/r/type_date.result:
        This test case result is changed because it is no longer allowed for user
        variables to change their variable type during the execution of a statement.
        The determination of which variable type to use in the statement is specified in
        any previous statement.
      mysql-test/r/user_var.result:
        This test case result is changed because it is no longer allowed for user
        variables to change their variable type during the execution of a statement.
        The determination of which variable type to use in the statement is specified in
        any previous statement.
      mysql-test/t/sp-vars.test:
        Added test case. Previously variables could change their variable type during 
        the execution of a statement.
        Which variable type to use in the statement is specified in
        any previous statement.
      mysql-test/t/type_date.test:
        This test case result is changed because it is no longer allowed for user
        variables to change their variable type during the execution of a statement.
        The determination of which variable type to use in the statement is specified in
        any previous statement.
      sql/item_func.cc:
        Adding variable m_cached_result_type to keep the variable type consistent
        during the execution of a statement.
        Previously the result type could change if the hash variable entry changed
        between statements. This caused the result set of the query to alternate
        column types in certain cases.
      sql/item_func.h:
        Adding variable m_cached_result_type to keep the variable type consistent
        during the execution of a statement.
        Previously the result type could change if the hash variable entry changed
        between statements. This caused the result set of the query to alternate
        column types in certain cases.
      755ae21b
  18. 16 May, 2007 1 commit
    • unknown's avatar
      Backport of TIME->MYSQL_TIME / Y2K fixset · b5e4f54a
      unknown authored
         
      Made year 2000 handling more uniform
      Removed year 2000 handling out from calc_days()
      The above removes some bugs in date/datetimes with year between 0 and 200
      Now we get a note when we insert a datetime value into a date column
      For default values to CREATE, don't give errors for warning level NOTE
      Fixed some compiler failures
      Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
      Removed duplicate typedef TIME and replaced it with MYSQL_TIME
      
      Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
      Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
      Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
       
      
      
      include/my_time.h:
        Removed not used define YY_MAGIC_BELOW
        Added prototype for year_2000_handling()
      mysql-test/r/date_formats.result:
        Updated results (fixed bug in date_format() with year < 99
      mysql-test/r/func_sapdb.result:
        Added more testing of make_date()
      mysql-test/r/ps_2myisam.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_3innodb.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_4heap.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_5merge.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_7ndb.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/strict.result:
        zero-year in str_to_date() throws warning in strict
      mysql-test/r/type_date.result:
        Added test for date conversions
      mysql-test/r/type_datetime.result:
        Added testcase for datetime to date conversion.
      mysql-test/t/date_formats.test:
        Added testing of dates < 200
      mysql-test/t/func_sapdb.test:
        More testing of makedate()
      mysql-test/t/type_date.test:
        Added test for date conversions
      mysql-test/t/type_datetime.test:
        Added testcase for datetime to date conversion
      sql/field.cc:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/field.h:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/item.cc:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/item.h:
        TIME -> MYSQL_TIME
      sql/item_cmpfunc.cc:
        Don't print notes in convert_constant_item()
      sql/item_func.h:
        TIME -> MYSQL_TIME
      sql/item_timefunc.cc:
        New parameters to make_truncated_value_warning()
        Moved year 2000 handling out from calc_days()
      sql/item_timefunc.h:
        TIME -> MYSQL_TIME
      sql/my_decimal.cc:
        TIME -> MYSQL_TIME
      sql/my_decimal.h:
        TIME -> MYSQL_TIME
      sql/mysql_priv.h:
        Added error level to make_truncated_value_warning()
      sql/protocol.cc:
        TIME -> MYSQL_TIME
      sql/protocol.h:
        TIME -> MYSQL_TIME
      sql/sp.cc:
        TIME -> MYSQL_TIME
      sql/sql_base.cc:
        Make testing of result value of save_in_field() uniform
      sql/sql_class.h:
        TIME -> MYSQL_TIME
      sql/sql_show.cc:
        TIME -> MYSQL_TIME
      sql/structs.h:
        TIME -> MYSQL_TIME
      sql/time.cc:
        Added error level to make_truncated_value_warning()
      sql/tztime.cc:
        TIME -> MYSQL_TIME
      sql/tztime.h:
        TIME -> MYSQL_TIME
      sql/unireg.cc:
        For default values to CREATE, don't give errors for warning level NOTE
        (Fixed failed CREATE when we give a datetime value to a date field)
      sql-common/my_time.c:
        Added year_2000_handling()
        Removed year 2000 handling from calc_daynr()
      b5e4f54a
  19. 14 May, 2007 2 commits
    • unknown's avatar
      Backport of TIME->MYSQL_TIME / Y2K fixset · 21bfc2f2
      unknown authored
      Made year 2000 handling more uniform
      Removed year 2000 handling out from calc_days()
      The above removes some bugs in date/datetimes with year between 0 and 200
      Now we get a note when we insert a datetime value into a date column
      For default values to CREATE, don't give errors for warning level NOTE
      Fixed some compiler failures
      Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
      Removed duplicate typedef TIME and replaced it with MYSQL_TIME
      
      Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
      Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
      Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
      
      
      include/my_time.h:
        Removed not used define YY_MAGIC_BELOW
        Added prototype for year_2000_handling()
      mysql-test/r/date_formats.result:
        Updated results (fixed bug in date_format() with year < 99)
      mysql-test/r/func_sapdb.result:
        Added more testing of make_date()
      mysql-test/r/ps_2myisam.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_3innodb.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_4heap.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_5merge.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_7ndb.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/strict.result:
        zero-year in str_to_date() throws warning in strict
      mysql-test/r/type_date.result:
        Added test for date conversions
      mysql-test/r/type_datetime.result:
        Added testcase for datetime to date conversion.
      mysql-test/t/date_formats.test:
        Added testing of dates < 200
      mysql-test/t/func_sapdb.test:
        More testing of makedate()
      mysql-test/t/type_date.test:
        Added test for date conversions
      mysql-test/t/type_datetime.test:
        Added testcase for datetime to date conversion.
      sql/field.cc:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/field.h:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/item.cc:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/item.h:
        TIME -> MYSQL_TIME
      sql/item_cmpfunc.cc:
        Don't print notes in convert_constant_item()
      sql/item_func.h:
        TIME -> MYSQL_TIME
      sql/item_timefunc.cc:
        New parameters to make_truncated_value_warning()
        Moved year 2000 handling out from calc_days()
      sql/item_timefunc.h:
        TIME -> MYSQL_TIME
      sql/my_decimal.cc:
        TIME -> MYSQL_TIME
      sql/my_decimal.h:
        TIME -> MYSQL_TIME
      sql/mysql_priv.h:
        Added error level to make_truncated_value_warning()
      sql/protocol.cc:
        TIME -> MYSQL_TIME
      sql/protocol.h:
        TIME -> MYSQL_TIME
      sql/sp.cc:
        TIME -> MYSQL_TIME
      sql/sql_base.cc:
        Make testing of result value of save_in_field() uniform
      sql/sql_class.h:
        TIME -> MYSQL_TIME
      sql/sql_show.cc:
        TIME -> MYSQL_TIME
      sql/structs.h:
        TIME -> MYSQL_TIME
      sql/time.cc:
        Added error level to make_truncated_value_warning()
      sql/tztime.cc:
        TIME -> MYSQL_TIME
      sql/tztime.h:
        TIME -> MYSQL_TIME
      sql/unireg.cc:
        For default values to CREATE, don't give errors for warning level NOTE
        (Fixed failed CREATE when we give a datetime value to a date field)
      sql-common/my_time.c:
        Added year_2000_handling()
        Removed year 2000 handling from calc_daynr()
      21bfc2f2
    • unknown's avatar
      Backport of TIME->MYSQL_TIME / Y2K fixset · a2a49ced
      unknown authored
      Made year 2000 handling more uniform
      Removed year 2000 handling out from calc_days()
      The above removes some bugs in date/datetimes with year between 0 and 200
      Now we get a note when we insert a datetime value into a date column
      For default values to CREATE, don't give errors for warning level NOTE
      Fixed some compiler failures
      Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
      Removed duplicate typedef TIME and replaced it with MYSQL_TIME
      
      Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
      Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
      Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
      
      
      include/my_time.h:
        Removed not used define YY_MAGIC_BELOW
        Added prototype for year_2000_handling()
      mysql-test/r/date_formats.result:
        Updated results (fixed bug in date_format() with year < 99)
      mysql-test/r/func_sapdb.result:
        Added more testing of make_date()
      mysql-test/r/ps_2myisam.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_3innodb.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_4heap.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_5merge.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_7ndb.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/type_date.result:
        Added test for date conversions
      mysql-test/r/type_datetime.result:
        Added testcase for datetime to date conversion.
      mysql-test/t/date_formats.test:
        Added testing of dates < 200
      mysql-test/t/func_sapdb.test:
        More testing of makedate()
      mysql-test/t/type_date.test:
        Added test for date conversions
      mysql-test/t/type_datetime.test:
        Added testcase for datetime to date conversion.
      sql/field.cc:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/field.h:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/item.cc:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/item.h:
        TIME -> MYSQL_TIME
      sql/item_cmpfunc.cc:
        Don't print notes in convert_constant_item()
      sql/item_func.h:
        TIME -> MYSQL_TIME
      sql/item_timefunc.cc:
        New parameters to make_truncated_value_warning()
        Moved year 2000 handling out from calc_days()
      sql/item_timefunc.h:
        TIME -> MYSQL_TIME
      sql/my_decimal.cc:
        TIME -> MYSQL_TIME
      sql/my_decimal.h:
        TIME -> MYSQL_TIME
      sql/mysql_priv.h:
        Added error level to make_truncated_value_warning()
      sql/protocol.cc:
        TIME -> MYSQL_TIME
      sql/protocol.h:
        TIME -> MYSQL_TIME
      sql/sp.cc:
        TIME -> MYSQL_TIME
      sql/sql_base.cc:
        Make testing of result value of save_in_field() uniform
      sql/sql_class.h:
        TIME -> MYSQL_TIME
      sql/sql_show.cc:
        TIME -> MYSQL_TIME
      sql/structs.h:
        TIME -> MYSQL_TIME
      sql/time.cc:
        Added error level to make_truncated_value_warning()
      sql/tztime.cc:
        TIME -> MYSQL_TIME
      sql/tztime.h:
        TIME -> MYSQL_TIME
      sql/unireg.cc:
        For default values to CREATE, don't give errors for warning level NOTE
        (Fixed failed CREATE when we give a datetime value to a date field)
      sql-common/my_time.c:
        Added year_2000_handling()
        Removed year 2000 handling from calc_daynr()
      a2a49ced
  20. 26 Apr, 2007 1 commit
    • unknown's avatar
      Bug#27590: Wrong DATE/DATETIME comparison. · 7bb6a725
      unknown authored
      DATE and DATETIME can be compared either as strings or as int. Both
      methods have their disadvantages. Strings can contain valid DATETIME value
      but have insignificant zeros omitted thus became non-comparable with
      other DATETIME strings. The comparison as int usually will require conversion
      from the string representation and the automatic conversion in most cases is
      carried out in a wrong way thus producing wrong comparison result. Another
      problem occurs when one tries to compare DATE field with a DATETIME constant.
      The constant is converted to DATE losing its precision i.e. losing time part.
      
      This fix addresses the problems described above by adding a special
      DATE/DATETIME comparator. The comparator correctly converts DATE/DATETIME
      string values to int when it's necessary, adds zero time part (00:00:00)
      to DATE values to compare them correctly to DATETIME values. Due to correct
      conversion malformed DATETIME string values are correctly compared to other
      DATE/DATETIME values.
      
      As of this patch a DATE value equals to DATETIME value with zero time part.
      For example '2001-01-01' equals to '2001-01-01 00:00:00'.
      
      The compare_datetime() function is added to the Arg_comparator class.
      It implements the correct comparator for DATE/DATETIME values.
      Two supplementary functions called get_date_from_str() and get_datetime_value()
      are added. The first one extracts DATE/DATETIME value from a string and the
      second one retrieves the correct DATE/DATETIME value from an item.
      The new Arg_comparator::can_compare_as_dates() function is added and used
      to check whether two given items can be compared by the compare_datetime()
      comparator.
      Two caching variables were added to the Arg_comparator class to speedup the
      DATE/DATETIME comparison.
      One more store() method was added to the Item_cache_int class to cache int
      values.
      The new is_datetime() function was added to the Item class. It indicates
      whether the item returns a DATE/DATETIME value.
      
      
      sql/item.cc:
        Bug#27590: Wrong DATE/DATETIME comparison.
        One more store() method was added to the Item_cache_int class to cache int
        values.
        The new is_datetime() function was added to the Item class. It indicates
        whether the item returns a DATE/DATETIME value.
      sql/item.h:
        Bug#27590: Wrong DATE/DATETIME comparison.
        One more store() method was added to the Item_cache_int class to cache int
        values.
        The new is_datetime() function was added to the Item class. It indicates
        whether the item returns a DATE/DATETIME value.
      sql/item_cmpfunc.cc:
        Bug#27590: Wrong DATE/DATETIME comparison.
        The compare_datetime() function is added to the Arg_comparator class.
        It implements the correct comparator for DATE/DATETIME values.
        Two supplementary functions called get_date_from_str() and get_datetime_value()
        are added. The first one extracts DATE/DATETIME value from a string and the
        second one retrieves the correct DATE/DATETIME value from an item.
        The new Arg_comparator::can_compare_as_dates() function is added and used
        to check whether two given items can be compared by the compare_datetime()
        comparator.
      sql/item_cmpfunc.h:
        Bug#27590: Wrong DATE/DATETIME comparison.
        The compare_datetime() function is added to the Arg_comparator class.
        It implements the correct comparator for DATE/DATETIME values.
        Two supplementary functions called get_date_from_str() and get_datetime_value()
        are added. The first one extracts DATE/DATETIME value from a string and the
        second one retrieves the correct DATE/DATETIME value from an item.
        The new Arg_comparator::can_compare_as_dates() function is added and used
        to check whether two given items can be compared by the compare_datetime()
        comparator.
        Two caching variables were added to the Arg_comparator class to speedup the
        DATE/DATETIME comparison.
      mysql-test/include/ps_conv.inc:
        Test case adjusted after fix for bug#27590.
      mysql-test/r/distinct.result:
        Test cases results are corrected after fix for bug#27590.
      sql/sql_select.cc:
        Bug#27590: Wrong DATE/DATETIME comparison.
        The test_if_equality_guarantees_uniqueness() function now uses
        Arg_comparator::can_compare_as_dates() to detect comparable DATE/DATETIME items.
      mysql-test/r/ps_2myisam.result:
        The result of the adjusted test case after fix for bug#27590.
      mysql-test/r/ps_3innodb.result:
        The result of the adjusted test case after fix for bug#27590.
      mysql-test/r/ps_4heap.result:
        The result of the adjusted test case after fix for bug#27590.
      mysql-test/r/ps_5merge.result:
        The result of the adjusted test case after fix for bug#27590.
      mysql-test/r/subselect.result:
        Test cases results are corrected after fix for bug#27590.
      mysql-test/r/type_datetime.result:
        Added a test case for the bug#27590: Wrong DATE/DATETIME comparison.
      mysql-test/t/type_datetime.test:
        Added a test case for the bug#27590: Wrong DATE/DATETIME comparison.
      tests/mysql_client_test.c:
        Test case adjusted after fix for bug#27590.
      7bb6a725
  21. 23 Mar, 2007 1 commit
    • unknown's avatar
      Removed not used define YY_MAGIC_BELOW · 212ecf34
      unknown authored
      Made year 2000 handling more uniform
      Removed year 2000 handling out from calc_days()
      The above removes some bugs in date/datetimes with year between 0 and 200
      Now we get a note when we insert a datetime value into a date column
      For default values to CREATE, don't give errors for warning level NOTE
      Fixed some compiler failures
      Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
      Removed duplicate typedef TIME and replaced it with MYSQL_TIME
      
      Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
      Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
      Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
      
      
      include/my_time.h:
        Removed not used define YY_MAGIC_BELOW
        Added prototype for year_2000_handling()
      mysql-test/r/date_formats.result:
        Updated results (fixed bug in date_format() with year < 99)
      mysql-test/r/func_sapdb.result:
        Added more testing of make_date()
      mysql-test/r/func_time.result:
        Fixed bug in date_sub() with years < 200
      mysql-test/r/ps_2myisam.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_3innodb.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_4heap.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_5merge.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/ps_7ndb.result:
        Now we get a note when we insert a datetime value into a date column
      mysql-test/r/type_date.result:
        Added test for date conversions
      mysql-test/r/type_datetime.result:
        Added testcase for datetime to date conversion.
      mysql-test/t/date_formats.test:
        Added testing of dates < 200
      mysql-test/t/func_sapdb.test:
        More testing of makedate()
      mysql-test/t/type_date.test:
        Added test for date conversions
      mysql-test/t/type_datetime.test:
        Added testcase for datetime to date conversion.
      sql/CMakeLists.txt:
        Added library ws2_32 (needed if we want to compile with IOCP support)
      sql/event_data_objects.cc:
        TIME -> MYSQL_TIME
      sql/event_db_repository.cc:
        TIME -> MYSQL_TIME
      sql/event_queue.cc:
        TIME -> MYSQL_TIME
      sql/field.cc:
        Give note if we insert a datetime value in a date field
        Don't give notes if we are doing internal test conversions (like from convert_constant_item())
        More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
        Revert some changes in Field_newdate::store() to get more optimal code
        Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
        New parameters to make_truncated_value_warning()
      sql/field.h:
        TIME -> MYSQL_TIME
      sql/item.cc:
        New parameters to make_truncated_value_warning()
        Fixed get_date() to call number_to_datetime() if argument is not a string.
        Fixes Bug#23093 Implicit conversion of 9912101 to date does not match cast(9912101 as date)
      sql/item.h:
        TIME -> MYSQL_TIME
      sql/item_cmpfunc.cc:
        Don't print notes in convert_constant_item()
      sql/item_func.h:
        TIME -> MYSQL_TIME
      sql/item_timefunc.cc:
        New parameters to make_truncated_value_warning()
        Moved year 2000 handling out from calc_days()
        Don't return NULL for years < 200 in date_add/date_sub
      sql/item_timefunc.h:
        TIME -> MYSQL_TIME
      sql/my_decimal.cc:
        TIME -> MYSQL_TIME
      sql/my_decimal.h:
        TIME -> MYSQL_TIME
      sql/mysql_priv.h:
        Added error level to make_truncated_value_warning()
      sql/protocol.cc:
        TIME -> MYSQL_TIME
      sql/protocol.h:
        TIME -> MYSQL_TIME
      sql/sp.cc:
        TIME -> MYSQL_TIME
      sql/sql_base.cc:
        Make testing of result value of save_in_field() uniform
      sql-common/my_time.c:
        Added year_2000_handling()
        Removed year 2000 handling from calc_daynr()
      sql/sql_class.h:
        TIME -> MYSQL_TIME
      sql/sql_show.cc:
        TIME -> MYSQL_TIME
      sql/structs.h:
        TIME -> MYSQL_TIME
      sql/time.cc:
        Added error level to make_truncated_value_warning()
      sql/tztime.cc:
        TIME -> MYSQL_TIME
      sql/tztime.h:
        TIME -> MYSQL_TIME
      sql/unireg.cc:
        For default values to CREATE, don't give errors for warning level NOTE
        (Fixed failed CREATE when we give a datetime value to a date field)
      strings/ctype-utf8.c:
        Fixed compiler failures
      win/README:
        More comments
      212ecf34
  22. 02 Mar, 2007 1 commit
    • unknown's avatar
      Bug #21103: DATE column not compared as DATE · fed9bb98
      unknown authored
      If we compare two items A and B, with B being (a constant) of a
      larger type, then A gets promoted to B's type for comparison if
      it's a constant, function, or CAST() column, but B gets demoted
      to A's type if A is a (not explicitly CAST()) column. This is
      counter-intuitive and not mandated by the standard.
       
      Disabling optimisation where it would be lossy so field value
      will properly get promoted and compared as binary string (rather
      than as integers).
      
      
      mysql-test/include/ps_conv.inc:
        Bug #21103: DATE column not compared as DATE
        
        When comparing a DATE field with a DATETIME constant, we now compare
        as DATETIMEs, not as DATEs.  Fix certain queries to still work.
      mysql-test/r/func_time.result:
        Bug #21103: DATE column not compared as DATE
        
        When comparing a DATE field with a DATETIME constant, we now compare
        as DATETIMEs, not as DATEs.  Show that everything works as expected.
      mysql-test/r/ps_2myisam.result:
        Bug #21103: DATE column not compared as DATE
        
        When comparing a DATE field with a DATETIME constant, we now compare
        as DATETIMEs, not as DATEs.  Fix certain queries to still work.
      mysql-test/r/ps_3innodb.result:
        Bug #21103: DATE column not compared as DATE
        
        When comparing a DATE field with a DATETIME constant, we now compare
        as DATETIMEs, not as DATEs.  Fix certain queries to still work.
      mysql-test/r/ps_4heap.result:
        Bug #21103: DATE column not compared as DATE
        
        When comparing a DATE field with a DATETIME constant, we now compare
        as DATETIMEs, not as DATEs.  Fix certain queries to still work.
      mysql-test/r/ps_5merge.result:
        Bug #21103: DATE column not compared as DATE
        
        When comparing a DATE field with a DATETIME constant, we now compare
        as DATETIMEs, not as DATEs.  Fix certain queries to still work.
      mysql-test/r/ps_7ndb.result:
        Bug #21103: DATE column not compared as DATE
        
        When comparing a DATE field with a DATETIME constant, we now compare
        as DATETIMEs, not as DATEs.  Fix certain queries to still work.
      mysql-test/t/func_time.test:
        Bug #21103: DATE column not compared as DATE
        
        When comparing a DATE field with a DATETIME constant, we now compare
        as DATETIMEs, not as DATEs.  Show that everything works as expected.
      sql/field.cc:
        Bug #21103: DATE column not compared as DATE
        
        #0 stores the date only as a 3-byte integer; save_in_field() in
        #1 saves 'this' in field's format (DATE), #2 "converts a constant
        item to an int and replaces the original item" -- consequently,
        this replaces the Item_string "2006-11-06 04:08:36.0" with the
        Item_int_with_ref 20061106.
        
        #0  Field_newdate::store (this=0x8d26880, from=0x8d5e658 "2006-11-06
        04:08:36.0", len=21, cs=0x88022c0) at field.cc:5344
        #1  0x0817e3b0 in Item_string::save_in_field (this=0x8d5e670, field=0x8d26880, no_conversions=true) at item.cc:4340
        #2  0x081b22ae in convert_constant_item (thd=0x8d25240, field=0x8d26880, item=0x8d5e74c) at item_cmpfunc.cc:245
        #3  0x081b8a36 in Item_bool_func2::fix_length_and_dec (this=0x8d5e6f8) at item_cmpfunc.cc:309
        #4  0x081a3427 in Item_func::fix_fields (this=0x8d5e6f8, thd=0x8d25240, ref=0x8d5f5fc) at item_func.cc:190
        #5  0x0825bc2d in setup_conds (thd=0x8d25240, tables=0x8d5e410, leaves=0x8d5e410, conds=0x8d5f5fc) at sql_base.cc:4941
        ...
        
        Disabling optimisation where it would be lossy so field value will
        properly get promoted and compared as binary string (rather than as
        integers).
      fed9bb98
  23. 03 Oct, 2006 2 commits
    • unknown's avatar
    • unknown's avatar
      Update mysqltest to latest version · 9368c7bc
      unknown authored
       - ie. backport from 5.1
       - also update testcase error dected by new version
      
      
      mysql-test/include/show_msg.inc:
        BitKeeper file /home/msvensson/mysql/same_tools/my41-same_tools/mysql-test/include/show_msg.inc
      mysql-test/include/show_msg80.inc:
        BitKeeper file /home/msvensson/mysql/same_tools/my41-same_tools/mysql-test/include/show_msg80.inc
      BitKeeper/deleted/.del-rpl_chain_temp_table.test:
        Delete: mysql-test/t/rpl_chain_temp_table.test
      BitKeeper/deleted/.del-rpl_chain_temp_table.result:
        Delete: mysql-test/r/rpl_chain_temp_table.result
      BitKeeper/deleted/.del-rpl_failsafe.result:
        Delete: mysql-test/r/rpl_failsafe.result
      BitKeeper/deleted/.del-rpl_failsafe.test:
        Delete: mysql-test/t/rpl_failsafe.test
      BitKeeper/deleted/.del-rpl_heap.test:
        Delete: mysql-test/t/rpl_heap.test
      BitKeeper/deleted/.del-rpl_heap.result:
        Delete: mysql-test/r/rpl_heap.result
      BitKeeper/deleted/.del-rpl000018.result:
        Delete: mysql-test/r/rpl000018.result
      BitKeeper/deleted/.del-rpl000018.test:
        Delete: mysql-test/t/rpl000018.test
      client/Makefile.am:
        Link mysqltest with mysys/my_copy.c
      client/mysqltest.c:
        Update mysqltest to latest version
      mysql-test/include/have_multi_ndb.inc:
        Remove old syntax "@filename" in favor of "--require filename"
      mysql-test/include/master-slave.inc:
        Remove old syntax "@filename" in favor of "--require filename"
      mysql-test/include/ps_query.inc:
        Remove the comment about no output now when it does.
      mysql-test/r/check.result:
        Update output from --send
      mysql-test/r/connect.result:
        Update result file for connect test after backport form 5.1
      mysql-test/r/flush.result:
        Update output from --send
      mysql-test/r/flush_block_commit.result:
        Update output from --send
      mysql-test/r/func_misc.result:
        Update output from --send
      mysql-test/r/grant2.result:
        Update output from --send
      mysql-test/r/handler.result:
        Update output from --send
      mysql-test/r/kill.result:
        Update output from --send
      mysql-test/r/lock_multi.result:
        Update output from --send
      mysql-test/r/mix_innodb_myisam_binlog.result:
        Update output from --send
      mysql-test/r/mysqltest.result:
        Update mysqltest.result after backport
      mysql-test/r/ps_2myisam.result:
        Update result as the output from query is now printed
      mysql-test/r/ps_3innodb.result:
        Update result as the output from query is now printed
      mysql-test/r/ps_4heap.result:
        Update result as the output from query is now printed
      mysql-test/r/ps_5merge.result:
        Update result as the output from query is now printed
      mysql-test/r/ps_6bdb.result:
        Update result as the output from query is now printed
      mysql-test/r/ps_7ndb.result:
        Update result as the output from query is now printed
      mysql-test/r/rename.result:
        Update output from --send
      mysql-test/r/rpl000001.result:
        Update output from --send
      mysql-test/r/rpl_error_ignored_table.result:
        Update output from --send
      mysql-test/r/rpl_master_pos_wait.result:
        Update output from --send
      mysql-test/r/subselect.result:
        Update result file after adding missing ;
      mysql-test/r/synchronization.result:
        Update output from --send
      mysql-test/r/type_blob.result:
        Update result file after adding missing ;
      mysql-test/t/connect.test:
        Backport test from 5.1
      mysql-test/t/init_file.test:
        Update test so something is printed
      mysql-test/t/mysql_client_test.test:
        Update test so result is sent to file and something is printed
      mysql-test/t/mysqltest.test:
        Backport latest mysqltest.test file
      mysql-test/t/ps.test:
        Move the --replace_column statement to just before the statetement it should replace
      mysql-test/t/ps_1general.test:
        Move the --replace_column statement to just before the statetement it should replace
      mysql-test/t/ps_grant.test:
        Remove the $DB, no other test uses it
      mysql-test/t/rpl_flush_tables.test:
        Fetch $SERVER_VERSION from the db server
      mysql-test/t/rpl_trunc_temp.test:
        Remove the selection of connection master after it's been disconnected already
      mysql-test/t/subselect.test:
        Add missing ;
      mysql-test/t/type_blob.test:
        Add missing ;
      9368c7bc
  24. 22 Sep, 2006 1 commit
    • unknown's avatar
      Fixed result file. Blob width 8192 changed to 16777216. · 6db41716
      unknown authored
      include/mysql_com.h:
        Fix for Bug#20208 "Blobs greater than 8K are being truncated to 8K"
      sql/filesort.cc:
        Added a missing break point.
      sql/item.cc:
        Made a function of a block of code.
      sql/item.h:
        Added function string_field_type()
      6db41716
  25. 02 Aug, 2006 1 commit
    • unknown's avatar
      BUG#14770 - LOAD DATA INFILE doesn't respect default values for · a1bd0bd1
      unknown authored
                  columns
      Fixed confusing warning.
      
      Quoting INSERT section of the manual:
      ----
      Inserting NULL into a column that has been declared NOT NULL. For
      multiple-row INSERT statements or INSERT INTO ... SELECT statements, the
      column is set to the implicit default value for the column data type. This
      is 0 for numeric types, the empty string ('') for string types, and the
      "zero" value for date and time types. INSERT INTO ... SELECT statements are
      handled the same way as multiple-row inserts because the server does not
      examine the result set from the SELECT to see whether it returns a single
      row. (For a single-row INSERT, no warning occurs when NULL is inserted into
      a NOT NULL column. Instead, the statement fails with an error.)
      ----
      This is also true for LOAD DATA INFILE. For INSERT user can specify
      DEFAULT keyword as a value to set column default. There is no similiar
      feature available for LOAD DATA INFILE.
      
      
      mysql-test/r/auto_increment.result:
        Fixed confusing warning.
      mysql-test/r/create.result:
        Fixed confusing warning.
      mysql-test/r/insert.result:
        Fixed confusing warning.
      mysql-test/r/insert_select.result:
        Fixed confusing warning.
      mysql-test/r/key.result:
        Fixed confusing warning.
      mysql-test/r/null.result:
        Fixed confusing warning.
      mysql-test/r/null_key.result:
        Fixed confusing warning.
      mysql-test/r/ps_2myisam.result:
        Fixed confusing warning.
      mysql-test/r/ps_3innodb.result:
        Fixed confusing warning.
      mysql-test/r/ps_4heap.result:
        Fixed confusing warning.
      mysql-test/r/ps_5merge.result:
        Fixed confusing warning.
      mysql-test/r/ps_6bdb.result:
        Fixed confusing warning.
      mysql-test/r/strict.result:
        Fixed confusing warning.
      mysql-test/r/view.result:
        Fixed confusing warning.
      mysql-test/r/warnings.result:
        Fixed confusing warning.
      sql/share/errmsg.txt:
        Fixed confusing warning.
      a1bd0bd1
  26. 20 Jul, 2006 1 commit
    • unknown's avatar
      Bug#6147: Traditional: Assigning a string to a numeric column has unexpected results · 03d411b1
      unknown authored
      The problem was that when converting a string to an exact number,
      rounding didn't work, because conversion didn't understand
      approximate numbers notation.
      Fix: a new function for string-to-number conversion was implemented,
      which is aware of approxinate number notation (with decimal point
      and exponent, e.g. -19.55e-1)
      
      
      include/m_ctype.h:
        Adding new function into MY_CHARSET_HANDLER
        Adding prototypes for 8bit and ucs2 functions.
      mysql-test/r/loaddata.result:
        Fixing results
      mysql-test/r/ps_2myisam.result:
        Fixing results
      mysql-test/r/ps_3innodb.result:
        Fixing results
      mysql-test/r/ps_4heap.result:
        Fixing results
      mysql-test/r/ps_5merge.result:
        Fixing results
      mysql-test/r/ps_6bdb.result:
        Fixing results
      mysql-test/r/rpl_rewrite_db.result:
        Fixing results
      mysql-test/r/select.result:
        Fixing results
      mysql-test/r/sp-vars.result:
        Fixing results
      mysql-test/r/strict.result:
        Fixing results
      mysql-test/r/view.result:
        Fixing results
      mysql-test/r/warnings.result:
        Fixing results
      mysql-test/t/strict.test:
        Fixing results
      sql/field.cc:
        Using new function
      strings/ctype-big5.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-bin.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-cp932.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-euc_kr.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-eucjpms.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-gb2312.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-gbk.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-latin1.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-simple.c:
        Implementing my_strntoull10_8bit
        Adding new function into MY_CHARSET_HANDLER
      strings/ctype-sjis.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-tis620.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-ucs2.c:
        Implementing UCS2 wrapper for 8bit version
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-ujis.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      strings/ctype-utf8.c:
        Adding new function into the MY_CHARSET_HANDLER structure
      mysql-test/r/round.result:
        New BitKeeper file ``mysql-test/r/round.result''
      mysql-test/t/round.test:
        New BitKeeper file ``mysql-test/t/round.test''
      03d411b1
  27. 14 Jul, 2006 1 commit
    • unknown's avatar
      Fixed bug #19714. · 1e442594
      unknown authored
      DESCRIBE returned the type BIGINT for a column of a view if the column
      was specified by an expression over values of the type INT.
          
      E.g. for the view defined as follows:
        CREATE VIEW v1 SELECT COALESCE(f1,f2) FROM t1
      DESCRIBE returned type BIGINT for the only column of the view if f1,f2 are
      columns of the INT type.
      At the same time DESCRIBE returned type INT for the only column of the table
      defined by the statement:
        CREATE TABLE t2 SELECT COALESCE(f1,f2) FROM t1.
          
      This inconsistency was removed by the patch.
      
      Now the code chooses between INT/BIGINT depending on the
      precision of the aggregated column type.
       
      Thus both DESCRIBE commands above returns type INT for v1 and t2.
       
      
      
      mysql-test/r/analyse.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/bigint.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/create.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/olap.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/ps_2myisam.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/ps_3innodb.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/ps_4heap.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/ps_5merge.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/ps_6bdb.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/ps_7ndb.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/sp.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/subselect.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/type_ranges.result:
        Adjusted the results after having fixed bug #19714.
      mysql-test/r/view.result:
        Added a test case for bug #19714.
      mysql-test/t/view.test:
        Added a test case for bug #19714.
      1e442594
  28. 13 May, 2006 1 commit
    • unknown's avatar
      Bug#17048 CREATE TABLE ... SELECT truncate values · fe3ac300
      unknown authored
      remove initialization of unsigned_flag for Item_decimal
      
      
      mysql-test/r/case.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/metadata.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_2myisam.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_3innodb.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_4heap.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_5merge.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_6bdb.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/ps_7ndb.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/type_float.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      mysql-test/r/type_newdecimal.result:
        Bug#17048 CREATE TABLE ... SELECT truncate values
        result fix
      fe3ac300
  29. 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
  30. 23 Jan, 2006 1 commit
  31. 02 Dec, 2005 1 commit
    • unknown's avatar
      Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE · ca34f415
      unknown authored
        -issue more correct message for incorrect date|datetime|time values
        -ER_WARN_DATA_OUT_OF_RANGE message is changed
        -added new error message
      
      
      mysql-test/r/auto_increment.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/bigint.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/ctype_ucs.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/date_formats.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/func_sapdb.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/func_str.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/func_time.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/insert.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/loaddata.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/mysqldump.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/ps_2myisam.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/ps_3innodb.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/ps_4heap.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/ps_5merge.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/ps_6bdb.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/ps_7ndb.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/rpl_rewrite_db.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/sp.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/strict.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/timezone2.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/timezone_grant.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_bit.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_bit_innodb.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_date.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_datetime.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_decimal.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_float.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_newdecimal.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_ranges.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_time.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/type_uint.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/view.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      mysql-test/r/warnings.result:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          result change
      sql/share/errmsg.txt:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          -ER_WARN_DATA_OUT_OF_RANGE message is changed
          -added new error message
      sql/time.cc:
        Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
          issue more correct message for incorrect date|datetime|time values
      ca34f415
  32. 01 Dec, 2005 1 commit
    • unknown's avatar
      Fix for bug#11491 Misleading error message if not NULL column set to NULL, · c86ba5f5
      unknown authored
                        SQL mode TRADITIONAL
        Message is chenged from 'ER_WARN_NULL_TO_NOTNULL' to 'ER_BAD_NULL_ERROR'
      
      
      mysql-test/r/auto_increment.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/create.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/insert.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/insert_select.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/key.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/null.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/null_key.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/ps_2myisam.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/ps_3innodb.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/ps_4heap.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/ps_5merge.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/ps_6bdb.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/ps_7ndb.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/strict.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/view.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/r/warnings.result:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          result change
      mysql-test/t/strict.test:
        Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                          SQL mode TRADITIONAL
          test change
      c86ba5f5
  33. 31 Oct, 2005 1 commit
    • unknown's avatar
      WL#2930 Adding view and cursor 'protocols' to mysqltest · 91faec36
      unknown authored
       - Cleanup of mysqltest.c before extending it
      
      
      client/mysqltest.c:
        Cleanup functions run_query_* before adding new functionality.
        Break out common functions used in both run_query_stmt and run_query_normal
        Move functionality for all run_query_* calls into run_query
        Since the normal way of handling an unepected error is to call die(which will never return), remove all return values from functions that does not return. 
        Add comments.
        Remove unused vars.
        Cleanup...
        Removed oboslete syntax @<file_name>, "require" or "result" should be used.
      mysql-test/include/master-slave.inc:
        remove obsolete syntax @, use "require" command
      mysql-test/include/ps_query.inc:
        Remove this comment, mysqltest will now produce output. Old mysqltest didn't return any output since command starting with @ was treated as a require. Uggh.
      mysql-test/r/mysqltest.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/ps_7ndb.result:
        Update test result
      mysql-test/t/alias.test:
        Remove --disable/enable_ps_protocol, only used to mask bugs in mysqltest
      mysql-test/t/group_by.test:
        Remove --disable/enable_ps_protocol, only used to mask bugs in mysqltest
      mysql-test/t/mysqltest.test:
        Add test for "Missing delimiter until eof"
      mysql-test/t/union.test:
        Remove --disable/enable_ps_protocol, "select found_rows" works  with ps_protocol now!
      91faec36
  34. 27 Sep, 2005 1 commit
    • unknown's avatar
      Fixed BUG#12589: Assert when creating temp. table from decimal stored · 06eabeee
      unknown authored
                       procedure variable
        Second version, after review.
        Keep the unsigned_flag in Item_decimal updated. Note that this also changed
        the result of several old test results - creating tables from decimal
        templates now gives unsigned columns and different sizes. (Several tests
        had Length > Max_length before.)
      
      
      mysql-test/r/case.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/metadata.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_2myisam.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_3innodb.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_4heap.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_5merge.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_6bdb.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_7ndb.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/sp.result:
        New test case for BUG#12589.
      mysql-test/r/type_newdecimal.result:
        Updated result (after fixing BUG#12589).
      mysql-test/t/sp.test:
        New test case for BUG#12589.
      sql/item.cc:
        Keep the unsigned_flag updated in Item_splocal and Item_decimal.
      06eabeee
  35. 09 Sep, 2005 2 commits
    • unknown's avatar
      after merge fix · 27eeeab8
      unknown authored
      27eeeab8
    • unknown's avatar
      Bug#12817 SHOW STATUS now blob fields · acf8d0f4
      unknown authored
         This fix is cancellation of ChangeSet
         1.2329 05/07/12 08:35:30 reggie@linux.site +8 -0
         Bug 7142  Show Fields from fails using Borland's dbExpress interface
         The reason is we can't fix bug#7142 without
         breaking of existing applications/APIs that worked fine with earlier 4.1
         bug 7142 is fixed in 5.0
      
      
      
      
      mysql-test/r/ps_1general.result:
        Bug #12817 SHOW STATUS now blob fields
      mysql-test/r/ps_2myisam.result:
        Bug #12817 SHOW STATUS now blob fields
      mysql-test/r/ps_3innodb.result:
        Bug #12817 SHOW STATUS now blob fields
      mysql-test/r/ps_4heap.result:
        Bug #12817 SHOW STATUS now blob fields
      mysql-test/r/ps_5merge.result:
        Bug #12817 SHOW STATUS now blob fields
      sql/item.cc:
        Bug #12817 SHOW STATUS now blob fields
      sql/sql_show.cc:
        Bug #12817 SHOW STATUS now blob fields
      tests/mysql_client_test.c:
        Bug #12817 SHOW STATUS now blob fields
      acf8d0f4
  36. 23 Aug, 2005 1 commit
    • unknown's avatar
      WL#2486 - natural and using join according to SQL:2003 · fe24add7
      unknown authored
      * Provide backwards compatibility extension to name resolution of
        coalesced columns. The patch allows such columns to be qualified
        with a table (and db) name, as it is in 4.1.
        Based on a patch from Monty.
      
      * Adjusted tests accordingly to test both backwards compatible name
        resolution of qualified columns, and ANSI-style resolution of
        non-qualified columns.
        For this, each affected test has two versions - one with qualified
        columns, and one without. 
      
      
      mysql-test/include/ps_query.inc:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/bdb.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/innodb.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/join.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/join_nested.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/join_outer.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/null_key.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/order_by.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/ps_2myisam.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/ps_3innodb.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/ps_4heap.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/ps_5merge.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/ps_6bdb.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/ps_7ndb.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/select.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/subselect.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/r/type_ranges.result:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/bdb.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/innodb.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/join.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/join_nested.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/join_outer.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/null_key.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/order_by.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/select.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/subselect.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      mysql-test/t/type_ranges.test:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      sql/sql_base.cc:
        * Applied Monty's patch for backwards compatible name resolution
          of qualified columns. The idea is:
          - When a column is qualified, search for the column in all
            tables/views underlying each natural join. In this case
            natural joins are *not* considered leaves.
          - If a column is not qualified, then consider natural joins
            as leaves, thus directly search the result columns of
            natural joins.
        * Simplified 'find_field_in_tables()' - unified two similar
          loops into one.
      sql/table.cc:
        - Removed method & members not needed after Monty's patch.
      sql/table.h:
        - Removed method & members not needed after Monty's patch.
      tests/mysql_client_test.c:
        Put back old tests to test that coalesced columns of natural joins can be qualified.
      fe24add7
  37. 12 Aug, 2005 1 commit
    • unknown's avatar
      Implementation of WL#2486 - · 7517d7e1
      unknown authored
      "Process NATURAL and USING joins according to SQL:2003".
      
      * Some of the main problems fixed by the patch:
        - in "select *" queries the * expanded correctly according to
          ANSI for arbitrary natural/using joins
        - natural/using joins are correctly transformed into JOIN ... ON
          for any number/nesting of the joins.
        - column references are correctly resolved against natural joins
          of any nesting and combined with arbitrary other joins.
      
      * This patch also contains a fix for name resolution of items
        inside the ON condition of JOIN ... ON - in this case items must
        be resolved only against the JOIN operands. To support such
        'local' name resolution, the patch introduces a stack of
        name resolution contexts used at parse time.
      
      NOTICE:
      - This patch is not complete in the sense that
        - there are 2 test cases that still do not pass -
          one in join.test, one in select.test. Both are marked
          with a comment "TODO: WL#2486".
        - it does not include a new test specific for the task
      
      
      mysql-test/include/ps_query.inc:
        Adjusted according to standard NATURAL/USING join semantics.,
      mysql-test/r/bdb.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/derived.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/errors.result:
        The column as a whole cannot be resolved, so different error message.
      mysql-test/r/fulltext.result:
        Adjusted according to standard JOIN ... ON semantics =>
        the ON condition can refer only to the join operands.
      mysql-test/r/fulltext_order_by.result:
        More detailed error message.
      mysql-test/r/innodb.result:
        Adjusted according to standard NATURAL/USING join semantics.
        This test doesn't pass completetly yet!
      mysql-test/r/insert_select.result:
        More detailed error message.
      mysql-test/r/join.result:
        Adjusted according to standard NATURAL/USING join semantics.
        
        NOTICE: there is one test case that still fails, and it is
        commeted out and marked with WL#2486 in the test file.
      mysql-test/r/join_crash.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/join_nested.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/join_outer.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/multi_update.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/null_key.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/order_by.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/ps_2myisam.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/ps_3innodb.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/ps_4heap.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/ps_5merge.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/ps_6bdb.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/ps_7ndb.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/select.result:
        Adjusted according to standard NATURAL/USING join semantics.
        
        NOTICE: there is one failing test case which is commented with
        WL#2486 in the test file.
      mysql-test/r/subselect.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/type_ranges.result:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/r/union.result:
        More detailed error message.
      mysql-test/t/bdb.test:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/t/errors.test:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/t/fulltext.test:
        Adjusted according to standard JOIN ... ON semantics =>
        the ON condition can refer only to the join operands.
      mysql-test/t/fulltext_order_by.test:
        More detailed error message.
      mysql-test/t/innodb.test:
        Adjusted according to standard NATURAL/USING join semantics.
        This test doesn't pass completetly yet!
      mysql-test/t/insert_select.test:
        More detailed error message.
      mysql-test/t/join.test:
        Adjusted according to standard NATURAL/USING join semantics.
        
        NOTICE: there is one test case that still fails, and it is
        commeted out and marked with WL#2486 in the test file.
      mysql-test/t/join_crash.test:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/t/join_nested.test:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/t/join_outer.test:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/t/null_key.test:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/t/order_by.test:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/t/select.test:
        Adjusted according to standard NATURAL/USING join semantics.
        
        NOTICE: there is one test case that still fails, and it is
        commeted out and marked with WL#2486 in the test file.
      mysql-test/t/subselect.test:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/t/type_ranges.test:
        Adjusted according to standard NATURAL/USING join semantics.
      mysql-test/t/union.test:
        More detailed error message.
      sql/item.cc:
        - extra parameter to find_field_in_tables
        - find_field_in_real_table renamed to find_field_in_table
        - fixed comments/typos
      sql/item.h:
        - added [first | last]_name_resolution_table to class
          Name_resolution_context
        - commented old code
        - standardized formatting
      sql/mysql_priv.h:
        - refactored the find_field_in_XXX procedures,
        - added a new procedure for natural join table references,
        - renamed the find_field_in_XXX procedures to clearer names
      sql/sp.cc:
        - pass the top-most list of the FROM clause to setup_tables
        - extra parameter to find_field_in_tables
      sql/sql_acl.cc:
        - renamed find_field_in_table => find_field_in_table_ref
        - extra parameter to find_field_in_table_ref
        - commented old code
      sql/sql_base.cc:
        This file contains the core of the implementation of the processing
        of NATURAL/USING joins (WL#2486).
        - added many comments to old code
        - refactored the group of find_field_in_XXX procedures, and added a
          new procedure for natural joins. There is one find_field_in_XXX procedure
          per each type of table reference (stored table, merge view, or natural
          join); one meta-procedure that selects the correct one depeneding on the
          table reference; and one procedure that goes over a list of table
          referenes.
        - NATURAL/USING joins are processed through the procedures:
            mark_common_columns, store_natural_using_join_columns,
            store_top_level_join_columns, setup_natural_join_row_types.
          The entry point to processing NATURAL/USING joins is the
          procedure 'setup_natural_join_row_types'.
        - Replaced the specialized Field_iterator_XXX iterators with one
          generic iterator over the fields of a table reference.
        - Simplified 'insert_fields' and 'setup_conds' due to encapsulation of
          the processing of natural joins in a separate set of procedures.
      sql/sql_class.h:
        - Commented old code.
      sql/sql_delete.cc:
        - Pass the FROM clause to setup_tables.
      sql/sql_help.cc:
        - pass the end name resolution table to find_field_in_tables
        - adjust the list of tables for name resolution
      sql/sql_insert.cc:
        - Changed the code that saves and restores the current context to
          support the list of tables for name resolution -
          context->first_name_resolution_table, and
          table_list->next_name_resolution_table.
          Needed to support an ugly trick to resolve inserted columns only in
          the first table.
        - Added Name_resolution_context::[first | last]_name_resolution_table.
        - Commented old code
      sql/sql_lex.cc:
        - set select_lex.parent_lex correctly
        - set correct state of the current name resolution context
      sql/sql_lex.h:
        - Added a stack of name resolution contexts to support local
          contexts for JOIN ... ON conditions.
        - Commented old code.
      sql/sql_load.cc:
        - Pass the FROM clause to setup_tables.
      sql/sql_olap.cc:
        - Pass the FROM clause to setup_tables.
      sql/sql_parse.cc:
        - correctly set SELECT_LEX::parent_lex
        - set the first table of the current name resoltion context
        - added support for NATURAL/USING joins
        - commented old code
      sql/sql_select.cc:
        - Pass the FROM clause to setup_tables.
        - Pass the end table to find_field_in_tables
        - Improved comments
      sql/sql_show.cc:
        - Set SELECT_LEX::parent_lex.
      sql/sql_update.cc:
        - Pass the FROM clause to setup_tables.
      sql/sql_yacc.yy:
        - Added support for a stack of name resolution contexts needed to
          implement name resolution for JOIN ... ON. A context is pushed
          for each new JOIN ... ON, and popped afterwards.
        - Added support for NATURAL/USING joins.
      sql/table.cc:
        - Added new class Natural_join_column to hide the heterogeneous
          representation of column references for stored tables and for
          views.
        - Added a new list TABLE_LIST::next_name_resolution_table to
          support name resolution with NATURAL/USING joins. Also added
          other members to TABLE_LIST to support NATURAL/USING joins.
        - Added a generic iterator over the fields of table references
          of various types - class Field_iterator_table_ref
      sql/table.h:
        - Added new class Natural_join_column to hide the heterogeneous
          representation of column references for stored tables and for
          views.
        - Added a new list TABLE_LIST::next_name_resolution_table to
          support name resolution with NATURAL/USING joins. Also added
          other members to TABLE_LIST to support NATURAL/USING joins.
        - Added a generic iterator over the fields of table references
          of various types - class Field_iterator_table_ref
      tests/mysql_client_test.c:
        Adjusted according to standard NATURAL JOIN syntax.
      7517d7e1