1. 12 Oct, 2007 1 commit
  2. 04 Oct, 2007 1 commit
    • unknown's avatar
      Bug #31155 gis types in union'd select cause crash. · 813e6bcb
      unknown authored
      We use get_geometry_type() call to decide the exact type
      of a geometry field to be created (POINT, POLYGON etc)
      Though this function was only implemented for few items.
      In the bug's case we need to call this function for the
      Item_sum instance, where it was not implemented, what is
      the reason of the crash.
      Fixed by implementing virtual Item::get_geometry_type(),
      so it can be called for any Item.
      
      
      sql/item.h:
        Bug #31155 gis types in union'd select cause crash.
        virtual Item::geometry_type() added instead of
        various geometry_type() fucntions.
      sql/item.cc:
        Bug #31155 gis types in union'd select cause crash.
        
        Unified virtual ::get_geometry_type() function used
      sql/item_geofunc.cc:
        Bug #31155 gis types in union'd select cause crash.
        
        virtual Item::geometry_type() implemented for geo-Items.
        Mostly previous ::get_geometry_type() implementation changed
      sql/item_geofunc.h:
        Bug #31155 gis types in union'd select cause crash.
        
        get_geometry_type() declarations unified
      813e6bcb
  3. 01 Oct, 2007 6 commits
  4. 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
  5. 28 Sep, 2007 12 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 macbook:mysql/work/B30587-5.0-opt · 82c059cf
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/work/B30587-5.1-opt
      
      
      mysql-test/r/func_math.result:
        Auto merged
      mysql-test/t/func_math.test:
        Auto merged
      sql/item_func.cc:
        Auto merged
      82c059cf
    • 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
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · c3fb2076
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      
      c3fb2076
    • unknown's avatar
      Bug#30795 Query on INFORMATION_SCHEMA.SCHEMATA, wrong result · fcc3be91
      unknown authored
      skip the check of directory presence for 'information_schema' name
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      sql/sql_show.cc:
        skip the check of directory presence for 'information_schema' name
      fcc3be91
    • unknown's avatar
      Bug#30689 Wrong content in I_S.VIEWS.VIEW_DEFINITION if VIEW is based on I_S · a8b11608
      unknown authored
      view_body_utf8 attribute type is changed to 'escaped string'
      
      
      mysql-test/r/ddl_i18n_koi8r.result:
        result fix
      mysql-test/r/ddl_i18n_utf8.result:
        result fix
      mysql-test/r/information_schema.result:
        result fix
      mysql-test/t/information_schema.test:
        test case
      a8b11608
    • unknown's avatar
      Bug#30665: Post-merge fix · be67347f
      unknown authored
      be67347f
    • unknown's avatar
      Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt · b034267f
      unknown authored
      into  dl145s.mysql.com:/data0/mhansson/my51-bug30665
      
      
      sql/sql_select.cc:
        Auto merged
      b034267f
    • unknown's avatar
      Bug#30665: Inconsistent optimization of IGNORE INDEX FOR {ORDER BY|GROUP BY} · 5a177308
      unknown authored
      The optimizer takes different execution paths during EXPLAIN than SELECT,
      this fix relates only to EXPLAIN, hence no behavior changes.
      The test of sort keys for ORDER BY was prohibited from considering keys
      that were mentioned in IGNORE KEYS FOR ORDER BY. This led to two 
      inconsistencies: One was that IGNORE INDEX FOR GROUP BY and 
      IGNORE INDEX FOR ORDER BY gave apparently different EXPLAINs; the latter 
      erroneously claimed to do filesort. The second inconsistency 
      is that the test of sort keys is called twice, finding a sort key the first
      time but not the second time, leading to the mentioned filesort.
      
      Fixed by making the test of sort keys consider all enabled 
      keys on the table. This test rejects keys that are not covering, and for 
      covering keys the hint should be ignored anyway. 
      
      
      mysql-test/r/group_by.result:
        Bug#30665: Changed test result. The plan gets more efficient here. 
        The output is included in order to show that it is still correct.
      mysql-test/r/order_by.result:
        Bug#30665: Test result
      mysql-test/t/group_by.test:
        Bug#30665: Changed test case to show correctness of changed plan
      mysql-test/t/order_by.test:
        Bug#30665: Test case
      sql/sql_select.cc:
        Bug#30665: 
        - the fix: Give test_if_skip_sort_order all keys not the subset of non-disabled keys.
        - Added comment to test_if_skip_sort_order
      5a177308
  6. 27 Sep, 2007 10 commits
  7. 26 Sep, 2007 5 commits
    • unknown's avatar
      Merge gshchepa@bk-internal.mysql.com:/users/gshchepa/5.1-opt-31075 · 4f665896
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      
      4f665896
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.1-opt-29985 · fbe3a0d1
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.1-opt
      
      
      fbe3a0d1
    • unknown's avatar
      merge of the fix for bug 27802 & 27216 to 5.1-opt · bc25c6ca
      unknown authored
      
      mysql-test/r/view.result:
        merge of the fix for bug 27802 to 5.1
      sql/item_cmpfunc.h:
        merge of the fix for bug 27216 to 5.1
      sql/sql_insert.cc:
        merge of the fix for bug 27216 to 5.1
      sql/sql_lex.h:
        merge of the fix for bug 27802 to 5.1
      sql/sql_select.cc:
        merge of the fix for bug 27802 to 5.1
      sql/table.h:
        merge of the fix for bug 27802 to 5.1
      bc25c6ca
    • unknown's avatar
      merged bug 28702 5.0-opt->5.1-opt · c89bc705
      unknown authored
      
      mysql-test/r/view.result:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      sql/table.h:
        Auto merged
      c89bc705
    • unknown's avatar
      Fixed bug #31075. · 2dc837e6
      unknown authored
      The `SELECT col FROM t WHERE col NOT IN (col, ...) GROUP BY col'
      crashed in the range optimizer.
      
      The get_func_mm_tree function has been modified to check the
      Item_func_in::array field for the NULL value before using of that
      value.
      
      
      sql/opt_range.cc:
        Fixed bug #31075.
        The get_func_mm_tree function has been modified to check the
        Item_func_in::array field for the NULL value before using of that
        value.
      mysql-test/t/func_in.test:
        Added test case for bug #31075.
      mysql-test/r/func_in.result:
        Added test case for bug #31075.
      2dc837e6
  8. 24 Sep, 2007 4 commits
    • unknown's avatar
      Merge sunlight.local:/local_work/27216-bug-5.0-opt-mysql · e4cbbcf8
      unknown authored
      into  sunlight.local:/local_work/merge-5.1-opt-mysql
      
      
      libmysql/libmysql.c:
        Auto merged
      mysql-test/r/date_formats.result:
        Auto merged
      mysql-test/r/insert_select.result:
        Auto merged
      mysql-test/t/insert_select.test:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/protocol.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      mysql-test/r/type_datetime.result:
        Manually merged
      mysql-test/t/type_datetime.test:
        Manually merged
      sql/item_cmpfunc.cc:
        Manually merged
      sql/item_cmpfunc.h:
        Manually merged
      sql/sql_insert.cc:
        Manually merged
      e4cbbcf8
    • 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
    • unknown's avatar
      merging bug 28701 to 5.1-opt · c2c760bd
      unknown authored
      c2c760bd
    • unknown's avatar
      merge of bug 28701 5.0-opt -> 5.1-opt · ea1a4ae2
      unknown authored
      
      sql/sql_view.cc:
        Auto merged
      ea1a4ae2