1. 05 Oct, 2007 8 commits
    • unknown's avatar
      Merge mysql.com:/home/hf/work/30286/my41-30286 · 071e55af
      unknown authored
      into  mysql.com:/home/hf/work/30286/my50-30286
      
      
      mysql-test/t/gis.test:
        Auto merged
      sql/gstream.cc:
        Auto merged
      mysql-test/r/gis.result:
        SCCS merged
      071e55af
    • unknown's avatar
      Merge mysql.com:/home/hf/work/30955/my41-30955 · 77d786b5
      unknown authored
      into  mysql.com:/home/hf/work/30286/my41-30286
      
      
      77d786b5
    • unknown's avatar
      Merge mysql.com:/home/hf/work/30286/my41-30286 · c7aff982
      unknown authored
      into  mysql.com:/home/hf/work/30286/my50-30286
      
      
      c7aff982
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1-opt · c14e8c80
      unknown authored
      into  mysql.com:/home/hf/work/30286/my41-30286
      
      
      c14e8c80
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 794ed298
      unknown authored
      into  mysql.com:/home/hf/work/30286/my50-30286
      
      
      794ed298
    • unknown's avatar
      Merge mysql.com:/home/hf/work/30286/my41-30286 · 8e374815
      unknown authored
      into  mysql.com:/home/hf/work/30286/my50-30286
      
      
      myisam/rt_index.c:
        Auto merged
      myisam/rt_mbr.c:
        Auto merged
      mysql-test/t/gis-rtree.test:
        Auto merged
      mysql-test/r/gis-rtree.result:
        merging
      8e374815
    • unknown's avatar
      Bug #30286 spatial index cause corruption and server crash! · 6d54b577
      unknown authored
      As the result of DOUBLE claculations can be bigger
      than DBL_MAX constant we use in code, we shouldn't use this constatn
      as a biggest possible value.
      Particularly the rtree_pick_key function set 'min_area= DBL_MAX' relying
      that any rtree_area_increase result will be less so we return valid
      key. Though in rtree_area_increase function we calculate the area
      of the rectangle, so the result can be 'inf' if the rectangle is
      huge enough, which is bigger than DBL_MAX.
      
      Code of the rtree_pick_key modified so we always return a valid key.
      
      
      myisam/rt_index.c:
        Bug #30286 spatial index cause corruption and server crash!
        
        always set the best_key with the first key we get, so we always return
        somthing valid.
      myisam/rt_mbr.c:
        Bug #30286 spatial index cause corruption and server crash!
        
        function comment extended
      mysql-test/r/gis-rtree.result:
        Bug #30286 spatial index cause corruption and server crash!
        test result
      mysql-test/t/gis-rtree.test:
        Bug #30286 spatial index cause corruption and server crash!
        test case
      6d54b577
    • unknown's avatar
      test fix(to satisfy WIN) · 554d405d
      unknown authored
      
      mysql-test/r/information_schema.result:
        result fix
      554d405d
  2. 04 Oct, 2007 1 commit
    • unknown's avatar
      Bug#30079 A check for "hidden" I_S tables is flawed · 4ae273e3
      unknown authored
      added check for hidden I_S tables for 'show columns|keys' commands
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      sql/sql_parse.cc:
        added check for hidden I_S tables for 'show columns|keys' commands
      4ae273e3
  3. 03 Oct, 2007 3 commits
    • unknown's avatar
      Bug #30955 geomfromtext() crasher. · ae3d4bfc
      unknown authored
      end-of-line check missed in Gis_read_stream::get_next_word,
      what can lead to crashes (expecially with NULL strings).
      
      End-of-line check added
      
      
      sql/gstream.cc:
        Bug #30955 geomfromtext() crasher
      mysql-test/r/gis.result:
        Bug #30955 geomfromtext() crasher.
        
        test result
      mysql-test/t/gis.test:
        Bug #30955 geomfromtext() crasher.
        
        test case
      ae3d4bfc
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt-31077 · a408f348
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      
      a408f348
    • unknown's avatar
      mysqldump.test, mysqldump.result: · b802af43
      unknown authored
        Bug #31077: post-commit fix.
      
      
      mysql-test/t/mysqldump.test:
        Bug #31077: post-commit fix.
      mysql-test/r/mysqldump.result:
        Bug #31077: post-commit fix.
      b802af43
  4. 02 Oct, 2007 8 commits
  5. 01 Oct, 2007 4 commits
    • unknown's avatar
      Bug#31095: Unexpected NULL constant caused server crash. · 1a4df8a2
      unknown authored
      The Item_func_rollup_const class is used for wrapping constants to avoid
      wrong result for ROLLUP queries with DISTINCT and a constant in the select
      list. This class is also used to wrap up a NULL constant but its null_value
      wasn't set accordingly. This led to a server crash.
      
      Now the null_value of an object of the Item_func_rollup_const class is set
      by its fix_length_and_dec member function.
      
      
      mysql-test/t/olap.test:
        Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
      mysql-test/r/olap.result:
        Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
      sql/item_func.h:
        Bug#31095: Unexpected NULL constant caused server crash. 
        Now the null_value of an object of the Item_func_rollup_const class is set
        by its fix_length_and_dec member function.
      1a4df8a2
    • unknown's avatar
      Fixed bug #31077. · 02bb72c7
      unknown authored
      mysqldump adds the "-- Dump completed on YYYY-MM-DD hh:mm:ss" string
      to the end of output if the --comments switch is on.
      The only way to suppress this line is to use --skip-comments/--compact
      switch.
      
      New switch has been added to the mysqldump client command line:
      --dump-date.
      
      For the compatibility with previous releases, by default the --dump-date
      is on.
      The --dump-date switch forces mysqldump to add date to the
      "-- Dump completed on ..." string at the end of output.
      The --skip-dump-date switch supresses the output of date string
      and uses short form of that commentary: "-- Dump completed".
      --skip-comments or --compact switches disable the whole commentary
      as usual.
      
      
      client/client_priv.h:
        Fixed bug #31077.
        New OPT_DUMP_DATE option has been added to implement
        the mysqldump client --dump-date switch.
      client/mysqldump.c:
        Fixed bug #31077.
        The opt_dump_date variable has been added to imlements
        the mysqldump cliemt --dump-date switch.
        By default this switch is on (for compatibility with previous
        releases).
        The --dump-date switch forces mysqldump to add date to the
        "-- Dump completed on ..." string at the end of output.
        The --skip-dump-date switch supresses the output of date string
        and uses short form of that commentary: "-- Dump completed".
        --skip-comments or --compact switches disable the whole commentary
        as usual.
      mysql-test/t/mysqldump.test:
        Added test case for bug #31077.
      mysql-test/r/mysqldump.result:
        Added test case for bug #31077.
      02bb72c7
    • unknown's avatar
      0ad23eb8
    • unknown's avatar
      fixed pb problem with the fix for bug 30587 · fb05833e
      unknown authored
      fb05833e
  6. 29 Sep, 2007 1 commit
    • unknown's avatar
      view_grant.result, view_grant.test: · c6a4e65a
      unknown authored
        Corrected test case for the bug#29908.
      
      
      mysql-test/t/view_grant.test:
        Corrected test case for the bug#29908.
      mysql-test/r/view_grant.result:
        Corrected test case for the bug#29908.
      c6a4e65a
  7. 28 Sep, 2007 5 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 084cbc7e
      unknown authored
      into  moonbone.local:/work/27990-bug-5.0-opt-mysql
      
      
      sql/field.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      084cbc7e
    • unknown's avatar
      Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used. · 6a8bd84a
      unknown authored
      The change_to_use_tmp_fields function leaves the orig_table member of an
      expression's tmp table field filled for the new Item_field being created.
      Later orig_table is used by the Field::make_field function to provide some
      info about original table and field name to a user. This is ok for a field
      but for an expression it should be empty.
      
      The change_to_use_tmp_fields function now resets orig_table member of
      an expression's tmp table field to prevent providing a wrong info to a user.
      The Field::make_field function now resets the table_name and the org_col_name
      variables when the orig_table is set to 0.
      
      
      sql/field.cc:
        Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
        The Field::make_field function now resets the table_name and the org_col_name
        variables when the orig_table is set to 0.
      sql/sql_select.cc:
        Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
        The change_to_use_tmp_fields function now resets orig_table member of
        an expression's tmp table field to prevent providing a wrong info to a user.
      tests/mysql_client_test.c:
        The test case for the bug#21635 is altered to test behavior on both const and
        non-const tables.
      6a8bd84a
    • unknown's avatar
      Bug #30832: Assertion + crash with select name_const('test', now()); · 582388e6
      unknown authored
      The NAME_CONST function is required to work correctly with constants only.
      When executed with functions that return types other than those returned by
      Item::field_type (string, int, decimal, or real), the result gets cast to
      one of those types. This cannot happen for constants.
      Fixed by only allowing constants as arguments to NAME_CONST.
      
      
      mysql-test/r/func_misc.result:
        Bug#30832: Test result
      mysql-test/t/func_misc.test:
        Bug#30832: Test case
      sql/item.h:
        Bug#30832: The fix
      582388e6
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 4c14efa6
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B30587-5.0-opt
      
      
      sql/item_func.cc:
        Auto merged
      4c14efa6
    • unknown's avatar
      Bug #30587: mysql crashes when trying to group by TIME div NUMBER · bebcb221
      unknown authored
      When calculating the result length of an integer DIV function 
      the number of decimals was used without checking the result type
      first. Thus an uninitialized number of decimals was used for some 
      types. This caused an excessive amount of memory to be allocated 
      for the field's buffer and crashed the server.
      
       
      Fixed by using the number of decimals only for data types that 
      can have decimals and thus have valid decimals number.
      
      
      mysql-test/r/func_math.result:
        Bug #30587: test case
      mysql-test/t/func_math.test:
        Bug #30587: test case
      sql/item_func.cc:
        Bug #30587: Don't use decimals on a type that doesn't have them.
      bebcb221
  8. 27 Sep, 2007 5 commits
  9. 24 Sep, 2007 1 commit
    • unknown's avatar
      Bug #28702: VIEWs defined with USE/FORCE KEY ignore that request · ca448acc
      unknown authored
      When storing the VIEW the CREATE VIEW command is reconstructed 
      from the parse tree. While constructing the command string
      the index hints specified should also be printed.
      Fixed by adding code to print the index hints when printing a 
      table in the FROM clause.
      
      
      mysql-test/r/view.result:
        Bug #28702: test case
      mysql-test/t/view.test:
        Bug #28702: test case
      sql/sql_select.cc:
        Bug #28702: preserve index hints in a VIEW definition.
      sql/table.h:
        Bug #28702: preserve index hints in a VIEW definition.
      ca448acc
  10. 22 Sep, 2007 4 commits
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 5d59c1e8
      unknown authored
      into  macbook.local:/Users/kgeorge/mysql/autopush/B28701-merged-5.0-opt
      
      
      5d59c1e8
    • unknown's avatar
      Merge macbook.local:/Users/kgeorge/mysql/work/B28701-5.0-opt · 18397a5d
      unknown authored
      into  macbook.local:/Users/kgeorge/mysql/work/B28701-merged-5.0-opt
      
      
      sql/sql_view.cc:
        Auto merged
      mysql-test/r/view.result:
        merge with 5.0-opt
      mysql-test/t/view.test:
        merge with 5.0-opt
      18397a5d
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 17df0d64
      unknown authored
      into  sunlight.local:/local_work/27216-bug-5.0-opt-mysql
      
      
      sql/sql_insert.cc:
        Auto merged
      17df0d64
    • unknown's avatar
      Bug#27216: functions with parameters of different date types may return wrong · ebaa05ef
      unknown authored
      type of the result.
      
      There are several functions that accept parameters of different types.
      The result field type of such functions was determined based on
      the aggregated result type of its arguments. As the DATE and the DATETIME
      types are represented by the STRING type, the result field type
      of the affected functions was always STRING for DATE/DATETIME arguments.
      The affected functions are COALESCE, IF, IFNULL, CASE, LEAST/GREATEST, CASE.
      
      Now the affected functions aggregate the field types of their arguments rather
      than their result types and return the result of aggregation as their result
      field type.
      The cached_field_type member variable is added to the number of classes to
      hold the aggregated result field type.
      The str_to_date() function's result field type now defaults to the
      MYSQL_TYPE_DATETIME.
      The agg_field_type() function is added. It aggregates field types with help
      of the Field::field_type_merge() function.
      The create_table_from_items() function now uses the 
      item->tmp_table_field_from_field_type() function to get the proper field
      when the item is a function with a STRING result type.
      
      
      libmysql/libmysql.c:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The client library now accepts the NEWDATE type as a string.
      sql/item_cmpfunc.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        Now the fix_length_and_dec functions of the
        Item_func_ifnull,Item_func_if, Item_func_case, Item_func_coalesce
        classes are use agg_field_type function to find out the type of their 
        result field.
      sql/item_cmpfunc.h:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The cached_field type is added to the Item_func_case, Item_func_if and
        Item_func_coalesce classes.
        The field_type function is added to the Item_func_ifnull, Item_func_if,
        Item_func_coalesce, Item_func_case classes.
      sql/item_func.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The Item_func_min_max::fix_length_and_dec function now uses the agg_field_type
        function to find out the correct type of the result field.
      sql/item_func.h:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The cached_field_type variable is added to the Item_func_min_max class.
      sql/item_timefunc.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The result of the str_to_date function now defaults to the
        DATETIME type.
      sql/mysql_priv.h:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The prototype of the agg_field_type function is added.
      sql/protocol.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The Protocol_simple::store function is now used to store fields of NEWDATE type.
      sql/sql_insert.cc:
        Bug#27216: functions with parameters of different date types may return wrong
        type of the result.
        The create_table_from_items function now uses the
        tmp_table_field_from_field_type function to get field for items with the
        STRING result type.
      mysql-test/r/date_formats.result:
        A test case result corrected after fixing bug#27216.
      mysql-test/r/type_datetime.result:
        Added a test case for the bug#27216: functions with parameters of different
        date types may return wrong type of the result.
      mysql-test/t/type_datetime.test:
        Added a test case for the bug#27216: functions with parameters of different
        date types may return wrong type of the result.
      ebaa05ef