An error occurred fetching the project authors.
  1. 21 May, 2005 1 commit
    • unknown's avatar
      join_outer.test, join_outer.result: · 6df49889
      unknown authored
        Added test cases for bug #9938.
      item.h:
        Fixed bug #9938: missing method not_null_tables for Item_ref.
      
      
      sql/item.h:
        Fixed bug #9938: missing method not_null_tables for Item_ref.
      mysql-test/t/join_outer.test:
        Added test cases for bug #9938.
      6df49889
  2. 19 May, 2005 1 commit
  3. 18 May, 2005 1 commit
    • unknown's avatar
      Fixed BUG#6048: Stored procedure causes operating system reboot. · 90a2edd7
      unknown authored
        Memory leak in locally evalutated expressions during SP execution fixed by
        reusing allocated item slots when possible.
        Note: No test case added, since the test is a stress test that tries to make
        the machine to run out of memory.
      
      
      sql/item.cc:
        Make it possible to reuse allocated item slots (for use in SP execution).
      sql/item.h:
        Make it possible to reuse allocated item slots (for use in SP execution).
      sql/sp_head.cc:
        Reuse allocated item slots for expression evalutation during SP execution.
      sql/sp_rcontext.cc:
        Updated sp_eval_func_item() call, and prevent item reuse in reused frames (for handlers).
      90a2edd7
  4. 16 May, 2005 1 commit
  5. 08 May, 2005 1 commit
    • unknown's avatar
      Item::fix_field need correct pointer on item reference to chnge it if itis... · a6b15466
      unknown authored
      Item::fix_field need correct pointer on item reference to chnge it if itis need, so support of correct item address added to SP commands (BUG#5963)
      some optimisation of IF/NOT IF ptomised to Pem
      
      
      mysql-test/r/sp.result:
        test for bug#5963
      mysql-test/t/sp.test:
        test for bug#5963
      sql/item.cc:
        new method which return reference on Item for SP variables support
      sql/item.h:
        comment fixed
        method added
      sql/sp_head.cc:
        preparation of item made separate function
        we do not need new constant Item to check IF/IF NOT
        support of passing correct address of item for fix_fields method
      sql/sp_rcontext.cc:
        support of Item address passing to fix_fields
      sql/sp_rcontext.h:
        support of correct address passing to fix_fields
      sql/sql_class.cc:
        support of correct item address passing to fix_field
      a6b15466
  6. 05 May, 2005 2 commits
    • unknown's avatar
      A lot of fixes to Precision math · 6de14a23
      unknown authored
      Mostly about precision/decimals of the results of the operations
      
      
      include/decimal.h:
        decimal interface changed a little
      sql/field.cc:
        a lot of precision/decimals related changes to the Field_new_decimal
      sql/field.h:
        Field_new_decimal interface changed
      sql/ha_ndbcluster.cc:
        f->precision should be used here
      sql/item.cc:
        precision/decimals counting related changes
      sql/item.h:
        precision/decimals counting related changes
      sql/item_cmpfunc.cc:
        precision/decimals counting related changes
      sql/item_cmpfunc.h:
        precision/decimals counting related changes
      sql/item_func.cc:
        precision/decimals counting related changes
      sql/item_func.h:
        precision/decimals counting related changes
      sql/item_sum.cc:
        precision/decimals counting related changes
      sql/item_sum.h:
        precision/decimals counting related changes
      sql/my_decimal.cc:
        precision/decimals counting related changes
      sql/my_decimal.h:
        precision/decimals counting related changes
      sql/mysqld.cc:
        precision/decimals counting related changes
      sql/set_var.cc:
        precision/decimals counting related changes
      sql/sp_head.cc:
        dbug_decimal_print was replaced with dbug_decimal_as_string
      sql/sql_class.h:
        div_precincrement variable added
      sql/sql_parse.cc:
        precision/decimals counting related changes
      sql/sql_select.cc:
        precision/decimals counting related changes
      sql/sql_show.cc:
        Field::representation_length was removed
      strings/decimal.c:
        decimal_actual_fraction was introduced
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      6de14a23
    • unknown's avatar
      A fix and test case for Bug#9777 " Empty set returned by Prepared Statement when it · c758512a
      unknown authored
       should return a non empty one"
      (see comments for the changed files for details).
      
      
      mysql-test/r/ps.result:
        A test case for Bug#9777: tests results fixed.
      mysql-test/t/ps.test:
        A test case for Bug#9777
      sql/item.cc:
        A fix for Bug#9777: when creating a constant item from within 
        Item_int_with_ref::new_item, create the item by value, not by name.
        This should work with prepared statements placeholders.
        Item_int_with_ref is a special optimization case used
         when we compare datetime constants with datetime value.
        Converting the item to integer early is OK as it is in line
        with the purpose of Item_int_with_ref - to speed up comparison by 
        using integers.
        Minor cleanups.
      sql/item.h:
        Declaration for Item_int_with_ref::new_item
      c758512a
  7. 04 May, 2005 2 commits
    • unknown's avatar
      BUG#10241 cygwin port: invalid pragma interface directives · 9ab5f614
      unknown authored
       - Introduce ifdefs so we can control when to use #pragma interface on cygwin
      
      
      include/my_global.h:
        Turn on use of #pragma implementation and #pragma interface if compiled with GCC and platform != Cygwin
      include/raid.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/examples/ha_archive.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/examples/ha_example.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/field.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/ha_berkeley.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/ha_blackhole.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/ha_heap.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/ha_innodb.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/ha_isam.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/ha_isammrg.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/ha_myisam.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/ha_myisammrg.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/ha_ndbcluster.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/handler.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/item.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/item_cmpfunc.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/item_func.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/item_geofunc.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/item_strfunc.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/item_subselect.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/item_sum.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/item_timefunc.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/opt_range.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/procedure.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/protocol.h:
        replace __GNUC__ with USE_PRAGMA_IMPLEMENTATION
      sql/set_var.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/sql_class.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/sql_list.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/sql_select.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/sql_string.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/sql_udf.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      sql/tztime.h:
        replace __GNUC__ with USE_PRAGMA_INTERFACE
      9ab5f614
    • unknown's avatar
      Post-merge fixes for Bug#9096 "select doesn't return all matched · a8286537
      unknown authored
       records if prepared statements is used" (see comments to 
      the changed files).
      
      
      mysql-test/r/ps.result:
        Post-merge fix for Bug#9096: test results fixed.
      mysql-test/r/type_datetime.result:
        Post-merge fix for Bug#9096: now we do better constants comparison,
        so the optimizer is able to guess from the index that we don't
        need to evaluate WHERE clause.
      sql/item.cc:
        Post-merge fixes for Bug#9096: implement by-value comparison for
        new 5.0 DECIMAL type.
        Item_real is renamed to Item_float in 5.0
        Item_varbinary is renamed to Item_hex_string in 5.0
      sql/item.h:
        Post-merge fixes for Bug#9096: declaration for Item_decimal::eq
      a8286537
  8. 03 May, 2005 1 commit
    • unknown's avatar
      A fix and test case for Bug#9096 "select doesn't return all matched · 9fcda7fc
      unknown authored
      records if prepared statements is used".
      This fix changes equality evaluation method of basic constants from
      by-name to by-value, thus effectively enabling use of parameter markers
      in some optimizations (constants propagation, evaluation of possible
      keys for query).
      
      
      mysql-test/r/ps.result:
        Test results for the test case for Bug#9096
      mysql-test/t/ps.test:
        A short test case for Bug#9096 "select doesn't return all matched records if
         prepared statements is used". The is enough to reproduce the
        glitch in update_ref_and_keys causing the bug to occur.
      sql/item.cc:
        Implement by-value equality evaluation of basic constants.
        This is needed to work with Item_param values. Until now
        Item_param was compared with other items by its name, which is always "?".
        The bug at hand showed up when an integer
        constant was created from one parameter marker (with value 200887 and
         name "?") and then compared by-name with another parameter marker
        (with value 860 and name "?"). True returned by this comparison resulted
        in a wrong table access method used to evaluate the query.
        Implement Item_param methods needed to emulate "basic constant" mode at 
        full.
      sql/item.h:
        Change declaration of basic_const_item(): now it also widens its 
        argument from const Item * to Item * if the argument is a basic constant.
        Declare eq() for all basic constatns, as long as now they 
        are compared by value, not by name. Each constant needs its own
        comparison method.
        Declarations of Item_param methods needed to fully emulate 
        a basic constant when parameter value is set.
      sql/item_func.cc:
        Fix wrong casts.
      9fcda7fc
  9. 30 Apr, 2005 1 commit
    • unknown's avatar
      postreview changes · d45f95f0
      unknown authored
      sql/item.cc:
        changed parameters order
      sql/item.h:
        changed parameters order
      sql/sql_base.cc:
        fixed comment
        changed parameters order
      d45f95f0
  10. 29 Apr, 2005 1 commit
    • unknown's avatar
      CAST(string_argument AS UNSIGNED) didn't work for big integers above the signed range. (Bug #7036) · 97b08214
      unknown authored
      Produce warnings of wrong cast of strings to signed/unsigned.
      Don't block not resolved IP's if DNS server is down (Bug #8467)
      Fix compiler problems with MinGW (Bug #8872)
      
      
      configure.in:
        Fix compiler problems with MinGW (Bug #8872)
      include/config-win.h:
        Fix compiler problems with MinGW (Bug #8872)
      include/my_global.h:
        Fix compiler problems with MinGW (Bug #8872)
      mysql-test/r/cast.result:
        Test for cast to signed/unsigned outside of range (Bug #7036)
      mysql-test/t/cast.test:
        Test for cast to signed/unsigned outside of range (Bug #7036)
      mysys/default.c:
        Cleanup (combine identical code). 
        Done mainly by Jani
      sql/field.h:
        Added cast_to_int_type() to ensure that enums are casted as numbers
      sql/hostname.cc:
        Don't block not resolved IP's if DNS server is down (Bug #8467)
      sql/item.h:
        Added cast_to_int_type() to ensure that enums are casted as numbers
      sql/item_func.cc:
        CAST(string_argument AS UNSIGNED) didn't work for big integers above the
        signed range. (Bug #7036)
        Produce warnings of wrong cast of strings to signed/unsigned
      sql/item_func.h:
        CAST(string_argument AS UNSIGNED) didn't work for big integers above the
        signed range. (Bug #7036)
      97b08214
  11. 28 Apr, 2005 1 commit
    • unknown's avatar
      if outer refernce (identifier) was resolved with help of cache all subqueries... · ca119d39
      unknown authored
      if outer refernce (identifier) was resolved with help of cache all subqueries and resolved item itseld have to be correctly marked as dependent
      (BUG#10041)
      
      
      sql/item.cc:
        depended_from shoudl be cleaned
        layout fixed
        function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
      sql/item.h:
        function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
      sql/item_subselect.h:
        function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
      sql/sql_base.cc:
        if outer refernce (identifier) was resolved with help of cache all subqueries and resolved item itseld have to be correctly marked as dependent
      ca119d39
  12. 16 Apr, 2005 1 commit
    • unknown's avatar
      subselect.result, subselect.test: · 2b92a78e
      unknown authored
        Added a test case for bug #9338.
      sql_select.cc:
        Fixed bug #9338.
        When an occurence of a field reference has to be replaced
        by another field reference the whole Item_field must be
        replaced.
      item.cc:
        Fixed bug #9338.
        The method Item_field::replace_equal_field_processor was
        replaced by Item_field::replace_equal_field. The new method
        is used to replace the occurences of Item_field objects.
      item.h:
        Fixed bug #9338.
        The virtual function replace_equal_field_processor was replaced
        by replace_equal_field. The latter is supposed to be used as a
        callback function in calls of the method transform.
      
      
      sql/item.h:
        Fixed bug #9338.
        The virtual function replace_equal_field_processor was replaced
        by replace_equal_field. The latter is supposed to be used as a
        callback function in calls of the method transform.
      sql/item.cc:
        The method Item_field::replace_equal_field_processor was
        replaced by Item_field::replace_equal_field The new method
        is used to replace the occurences of Item_field objects.
      sql/sql_select.cc:
        Fixed bug #9338.
        When an occurence of a field reference has to be replaced
        by another field reference the whole Item_field must be
        replaced.
      mysql-test/t/subselect.test:
        Added a test case for bug #9338.
      mysql-test/r/subselect.result:
        Added a test case for bug #9338.
      2b92a78e
  13. 14 Apr, 2005 1 commit
    • unknown's avatar
      Fixed BUG#9598: stored procedure call within stored procedure · e0fdbeba
      unknown authored
                      overwrites IN variable
        and added error checking of variables for [IN]OUT parameters while
        rewriting the out parameter handling.
      
      
      mysql-test/r/sp-error.result:
        New test case for non-variable argument for [IN]OUT parameters.
        (And changed to qualified names in some other error messages.)
      mysql-test/r/sp.result:
        New test case for BUG#9598.
      mysql-test/t/sp-error.test:
        New test case for non-variable argument for [IN]OUT parameters.
      mysql-test/t/sp.test:
        New test case for BUG#9598.
      sql/item.h:
        Need to distinguish between SP local variable items and other items,
        for error checking and [IN]OUT parameter handling.
      sql/share/errmsg.txt:
        New error message for non-variable arguments for [IN]OUT parameters in stored procedures.
      sql/sp_head.cc:
        Rewrote the [IN]OUT parameter handling in procedure invokation, to make
        it work properly when using user variables in sub-calls.
        Also added error checking for non-variable arguments for such parameters
        (and changed to qualified names for wrong number of arg. errors).
      sql/sp_rcontext.cc:
        No need to keep track on the out index for an [IN]OUT parameter any more.
      sql/sp_rcontext.h:
        No need to keep track on the out index for an [IN]OUT parameter any more.
      e0fdbeba
  14. 01 Apr, 2005 1 commit
    • unknown's avatar
      Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902) · db7561ec
      unknown authored
      CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912)
      ALTER TABLE now fails in STRICT mode if it generates warnings.
      Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)
      
      
      mysql-test/r/bigint.result:
        New warning added
      mysql-test/r/cast.result:
        Added testing of wrong CAST's of strings to numbers and numbers to strings
      mysql-test/r/create.result:
        Added test for wrong default values (#5902)
      mysql-test/r/func_if.result:
        Changed tests to produce less warnings
      mysql-test/r/func_misc.result:
        New warning
      mysql-test/r/func_str.result:
        Added missing drop table
        Changed test to produce less warnings
        New warnings
      mysql-test/r/ndb_index_unique.result:
        Removed wrong default usage
      mysql-test/r/ps_1general.result:
        Changed tests to produce less warnings
      mysql-test/r/row.result:
        New warnings
      mysql-test/r/rpl_session_var.result:
        Changed tests to produce less warnings
      mysql-test/r/strict.result:
        New tests for CAST() and zero date handling
      mysql-test/r/subselect.result:
        Changed tests to produce less warnings
      mysql-test/r/type_ranges.result:
        Changed tests to produce less warnings
      mysql-test/t/cast.test:
        Added testing of wrong CAST's of strings to numbers and numbers to strings
      mysql-test/t/create.test:
        Added test for wrong default values (#5902)
      mysql-test/t/func_if.test:
        Changed tests to produce less warnings
      mysql-test/t/func_str.test:
        Added missing drop table
        Changed test to produce less warnings
        New warnings
      mysql-test/t/ndb_index_unique.test:
        Removed wrong default usage
      mysql-test/t/ps_1general.test:
        Changed tests to produce less warnings
      mysql-test/t/rpl_session_var.test:
        Changed tests to produce less warnings
      mysql-test/t/strict.test:
        New tests for CAST() and zero date handling
      mysql-test/t/subselect.test:
        Changed tests to produce less warnings
      mysql-test/t/type_ranges.test:
        Changed tests to produce less warnings
      sql/Makefile.am:
        Added new include file
      sql/field.cc:
        Added warnings for zero dates for DATE, DATETIME and TIMESTAMP
        Moved Field_blob::max_length() to a more appropriate position
        Changed type for 'level' in set_warning() to avoid casts
      sql/field.h:
        Changed type for 'level' in set_warning() to avoid casts
      sql/field_conv.cc:
        Copy date and datetime fields through string in 'traditional' mode to detect zero dates
      sql/item.cc:
        Removed compiler warnings
        Give warnings for wrong CAST of strings -> number
      sql/item.h:
        Moved Item_string::val_real() and ::val_int() to item.cc
      sql/item_row.cc:
        Better detection of null values (which doesn't produce warnings)
      sql/item_sum.cc:
        Better detection of null values (which doesn't produce warnings)
      sql/item_timefunc.cc:
        Give warnings for wrong CAST of number -> string
      sql/my_decimal.cc:
        Fixed typo in comment
      sql/mysql_priv.h:
        Removed prototype for static function
        Moved defines for error handling to sql_error.h (to be able to use these in field.h)
      sql/mysqld.cc:
        Simplify code
      sql/sql_class.h:
        Moved to sql_error.h
      sql/sql_load.cc:
        Removed wrong cast
      sql/sql_parse.cc:
        Fixed wrong printf()
      sql/sql_table.cc:
        Made mysql_prepare_table() static
        Changed references to pointers to make code more readable
        ALTER TABLE now aborts if one gets warnings in STRICT mode
      sql/time.cc:
        Fixed possible wrong call
      sql/unireg.cc:
        Removed one call to current_thd
        Give errors if one uses a wrong DEFAULT value
      db7561ec
  15. 31 Mar, 2005 1 commit
    • unknown's avatar
      postmerge 4.1->5.0 fixes · c831a156
      unknown authored
      mysql-test/r/group_by.result:
        result change
      mysql-test/r/union.result:
        result change
      mysql-test/r/view.result:
        result change
      mysql-test/t/subselect.test:
        fixed mistake of merge
      sql/field.cc:
        new 5.0 types support
        temporary table/db names detection in field fixed
      sql/field.h:
        removed non-existent methods
        added wrongly deleted during manual merge string
      sql/item.cc:
        support of new types added to merge of union types routines
      sql/item.h:
        fixed method definition
      sql/item_cmpfunc.cc:
        fixed type
      sql/item_func.h:
        item type name fixed
      sql/item_subselect.cc:
        added forgoten methods
      sql/item_subselect.h:
        fixed type
      sql/sql_derived.cc:
        fixed typo of manual merge
      sql/sql_view.cc:
        added new parameter
      c831a156
  16. 30 Mar, 2005 1 commit
    • unknown's avatar
      BUG#8807 Select crash server · af2ab040
      unknown authored
       - Add function Item_param::fix_fields which will update any subselect they are part of and indicate that the subsleect is not const during prepare phase, and thus should not be executed during prepare.
      
      
      mysql-test/include/ps_query.inc:
        Adde new test case
      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
      sql/item.cc:
        Add function Item_param::fix_fields, which will mark any subselects they are part of as not being a constant expression unless the param value is specified, ie. it will be not be constant during prepare phase.
      sql/item.h:
        Adde Item_param::fix_fields
      sql/item_subselect.h:
        Make Item_param::fix_field friend of Item_subselect
      af2ab040
  17. 23 Mar, 2005 1 commit
    • unknown's avatar
      fixed union types merging and table related metadata (BUG#8824) · 5a425250
      unknown authored
      mysql-test/r/func_group.result:
        new result
      mysql-test/r/metadata.result:
        new result
        test of metadata of variables, unions and derived tables
      mysql-test/r/union.result:
        new results
        test of union of enum
      mysql-test/t/metadata.test:
        test of metadata of variables, unions and derived tables
      mysql-test/t/union.test:
        test of union of enum
      sql/field.cc:
        Field type merging rules added
        Fixed table name/alias returting for field made from temporary tables
      sql/field.h:
        removed unned field type reporting
      sql/item.cc:
        fixed bug in NEW_DATE type field creartion
        replaced mechanism of merging types of UNION
      sql/item.h:
        replaced mechanism of merging types of UNION
      sql/item_func.h:
        new item type to make correct field type detection possible
      sql/item_subselect.cc:
        added table name parameter to prepare() to show right table alias for derived tables
      sql/sql_derived.cc:
        added table name parameter to prepare() to show right table alias for derived tables
      sql/sql_lex.h:
        added table name parameter to prepare() to show right table alias for derived tables
      sql/sql_parse.cc:
        made function for enum/set pack length calculation
      sql/sql_prepare.cc:
        added table name parameter to prepare() to show right table alias for derived tables
      sql/sql_select.cc:
        new temporary table field creation by Item_type_holder
        fixed table alias for temporary table
      sql/sql_union.cc:
        added table name parameter to prepare() to show right table alias for derived tables
      5a425250
  18. 17 Mar, 2005 1 commit
  19. 16 Mar, 2005 2 commits
    • unknown's avatar
      Fix for bug#8656: Crash with group_concat on alias in outer table · a5c87958
      unknown authored
      fixed result_field support of Item_ref
      
      
      a5c87958
    • unknown's avatar
      olap.result, olap.test: · e16535ce
      unknown authored
        Added a test case for bug #8616.
      item.h:
        Fixed bug #8616.
        Added class Item_null_result used in rollup processing.
      sql_select.h, sql_select.cc:
        Fixed bug #8616.
        Added JOIN::rollup_write_data to cover rollup queries
        with DISTINCT. Modified other rollup methods.
      
      
      sql/sql_select.cc:
        Fixed bug #8616.
        Added JOIN::rollup_write_data to cover rollup queries
        with DISTINCT. Modified other rollup methods.
      sql/sql_select.h:
        Fixed bug #8616.
        Added JOIN::rollup_write_data to cover rollup queries
        with DISTINCT. Modified other rollup methods.
      sql/item.h:
        Fixed bug #8616.
        Added class Item_null_result used in rollup processing.
      mysql-test/t/olap.test:
        Added a test case for bug #8616.
      mysql-test/r/olap.result:
        Added a test case for bug #8616.
      e16535ce
  20. 13 Mar, 2005 1 commit
    • unknown's avatar
      WL#926 "SUM(DISTINCT) and AVG(DISTINCT)": improvement of SUM(DISTINCT) and · 1534ed8e
      unknown authored
       implementation of AVG(DISTINCT) which utilizes the approach with Fields.
      The patch implemented in October is portede to the up-to-date tree 
      containing DECIMAL type.
      Tests for AVG(DISTINCT) (although there is not much to test provided
      that SUM(DISTINCT) works), cleanups for COUNT(DISTINCT) and GROUP_CONCAT()
      will follow in another changeset.
      
      
      sql/field.cc:
        A handy way to init create_field used for use with virtual tmp tables.
        Feel free to extend it for your own needs.
      sql/field.h:
        Declaration for create_field::init_for_tmp_table()
      sql/item.cc:
        Implementation for a framework used to easily handle different result
        types of SQL expressions. Instead of having instances of each possible 
        result type (integer, decimal, double) in every item, variables
        of all used types are moved to struct Hybrid_type.
        Hybrid_type can change its dynamic type in runtime, and become,
        for instance, DECIMAL from INTEGER.
        All type-specific Item operations are moved to the class hierarchy
        Hybrid_type_traits. Item::decimals and Item::max_length can
        be moved to Hybrid_type as well.
      sql/item.h:
        Declaration for Hybrid_type framework. See also comments for item.cc
        in this changeset.
      sql/item_sum.cc:
        Rewritten implementation for Item_sum_sum_distinct (SUM(DISTINCT))
        and added implementation for Item_sum_avg_distinct (AVG(DISTINCT)).
        The classes utilize Hybrid_type class hierarchy and Fields to
        convert SUM/AVG arguments to binary representation and store in a RB-tree.
      sql/item_sum.h:
        Declarations for Item_sum_distinct (the new intermediate class used
        for SUM and AVG distinct), Item_sum_sum_distinct, Item_sum_avg_distinct.
      sql/sql_select.cc:
        Implementatio of create_virtual_tmp_table().
      sql/sql_select.h:
        Declaration for create_virtual_tmp_table.
      sql/sql_yacc.yy:
        Grammar support for Item_sum_avg_distinct.
      1534ed8e
  21. 04 Mar, 2005 1 commit
    • unknown's avatar
      type_blob.result, func_system.result, func_str.result, ctype_collate.result: · c56d0283
      unknown authored
        fixing test results accordingly.
      func_system.test:
        New test that illegal mix of collations does not happen anymore.
      item_strfunc.h:
          safe_charset_converter() was added for system constants.
      item_strfunc.cc:
        safe_charset_converter() was added for system constants.
      item_func.cc, item.h, item.cc:
        Bug#8291: Illegal collation mix with USER() function.
        After discussion with PeterG and Serge, a new coercibility
        level for "system constants" was introduced, between
        COERRIBLE and IMPLICIT. Thus:
        SELECT col1 = USER() FROM t1; - is done according to col1 collation.
        SELECT 'string' = USER(); - is done according to USER() collation.
        At the same time, "nagg" and "strong" members were removed as unused.
      item_create.cc:
        Version is a system constant too.
      
      
      sql/item.cc:
        Bug#8291: Illegal collation mix with USER() function.
        After discussion with PeterG and Serge, a new coercibility
        level for "system constants" was introduced, between
        COERRIBLE and IMPLICIT. Thus:
        SELECT col1 = USER() FROM t1; - is done according to col1 collation.
        SELECT 'string' = USER(); - is done according to USER() collation.
        At the same time, "nagg" and "strong" members were removed as unused.
      sql/item.h:
        Bug#8291: Illegal collation mix with USER() function.
        After discussion with PeterG and Serge, a new coercibility
        level for "system constants" was introduced, between
        COERRIBLE and IMPLICIT. Thus:
        SELECT col1 = USER() FROM t1; - is done according to col1 collation.
        SELECT 'string' = USER(); - is done according to USER() collation.
        At the same time, "nagg" and "strong" members were removed as unused.
      sql/item_create.cc:
        Version is a system constant too.
      sql/item_func.cc:
        Bug#8291: Illegal collation mix with USER() function.
        After discussion with PeterG and Serge, a new coercibility
        level for "system constants" was introduced, between
        COERRIBLE and IMPLICIT. Thus:
        SELECT col1 = USER() FROM t1; - is done according to col1 collation.
        SELECT 'string' = USER(); - is done according to USER() collation.
        At the same time, "nagg" and "strong" members were removed as unused.
      sql/item_strfunc.cc:
        safe_charset_converter() was added for system constants.
      sql/item_strfunc.h:
          safe_charset_converter() was added for system constants.
      mysql-test/t/func_system.test:
        New test that illegal mix of collations does not happen anymore.
      mysql-test/r/ctype_collate.result:
        fixing test results accordingly.
      mysql-test/r/func_str.result:
        fixing test results accordingly.
      mysql-test/r/func_system.result:
        fixing test results accordingly.
      mysql-test/r/type_blob.result:
        fixing test results accordingly.
      c56d0283
  22. 03 Mar, 2005 1 commit
  23. 02 Mar, 2005 1 commit
    • unknown's avatar
      bug#8151 - truncate leaves a transaction open · e1ba1632
      unknown authored
      deadlock in MYSQL_LOG::new_file()
      style fixes
      
      
      mysql-test/r/innodb.result:
        one more test for truncate
      mysql-test/t/innodb.test:
        one more test for truncate
      sql/ha_innodb.cc:
        bug#8151 - truncate leaves a transaction open
      sql/handler.cc:
        bug#8151 - truncate leaves a transaction open
      sql/item.h:
        style fix
      sql/item_cmpfunc.cc:
        style fix
      sql/item_cmpfunc.h:
        style fix
      sql/item_func.cc:
        style fix
      sql/item_func.h:
        style fix
      sql/log.cc:
        let new_file() to lock LOCK_index,
        don't check for prepared_xids in rotate_and_purge()
        increase thread_safe_increment when LOCK_log is taken
      sql/log_event.cc:
        mysqlbinlog now prints a warning if binlog was not closed properly
      sql/sql_class.h:
        comments
      sql/sql_repl.cc:
        DBUG_ENTER tag corrected
      e1ba1632
  24. 28 Feb, 2005 1 commit
  25. 22 Feb, 2005 1 commit
    • unknown's avatar
      Backport my_strntod() from 5.0 · cb8d9c3a
      unknown authored
      Change string->float conversion to delay division as long as possible.
      This gives us more exact integer->float conversion for numbers of type '123.45E+02' (Bug #7740)
      
      
      
      
      client/mysql.cc:
        Fix wront usage of charset (found during review of pushed code)
      include/m_string.h:
        Backported my_strtod() from 5.0
      mysql-test/mysql-test-run.sh:
        Run also mysql_client_test with --debug
      mysql-test/r/ps_1general.result:
        Safety fix (if mysql_client_test.test fails)
      mysql-test/r/type_float.result:
        More test
      mysql-test/t/mysql_client_test.test:
        Comments for what to do if this test fails
      mysql-test/t/ps_1general.test:
        Safety fix (if mysql_client_test.test fails)
      mysql-test/t/type_float.test:
        More test to better test new strtod() function
        Test also bug #7740 (wrong comparsion between integer and float-in-integer-range)
      sql/field.cc:
        Backport my_strntod() from 5.0
      sql/item.cc:
        Backport my_strntod() from 5.0
      sql/item.h:
        Backport my_strntod() from 5.0
      sql/item_func.h:
        Backport my_strntod() from 5.0
      sql/item_strfunc.cc:
        Backport my_strntod() from 5.0
      sql/item_sum.cc:
        Backport my_strntod() from 5.0
      sql/item_sum.h:
        Backport my_strntod() from 5.0
      sql/procedure.h:
        Backport my_strntod() from 5.0
      strings/ctype-simple.c:
        Backport my_strntod() from 5.0
      strings/ctype-ucs2.c:
        Backport my_strntod() from 5.0
      strings/strtod.c:
        Backport my_strntod() from 5.0
        Change conversion to delay division as long as possible.
        This gives us more exact integer-> float conversion for numbers of type '123.45E+02'
      cb8d9c3a
  26. 19 Feb, 2005 2 commits
    • unknown's avatar
      use dbug_print_decimal instead of DBUG_EXECUTE · 3805001f
      unknown authored
      Portability fix
      Note: rpl_trunc_binlog fails, but Sergei has promised to fix it, so I will ignore it for now
      
      
      sql/field.cc:
        use dbug_print_decimal instead of DBUG_EXECUTE
      sql/item.h:
        Portability fix
      sql/my_decimal.cc:
        Fix error in last changeset (not pushed)
      3805001f
    • unknown's avatar
      Fixed BUILD script to use --with-berkeley-db instead of --with-bdb · 64cc538b
      unknown authored
      Lots of small fixes to multi-precision-math path
      Give Note for '123.4e'
      Added helper functions type 'val_string_from_real()
      Don't give warnings for end space for string2decimal()
      Changed storage of values for SP so that we can detect length of argument without strlen()
      Changed interface for str2dec() so that we must supple the pointer to the last character in the buffer
      
      
      
      BUILD/SETUP.sh:
        with-bdb ->with-berkeley-db
      include/decimal.h:
        Make string2decimal and string2decimal_fixed inline
      mysql-test/r/func_group.result:
        More tests (to find bugs in precision math fixes)
      mysql-test/r/func_set.result:
        Test to cover more Item_func_field::val_xxx() code
      mysql-test/r/ps_6bdb.result:
        update results
      mysql-test/r/type_decimal.result:
        New tests
        Give note for '123.4e'
      mysql-test/r/type_newdecimal.result:
        Number of decimal changes (probably right, but hard to verify)
      mysql-test/t/func_group.test:
        More tests (to find bugs in precision math fixes)
      mysql-test/t/func_set.test:
        Test to cover more Item_func_field::val_xxx() code
      mysql-test/t/type_decimal.test:
        New tests to cover more cases in decimal.c
      sql/item.cc:
        Added helper functions type 'val_string_from_real()'
        Use new interfase to str2my_decimal()
        Moved nr_of_decimals() here (and made it static)
      sql/item.h:
        Added helper functions type 'val_string_from_real()'
      sql/item_func.cc:
        Style fixes
        Trivial optimizations
        Ensure null_value is set if my_decimal_add/sub/mul/div returns error
        Remove not needed Item_func_int_div::val_str()
        Join Item_func_signproc and Item_func_neg
        Fix that FIELD() works when first argument is NULL or one if it's arguments are NULL
        new str2my_decimal interface
      sql/item_func.h:
        Make Item_func_int_div inherit from Item_int_func (allows us to remove some virtual functions)
        Join Item_func_signproc & Item_func_neg
      sql/item_strfunc.cc:
        Move nr_of_decmails() to Item.cc (as it was only used here)
      sql/item_sum.cc:
        Style fixes
        Change a lot of code to use new helper converter functions in item.cc
        Moved Item_sum::val_decimal() to Item_sum_int::val_decimal()
        Fixed calls to wrong functions (Item_sum_num::val_int())
        Ensure that all hybrid functions checks hybrid_type in val_xxx() (As there is no gurantee that they are called in the right context)
        Simplify key_length allocation in Item_sum_sum_distinct()
        Simplified create_tmp_field() and reset_field()
        Fixed potential error in Item_sum_hybrid::reset_field()
        Optimize Item_sum_avg::update_field()
        Item_std_field() functions musted be fully coded becasue Item_variance_field::val_xxx functions called helper functions
        Coded missing Item_sum_ufd_xxx::val_decimal() functions
      sql/item_sum.h:
        Moved Item_sum::val_decimal() to Item_sum_int::val_decimal()
        Added missing Item_sum_ufd_xxx::val_decimal() functions
        Removed not used scale() function.
        Fixed that Item_std_field() works with decimal arguments
        Fixed that CREATE ... STD() will create a REAL field
      sql/log_event.cc:
        Ensure that we use same format for all types
      sql/my_decimal.cc:
        Don't give warnings for end space for string2decimal()
        Added dbug_print_decimal()
      sql/my_decimal.h:
        Style fixes
        Prototypes for new functions
        New interface for str2my_decimal()
      sql/mysql_priv.h:
        Made nr_of_decimals() static
      sql/protocol.cc:
        Simplify code (by assume that decimal can't be bigger than DECIMAL_MAX_STR_LENGTH]
      sql/protocol_cursor.cc:
        Changed storage of values for SP so that we can detect length of argument without strlen()
      sql/sp_head.cc:
        Simplify code for decimal handling by letting item handling conversion to decimal
      sql/sp_rcontext.cc:
        Use new method to get length of arguments
      sql/sql_analyse.cc:
        if -> switch
        Increase 'empty' if decimal value=0
        Remove usage of strcat()
      sql/sql_base.cc:
        Remove unnecessary checks
      sql/sql_class.cc:
        Remove not needed 'else'
        Removed not used variables
      sql/sql_select.cc:
        remove test for impossible condtion
      strings/decimal.c:
        Made two trivial functions macros
        Changed interface for str2dec() so that we must supple the pointer to the last character in the buffer
        This safer than before as we don't require an end \0 anymore (old code gave wrong answers in MySQL for some internals strings that where not \0 terminated)
        Detect error numbers of type '12.55e'
        str2dec() will now set 'to' to zero in case of errors
      64cc538b
  27. 18 Feb, 2005 1 commit
    • unknown's avatar
      Changes and fixes for windows compilation · af4b5c89
      unknown authored
      VC++Files/libmysqld/libmysqld.dsp:
        added sql/my_decimal.cc
      VC++Files/sql/mysqld.dsp:
        added my_decimal.cpp
      VC++Files/strings/strings.dsp:
        added decimal.c
      sql/field.cc:
        conversion fixes for windows compilation
      sql/item.h:
        fix for windows compilation
      sql/item_func.cc:
        fixed conversion for windows (cast from ulonglong to double 
        is not supported)
      sql/item_sum.cc:
        typecast fix for windows compilation
      sql/sp_head.cc:
        typecast fix fo windows compilation
      sql/sql_cache.cc:
        typecast fix for windows compilation
      af4b5c89
  28. 17 Feb, 2005 1 commit
    • unknown's avatar
      item.h: · 41c09450
      unknown authored
        Revised the fix for bug #7098.
        Corrected the method Item_string::new_item.
      sql_select.cc:
        Revised the fix for bug #7098.
        Aborted the previous modifications.
      
      
      sql/sql_select.cc:
        Revised the fix for bug #7098.
        Aborted the previous modifications.
      sql/item.h:
        Revised the fix for bug #7098.
        Corrected the method Item_string::new_item.
      41c09450
  29. 16 Feb, 2005 1 commit
    • unknown's avatar
      Fixed BUG#8540: Local variable overrides an alias. · 0f466d04
      unknown authored
      mysql-test/r/sp.result:
        New test case for BUG#8540.
      mysql-test/t/sp.test:
        New test case for BUG#8540.
      sql/item.h:
        Use the existing name (if any) for a SP local variable (to get the correct
        field name in a select in the case of an alias).
      0f466d04
  30. 15 Feb, 2005 1 commit
    • unknown's avatar
      Fix signatures of placement operator delete in places where placement · de109e46
      unknown authored
      delete is declared. As we don't use exceptions placement delete is never 
      called and the fix only affects numerous warnings when
      compiling with MS Visual C++.
      For more info see http://www.gotw.ca/gotw/010.htm.
      
      
      sql/item.h:
        Fix the signature of placement operator delete for class Item.
      sql/sql_class.cc:
        Add placement delete operator to suppress a warning under Windows.
      sql/sql_lex.h:
        Fix the signature of placement operator delete for class LEX
      sql/sql_list.h:
        Fix the signature of placement operator delete for class Sql_alloc
      sql/sql_string.h:
        Fix the signature of placement operator delete for class Sql_string
      de109e46
  31. 08 Feb, 2005 2 commits
    • unknown's avatar
      Precision Math implementation · 91db48e3
      unknown authored
      BitKeeper/etc/ignore:
        Added client/decimal.c client/my_decimal.cc client/my_decimal.h to the ignore list
      91db48e3
    • unknown's avatar
      Better bugfix for "HAVING when refering to RAND()" (Bug #8216) · 63982db9
      unknown authored
      Ensure that references in HAVING, ORDER BY or GROUP BY are calculated after fields in SELECT.
      This will ensure that any reference to these has a valid value.
      Generalized the code for split_sum_func()
      
      
      BitKeeper/etc/ignore:
        added support-files/ndb-config-2-node.ini
      mysql-test/r/group_by.result:
        More complicated test to assure that rand() is only calulated once
      mysql-test/r/user_var.result:
        Back to old results :(  (ok but not perfect)
      mysql-test/t/group_by.test:
        More complicated test to assure that rand() is only calulated once
      sql/item.cc:
        Better bugfix for "HAVING when refering to RAND()"
        This will ensure that when refering to things like RAND() in HAVING through an alias we will not recalculate that rand() value in the HAVING part but use the value in the row
        Generalize split_sum_func()
      sql/item.h:
        Better bugfix for "HAVING when refering to RAND()"
        T
      sql/item_cmpfunc.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Use generalized split_sum_func2() function
      sql/item_func.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Use generalized split_sum_func2() function
      sql/item_row.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Use generalized split_sum_func2() function
      sql/item_strfunc.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Use generalized split_sum_func2() function
      sql/sql_list.h:
        Add functions to concatenate lists
      sql/sql_select.cc:
        Better bugfix for "HAVING when refering to RAND()"
        Ensure that references in HAVING, ORDER BY or GROUP BY are calculated after fields in SELECT.
        This will ensure that any reference to these has a valid value.
      63982db9
  32. 04 Feb, 2005 1 commit
    • unknown's avatar
      A fix: bug#6931: Date Type column problem when using UNION-Table · 66eb71f3
      unknown authored
             bug#7833:  Wrong datatype of aggregate column is returned
      
      
      mysql-test/r/func_group.result:
        Test case for bug 7833:  Wrong datatype of aggregate column is returned
      mysql-test/r/union.result:
        Test case for bug 6931: Date Type column problem when using UNION-Table.
      mysql-test/t/func_group.test:
        Test case for bug 7833:  Wrong datatype of aggregate column is returned
      mysql-test/t/union.test:
        Test case for bug 6931: Date Type column problem when using UNION-Table.
      66eb71f3
  33. 15 Jan, 2005 1 commit
    • unknown's avatar
      After merge fixes · 6ead8600
      unknown authored
      Fix for BIT(X) field as string
      
      
      mysql-test/r/func_gconcat.result:
        Fix wrong merge
      mysql-test/r/func_sapdb.result:
        Use results so that dimitry can fix them properly
      mysql-test/r/innodb.result:
        Update test after fast TRUNCATE in InnoDB
      mysql-test/r/ps_1general.result:
        After megre fixes
      mysql-test/r/type_bit.result:
        New test to verify patch for Bit fields
      mysql-test/t/ps_1general.test:
        After merge fixes
      mysql-test/t/type_bit.test:
        New test to verify patch for Bit fields
      sql/field.cc:
        Fix for new my_strntod()
        Fix for BIT(X) field as string
      sql/item.h:
        Fix for new my_strntod()
      sql/item_func.h:
        Fix for new my_strntod()
      sql/item_sum.h:
        Fix for new my_strntod()
      sql/procedure.h:
        Fix for new my_strntod()
      sql/sql_base.cc:
        Port fix for INSERT DELAYED with prepared statements to 5.0
      6ead8600
  34. 14 Jan, 2005 1 commit
    • unknown's avatar
      In TRADITIONAL mode, don't allow a NOT NULL field with no default be set to · dcfc9c89
      unknown authored
      DEFAULT (with no argument) or to the field's type's default by not being
      listed in the list of fields being inserted. (Bug #5986)                    
      
      
      sql/item.cc:
        Add Item_default_value::save_in_field(), with check for setting fields
        with no default value set.
      sql/item.h:
        Implementation of Item_default_value::save_in_field moved to item.cc
      sql/sql_insert.cc:
        Call check_that_all_fields_are_given_values() if no values were
        given and we would be filling row with all default values
      mysql-test/t/strict.test:
        Add tests for setting fields to DEFAULT in traditional and regular modes
      mysql-test/r/strict.result:
        Add results
      dcfc9c89
  35. 30 Dec, 2004 1 commit
    • unknown's avatar
      After merge fixes · 2e8d13c7
      unknown authored
      config/ac-macros/character_sets.m4:
        Added latin1_spanish_ci
      dbug/dbug_analyze.c:
        Remove compiler warnings
      include/my_handler.h:
        Reorder structure arguments to be more optimal
      innobase/dict/dict0load.c:
        Fixed wrong define tag (for MySQL 5.0)
      innobase/fil/fil0fil.c:
        Fixed compiler warning
      innobase/os/os0file.c:
        Fixed compiler warning
      myisam/ft_boolean_search.c:
        Fixed compiler warning
      myisam/ft_static.c:
        Update to use new HA_KEYSEG structure
      myisam/mi_open.c:
        Simple optimization
      myisammrg/myrg_static.c:
        Removed compiler warning
      mysql-test/r/grant.result:
        Update results after merge
      mysql-test/r/index_merge.result:
        Update results after merge
      mysql-test/r/information_schema_inno.result:
        Add missing drop table
      mysql-test/r/lowercase_table.result:
        safety fix
      mysql-test/r/multi_update.result:
        safety fix
      mysql-test/r/ps_1general.result:
        safety fix
      mysql-test/r/ps_2myisam.result:
        Update results after merge
        (set is not anymore of binary type)
      mysql-test/r/ps_3innodb.result:
        Update results after merge
      mysql-test/r/ps_4heap.result:
        Update results after merge
      mysql-test/r/ps_5merge.result:
        Update results after merge
      mysql-test/r/ps_6bdb.result:
        Update results after merge
      mysql-test/r/show_check.result:
        Update results after merge
      mysql-test/r/subselect.result:
        Update results after merge
        (added missing quotes)
      mysql-test/r/timezone2.result:
        Update results after merge
      mysql-test/r/view.result:
        Update results after merge
        (note that INSERT IGNORE will work again after next merge from 4.1)
      mysql-test/t/derived.test:
        Removed empty line
      mysql-test/t/grant.test:
        Update results after merge
      mysql-test/t/information_schema_inno.test:
        added missing drop table
      mysql-test/t/lowercase_table.test:
        safety fix
      mysql-test/t/multi_update.test:
        safety fix
      mysql-test/t/ps_1general.test:
        safety fix
      mysql-test/t/view.test:
        update error codes after merge
      ndb/src/mgmsrv/main.cpp:
        after merge fix
      ndb/tools/ndb_test_platform.cpp:
        removed compiler warnings
      regex/main.c:
        remove compiler warnings
      sql/field.cc:
        Remove compiler warning
      sql/gen_lex_hash.cc:
        Added DBUG support
      sql/ha_myisam.cc:
        Removed warning from valgrind
      sql/ha_ndbcluster.cc:
        Remove compiler warning
      sql/item_cmpfunc.cc:
        Better to use val_int() instead of val_real() as we don't want Item_func_nop_all to return different value than the original ref element
      sql/mysqld.cc:
        Remove compiler warning
      sql/sql_acl.cc:
        More debugging
      sql/sql_lex.cc:
        Remove unnecessary 'else'
      sql/sql_parse.cc:
        After merge fixes
        Simplify reset of thd->server_status for SQLCOM_CALL
      sql/sql_prepare.cc:
        After merge fixes
        Removed possible core dump in mysql_stmt_fetch()
      sql/sql_update.cc:
        After merge fixes (together with Sanja)
      strings/ctype-czech.c:
        Remove compiler warning
      strings/ctype-ucs2.c:
        Remove compiler warning
      strings/ctype-win1250ch.c:
        Remove compiler warning
      strings/xml.c:
        Remove compiler warning
      tests/client_test.c:
        Fix test to work with 5.0
      vio/test-sslserver.c:
        Portability fix
      2e8d13c7