An error occurred fetching the project authors.
  1. 06 Feb, 2007 1 commit
    • unknown's avatar
      Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison · c35ceeca
      unknown authored
       Ignoring error codes from type conversion allows default (wrong) values to
       go unnoticed in the formation of index search conditions.
       Fixed by correctly checking for conversion errors.
      
      
      mysql-test/r/select.result:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - test case
      mysql-test/t/select.test:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - test case
      sql/field.h:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - don't ignore coversion errors
      sql/field_conv.cc:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - don't ignore coversion errors
      sql/item.cc:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - don't ignore coversion errors
      c35ceeca
  2. 01 Feb, 2007 1 commit
    • unknown's avatar
      Fixed bug #25407. · c15b2e41
      unknown authored
      The bug could cause choosing a sub-optimal execution plan for 
      a single-table query if a unique index with many null keys were 
      defined for the table. 
      It happened because the code of the check_quick_keys function 
      made an assumption that any key may occur in an unique index 
      only once. Yet this is not true for keys with nulls that may 
      have multiple occurrences in the index.
      
      
      mysql-test/r/null_key.result:
        Fixed bug #25407
        Adjusted result after the fix.
      mysql-test/r/select.result:
        Added a test case for bug #25407.
      mysql-test/t/select.test:
        Added a test case for bug #25407.
      c15b2e41
  3. 19 Jan, 2007 1 commit
    • unknown's avatar
      Bug#25172: Not checked buffer size leads to a server crash. · 5effa05d
      unknown authored
      After fix for bug#21798 JOIN stores the pointer to the buffer for sorting
      fields. It is used while sorting for grouping and for ordering. If ORDER BY
      clause has more elements then the GROUP BY clause then a memory overrun occurs.
      
      Now the length of the ORDER BY list is always passed to the 
      make_unireg_sortorder() function and it allocates buffer big enough to be
      used for bigger list.
      
      
      sql/sql_delete.cc:
        Bug#25172: Not checked buffer size leads to a server crash.
        Length parameter is initialized to 0 for the make_unireg_sortorder() function.
      sql/sql_select.cc:
        Bug#25172: Not checked buffer size leads to a server crash.
        Now the length of the ORDER BY list is always passed to the 
        make_unireg_sortorder() function and it allocates buffer big enough to be
        used for bigger list.
      sql/sql_table.cc:
        Bug#25172: Not checked buffer size leads to a server crash.
        Length parameter is initialized to 0 for the make_unireg_sortorder() function.
      sql/sql_update.cc:
        Bug#25172: Not checked buffer size leads to a server crash.
        Length parameter is initialized to 0 for the make_unireg_sortorder() function.
      mysql-test/r/select.result:
        Added a test case for bug#25172: Not checked buffer size leads to a server crash.
      mysql-test/t/select.test:
        Added a test case for bug#25172: Not checked buffer size leads to a server crash.
      5effa05d
  4. 18 Jan, 2007 1 commit
  5. 03 Jan, 2007 1 commit
    • unknown's avatar
      Bug#6298 (LIMIT #, -1 no longer works to set start with no end limit) · 5001bd06
      unknown authored
      With MySQL 3.23 and 4.0, the syntax 'LIMIT N, -1' is accepted, and returns
      all the rows located after row N. This behavior, however, is not the
      intended result, and defeats the purpose of LIMIT, which is to constrain
      the size of a result set.
      
      With MySQL 4.1 and later, this construct is correctly detected as a syntax
      error.
      
      This fix does not change the production code, and only adds a new test case
      to improve test coverage in this area, to enforce in the test suite the
      intended behavior.
      
      
      mysql-test/r/select.result:
        Enforce that LIMIT N, -1 is illegal.
      mysql-test/t/select.test:
        Enforce that LIMIT N, -1 is illegal.
      5001bd06
  6. 06 Dec, 2006 1 commit
    • unknown's avatar
      Fix for bug #22533: Traditional: Too-long bit value not rejected. · 0ce02f6d
      unknown authored
      Problem: storing >=8 byte hexadecimal values we don't check data.
      Fix: check if the data fits the {u}longlong range.
      
      
      mysql-test/r/select.result:
        Fix for bug #22533: Traditional: Too-long bit value not rejected.
          - test result.
      mysql-test/t/range.test:
        Fix for bug #22533: Traditional: Too-long bit value not rejected.
          - adjusted.
      mysql-test/t/select.test:
        Fix for bug #22533: Traditional: Too-long bit value not rejected.
          - test case.
      sql/item.cc:
        Fix for bug #22533: Traditional: Too-long bit value not rejected.
          - limit storing value to {U}LONGLONG_MAX in numeric context.
      0ce02f6d
  7. 17 Oct, 2006 1 commit
  8. 16 Oct, 2006 2 commits
    • unknown's avatar
      Fixed bug #19579: at range analysis optimizer did not take into · 6101fd25
      unknown authored
      account predicates that become sargable after reading const tables.
      In some cases this resulted in choosing non-optimal execution plans.
      Now info of such potentially saragable predicates is saved in
      an array and after reading const tables we check whether this
      predicates has become saragable.
      
      
      
      mysql-test/r/select.result:
        Added a test case for bug #19579.
      mysql-test/t/select.test:
        Added a test case for bug #19579.
      sql/item_cmpfunc.cc:
        Fixed bug #19579: at range analysis optimizer did not take into 
        account predicates that become sargable after reading const tables.
        Added a counter of between predicates.
      sql/sql_base.cc:
        Fixed bug #19579: at range analysis optimizer did not take into 
        account predicates that become sargable after reading const tables.
        Added a counter of between predicates.
      sql/sql_lex.cc:
        Fixed bug #19579: at range analysis optimizer did not take into 
        account predicates that become sargable after reading const tables.
        Added a counter of between predicates.
      sql/sql_lex.h:
        Fixed bug #19579: at range analysis optimizer did not take into 
        account predicates that become sargable after reading const tables.
        Added a counter of between predicates.
      sql/sql_select.cc:
        Fixed bug #19579: at range analysis optimizer did not take into 
        account predicates that become sargable after reading const tables.
        Now info of such potentially saragable predicates is saved in
        an array and after reading const tables we check whether this
        predicates has become saragable.
      6101fd25
    • unknown's avatar
      Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on · ffc1facc
      unknown authored
                   strings
      MySQL is setting the flag HA_END_SPACE_KEYS for all the keys that reference
      text or varchar columns with collation different than binary.
      This was done to handle correctly the situation where a lookup on such a key
      may return more than 1 row because of the presence of many rows that differ
      only by the amount of trailing space in the table's string column.
      Inserting such values however appears to violate the unique checks on 
      INSERT/UPDATE. Thus that flag must not be set as it will prevent the optimizer
      from choosing a faster access method.
      This fix removes the setting of the HA_END_SPACE_KEYS flag.
      
      
      include/my_base.h:
        Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
                     strings
         - disabled HA_END_SPACE_KEY as it's no longer needed
      mysql-test/r/func_str.result:
        Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
                     strings
         - fixed explain in an existing case
      mysql-test/r/merge.result:
        Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
                     strings
         - fixed explain in an existing case
      mysql-test/r/select.result:
        Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
                     strings
         - test case
      mysql-test/r/subselect.result:
        Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
                     strings
         - fixed explain in an existing case
      mysql-test/t/select.test:
        Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
                     strings
         - test case
      ffc1facc
  9. 29 Sep, 2006 1 commit
    • unknown's avatar
      Fixed bug #22753. · af2ba777
      unknown authored
      After the patch for big 21698 equality propagation stopped
      working for BETWEEN and IN predicates with STRING arguments.
      This changeset completes the solution of the above patch.
      
      
      mysql-test/r/select.result:
        Added a test case for bug #22735.
      mysql-test/t/select.test:
        Added a test case for bug #22735.
      sql/item_cmpfunc.h:
        Fixed bug #22753.
        After the patch for big 21698 equality propagation stopped
        working for BETWEEN and IN predicates with STRING arguments.
        This changeset completes the solution of the above patch.
        
        Added an implementation of the subst_argument_checker method
        for Item_func_opt_neg (the direct ancestor of Item_func_between
        and Item_func_in) which allows equality propagation for
        BETWEEN and IN predicates.
      af2ba777
  10. 28 Sep, 2006 1 commit
    • unknown's avatar
      Fixed bug#20503: Server crash due to the ORDER clause not taken into account · 4fd71723
      unknown authored
      while space allocation
      
      Under some circumstances DISTINCT clause can be converted to grouping.
      In such cases grouping is performed by all items in the select list.
      If an ORDER clause is present then items from it is prepended to group list.
      But the case with ORDER wasn't taken into account when allocating the
      array for sum functions. This leads to memory corruption and crash.
      
      The JOIN::alloc_func_list() function now allocates additional space if there
      is an ORDER by clause is specified and DISTINCT -> GROUP BY optimization is
      possible.
      
      
      mysql-test/t/select.test:
        Added the test case for bug#20503: Server crash due to the ORDER clause not taken into account while space allocation
      mysql-test/r/select.result:
        Added the test case for bug#20503: Server crash due to the ORDER clause not taken into account while space allocation
      sql/sql_select.cc:
        Fixed bug#20503: Server crash due to the ORDER clause not taken into account
        while space allocation
        The JOIN::alloc_func_list() function now allocates additional space if there
        is an ORDER by clause is specified and DISTINCT -> GROUP BY optimization is
        possible.
      4fd71723
  11. 25 Aug, 2006 1 commit
    • unknown's avatar
      Fixed bug #21390: wrong estimate of rows after elimination of · f121994d
      unknown authored
      const tables. This resulted in choosing extremely inefficient
      execution plans in same cases when distribution of data in
      joined were skewed (see the customer test case for the bug).
      
      
      
      mysql-test/r/select.result:
        Added a test case for bug #21390: wrong estimate of rows
        after elimination of const tables.
        Includded a test case that checks the code added by the patch
        that handles outer joins with no matches after substitution of
        a const table in an efficient way.
      mysql-test/t/select.test:
        Added a test case for bug #21390: wrong estimate of rows
        after elimination of const tables.
        Included a test case that checks the code added by the patch
        that handles outer joins with no matches after substitution of
        a const table in an efficient way.
      sql/sql_select.cc:
        Fixed bug #21390: wrong estimate of rows after elimination of
        const tables. This resulted in choosing extremely inefficient
        execution plans in same cases when distribution of data in
        joined were skewed (see the customer test case for the bug).
        Also added the code to handle outer joins with no matches after
        substitution of a const table in an efficient way. 
        Corrected calculation of the null rejecting key conditions.
      f121994d
  12. 31 Jul, 2006 1 commit
  13. 26 Jul, 2006 2 commits
    • unknown's avatar
      8c92143b
    • unknown's avatar
      Bug #21019: First result of SELECT COUNT(*) different than consecutive runs · 5ca1ee5e
      unknown authored
       When optimizing conditions like 'a = <some_val> OR a IS NULL' so that they're
       united into a single condition on the key and checked together the server must 
       check which value is the NULL value in a correct way : not only using ->is_null 
       but also check if the expression doesn't depend on any tables referenced in the 
       current statement. 
       This additional check must be performed because that optimization takes place 
       before the actual execution of the statement, so if the field was initialized 
       to NULL from a previous statement the optimization would be applied incorrectly.
      
      
      mysql-test/r/select.result:
        Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
         - test case
      mysql-test/t/select.test:
        Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
         - test case. 
           Note that ALTER TABLE is important here : it happens to
           leave the Field instance for t1.b set to NULL, witch is vital for
           demonstrating the problem fixed by this changeset.
      sql/sql_select.cc:
        Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
         - check whether a value is null taking into account its table dependency.
      5ca1ee5e
  14. 25 Jul, 2006 1 commit
    • unknown's avatar
      Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set · 585b5bbc
      unknown authored
      The problem was in that opt_sum_query() replaced MIN/MAX functions
      with the corresponding constant found in a key, but due to imprecise
      representation of float numbers, when evaluating the where clause,
      this comparison failed.
      
      When MIN/MAX optimization detects that all tables can be removed,
      also remove all conjuncts in a where clause that refer to these
      tables. As a result of this fix, these conditions are not evaluated
      twice, and in the case of float number comparisons we do not discard
      result rows due to imprecise float representation.
      
      As a side-effect this fix also corrects an unnoticed problem in
      bug 12882.
      
      
      mysql-test/r/func_group.result:
        BUG#20954 - test result adjustment.
        Adjusted the test result of bug 12882 which was not preperly fixed.
        The current patch corrects the problem that was fully corrected by the
        patch for 12882.
        
        The problem was that opt_sum_query() indicated that the optimizer may
        remove all tables because all MIN/MAX/COUNT functions are constants,
        but this lead to an empty result instead of NULL because the WHERE
        clause was still evaluated.
        
        The current fix removes all conjuncts in the where clause that
        reference the removed tables, and thus corrects the problem.
      mysql-test/r/select.result:
        BUG#20954 - added test
      mysql-test/r/subselect.result:
        BUG#20954 - test result adjustment.
        
        The fix removes those conditions in a where clause that refer to
        tables optimized away by MIN/MAX optimization (opt_sum_query()).
      mysql-test/t/select.test:
        BUG#20954 - added test
      sql/sql_select.cc:
        Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set
        
        When MIN/MAX optimization detects that all tables can be removed,
        also remove all conjuncts in a where clause that refer to these
        tables. As a result of this fix, these conditions are not evaluated
        twice, and in the case of float number comparisons we do not discard
        result rows due to imprecise float representation.
        
        As a side-effect this fix also corrects an unnoticed problem in
        bug 12882.
      585b5bbc
  15. 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
  16. 17 Jul, 2006 1 commit
    • unknown's avatar
      select.result, select.test: · 14d72663
      unknown authored
        Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
      
      
      mysql-test/t/select.test:
        Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
      mysql-test/r/select.result:
        Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
      14d72663
  17. 15 Jul, 2006 1 commit
    • unknown's avatar
      Fixed bug#10977: No warning issued if a column name is truncated · 1c96f2d7
      unknown authored
      When an alias is set to a column leading spaces are removed from the alias.
      But when this is done on aliases set by user this can lead to confusion.
      
      Now Item::set_name() method issues the warning if leading spaces were removed
      from an alias set by user.
      
      New warning message is added.
      
      
      mysql-test/t/select.test:
        Added test case for bug#10977:No warning issued if a column name is truncated.
      mysql-test/r/select.result:
        Added test case for bug#10977:No warning issued if a column name is truncated.
      sql/sql_yacc.yy:
        Fixed bug#10977: No warning issued if a column name is truncated
        The is_autogenerated_name flag is set before set_name() method call.
      sql/item.cc:
        Fixed bug#10977: No warning issued if a column name is truncated
        Now Item::set_name() method issues the warning if leading spaces were removed
        from an alias set by user.
      1c96f2d7
  18. 06 Jul, 2006 1 commit
    • unknown's avatar
      Bug #20569 Garbage in DECIMAL results from some mathematical functions · 8e354677
      unknown authored
        Adding decimal "digits" in multiplication resulted in signed overflow and
      producing wrong results.
      
        Fixed by using large enough buffers and intermediary result types :
      dec2 (currently longlong) to hold result of adding decimal "digits" 
      (currently int32). 
      
      
      mysql-test/r/select.result:
        Bug #20569 Garbage in DECIMAL results from some mathematical functions
          * test suite for the bug
      mysql-test/t/select.test:
        Bug #20569 Garbage in DECIMAL results from some mathematical functions
          * test suite for the bug
      strings/decimal.c:
        Bug #20569 Garbage in DECIMAL results from some mathematical functions
          * fixed the overflow in adding decimal "digits"
      8e354677
  19. 20 Jun, 2006 2 commits
    • unknown's avatar
      field.cc, field.h: · 406a7ba9
      unknown authored
        Additional fix for #16377 for bigendian platforms
      sql_select.cc, select.result, select.test:
        After merge fix
      
      
      mysql-test/t/select.test:
        After merge fix
      mysql-test/r/select.result:
        After merge fix
      sql/sql_select.cc:
        After merge fix
      sql/field.h:
        Additional fix for #16377 for bigendian platforms
      sql/field.cc:
        Additional fix for #16377 for bigendian platforms
      406a7ba9
    • unknown's avatar
      select.result: · 3e7d68b1
      unknown authored
        Added test case for bug#18759 Incorrect string to numeric conversion.  
      select.test:
        Added test case for bug#18759 Incorrect string to numeric conversion.
      item_cmpfunc.cc:
        Cleanup after fix for bug#18360 removal
      
      
      sql/item_cmpfunc.cc:
        Cleanup after fix for bug#18360 removal
      mysql-test/t/select.test:
        Added test case for bug#18759 Incorrect string to numeric conversion.
      mysql-test/r/select.result:
        Added test case for bug#18759 Incorrect string to numeric conversion.
      3e7d68b1
  20. 16 Jun, 2006 1 commit
    • unknown's avatar
      select.result: · 60d55cc5
      unknown authored
        After merge fix
      
      
      mysql-test/r/select.result:
        After merge fix
      60d55cc5
  21. 14 Jun, 2006 1 commit
    • unknown's avatar
      Bug #18895: BIT values cause joins to fail · 89ce81ce
      unknown authored
      The Field::eq() considered instances of Field_bit that differ only in 
      bit_ptr/bit_ofs equal. This caused equality conditions optimization 
      (build_equal_items_for_cond()) to make bad field substitutions that result
      in wrong predicates. 
      Field_bit requires an overloaded eq() function that checks the bit_ptr/bit_ofs
      in addition to Field::eq().
      
      
      mysql-test/r/select.result:
        Bug #18895: BIT values cause joins to fail
        
        - test case
      mysql-test/t/select.test:
        Bug #18895: BIT values cause joins to fail
        
        - test case
      sql/field.h:
        Bug #18895: BIT values cause joins to fail
        
        - eq() method overloaded for Field_bit
      89ce81ce
  22. 02 Jun, 2006 3 commits
  23. 01 Jun, 2006 2 commits
  24. 30 May, 2006 1 commit
    • unknown's avatar
      Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX · a2993441
      unknown authored
      refers to a column name.
      
      
      mysql-test/r/select.result:
        Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
        refers to a column name.
        Added a new test case.
      mysql-test/t/select.test:
        Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
        refers to a column name.
        Added a new test case.
      sql/share/czech/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/danish/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/dutch/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/english/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/estonian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/french/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/german/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/greek/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.\
      sql/share/hungarian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/italian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/japanese-sjis/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.\
      sql/share/japanese/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/korean/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/norwegian-ny/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/norwegian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/polish/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/portuguese/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/romanian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/russian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/serbian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/slovak/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/spanish/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/swedish/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/ukrainian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      a2993441
  25. 28 May, 2006 1 commit
    • unknown's avatar
      Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX · 42104b2e
      unknown authored
      refers to a column name.
      Added a new error message ER_INDEX_DOES_NOT_EXIST.
      
      
      include/mysqld_error.h:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      include/sql_state.h:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      mysql-test/r/explain.result:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      mysql-test/r/key_cache.result:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      mysql-test/r/preload.result:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      mysql-test/r/select.result:
        Added a test case for bug #17873.
      mysql-test/t/explain.test:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      mysql-test/t/select.test:
        Added a test case for bug #17873.
      sql/share/czech/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/danish/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/dutch/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/english/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/estonian/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/french/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/german/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/greek/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/hungarian/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/italian/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/japanese-sjis/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/japanese/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/korean/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/norwegian-ny/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/norwegian/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/polish/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/portuguese/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/romanian/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/russian/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/serbian/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/slovak/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/spanish/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/swedish/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      sql/share/ukrainian/errmsg.txt:
        Fixed bug #17873.
        Added a new error message ER_INDEX_DOES_NOT_EXIST.
      42104b2e
  26. 12 May, 2006 1 commit
    • unknown's avatar
      Added a test case for bug #18940:in 5.0 the optimizer chose · 5c6d923f
      unknown authored
      a worse execution plan than in 4.1 for some queries.
      It happened due the fact that at some conditions the 
      optimizer always preferred range or full index scan access
      methods to lookup access methods even when the latter were much
      cheaper. 
      The problem was not observed in 4.1 for the reported query
      because the WHERE condition was not of a form that could
      cause the problem.
      Equality propagation introduced on 5.0 added an extra 
      predicate and changed the WHERE condition. The new condition
      provoked the optimizer to make a bad choice.
      
      The problem was fixed by the patch for bug 17379.
      
      
      mysql-test/r/select.result:
        Added a test case for bug #18940.
        The problem was fixed by the patch for bug 17379.
      mysql-test/t/select.test:
        Added a test case for bug #18940.
        The problem was fixed by the patch for bug 17379.
      5c6d923f
  27. 10 May, 2006 1 commit
    • unknown's avatar
      BUG#17379 Wrong reuse of E(#rows(range)) as E(#rows(ref(const))): · 3fa6432b
      unknown authored
      Re-work best_access_path() and find_best() to reuse E(#rows(range access)) as
      E(#rows(ref[_or_null](const) access) only when it is appropriate.
      [This is the final cumulative patch]
      
      
      mysql-test/r/select.result:
        BUG#17379: Testcase
      mysql-test/r/subselect.result:
        BUG#17379: Updated test results
      mysql-test/t/select.test:
        BUG#17379: Testcase
      sql/opt_range.cc:
        BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
        Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
      sql/sql_select.cc:
        BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
        Re-work best_access_path() to reuse E(#rows(range access)) as
        E(#rows(ref[_or_null](const) access) only when it is appropriate.
      sql/table.h:
        BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
        Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
      3fa6432b
  28. 04 May, 2006 1 commit
  29. 01 Apr, 2006 2 commits
    • unknown's avatar
      Added a test case for bug #16504. · f0bfea2b
      unknown authored
      Results changed after the bug fix.
      
      
      f0bfea2b
    • unknown's avatar
      Fixed bug #16504. · 5ef6e903
      unknown authored
      Multiple equalities were not adjusted after reading constant tables.
      It resulted in neglecting good index based methods that could be
      used to access of other tables.
      
      
      mysql-test/r/having.result:
        Adjusted a test case results after fix for bug #16504.
      mysql-test/r/select.result:
        Added a test case for bug #16504.
      mysql-test/r/subselect.result:
        Adjusted a test case results after fix for bug #16504.
      mysql-test/r/varbinary.result:
        Adjusted a test case results after fix for bug #16504.
      mysql-test/t/select.test:
        Added a test case for bug #16504.
      sql/item.cc:
        Fixed bug #16504.
        An Item_equal object may contain only a constant member.
        It may happen after reading constant tables.
      sql/item_cmpfunc.cc:
        Fixed bug #16504.
        Added method Item_equal::check_const that check appearance of new 
        constant items in a multiple equality.
      sql/item_cmpfunc.h:
        Fixed bug #16504.
        Added method Item_equal::check_const that check appearance of new 
        constant items in a multiple equality.
      sql/sql_select.cc:
        Fixed bug #16504.
        Adjusted multiple equalities after reading constant tables.
        Fixed a few typo in comments.
      5ef6e903
  30. 11 Jan, 2006 3 commits
    • unknown's avatar
      Fixed bug #15538: unchecked table absence caused server crash. · 4e2e0c6d
      unknown authored
      Absence of table in left part of LEFT/RIGHT join wasn't checked before
      name resolution which resulted in NULL dereferencing and server crash.
      
      Modified rules: 
      "table_ref LEFT opt_outer JOIN_SYM table_ref" and "table_ref RIGHT opt_outer 
      JOIN_SYM table_ref"
      NULL check is moved before push_new_name_resolution_context()
      
      
      sql/sql_yacc.yy:
        Fixed bug #15538: unchecked table absence caused server crash.
        Modified rules:
        "table_ref LEFT opt_outer JOIN_SYM table_ref" and "table_ref RIGHT opt_outer 
        JOIN_SYM table_ref"
        NULL check is moved before push_new_name_resolution_context()
      mysql-test/r/select.result:
        Added test case for bug #15538: unchecked table absence caused server crash.
      mysql-test/t/select.test:
        Added test case for bug #15538: unchecked table absence caused server crash.
      4e2e0c6d
    • unknown's avatar
      Fixed bug #15347: Wrong result of subselect when records cache and set · ddcc6d7b
      unknown authored
      functions are involved.
      
      When subselect is a join with set functions and no record have been found in
      it, end_send_group() sets null_row for all tables in order aggregate functions 
      to calculate their values correctly. Normally this null_row flag is cleared for 
      each table in sub_select(), but flush_cached_records() doesn't do so.
      Due to this all fields from the table processed by flush_cached_records() are 
      always evaluated as nulls and whole select produces wrong result.
      
      flush_cached_records() now clears null_row flag at the very beginning.
      
      
      mysql-test/t/select.test:
        Added test case for bug #15347: Wrong result of subselect when records cache
        and set functions are involved
      mysql-test/r/select.result:
        Added test case for bug #15347: Wrong result of subselect when records cache
        and set functions are involved
      sql/sql_select.cc:
        Fixed bug #15347: Wrong result of subselect when records cache and set functions are involved
        flush_cached_records() now clears null_row flag at the very beginning.
      ddcc6d7b
    • unknown's avatar
      Fixed bug #15633: Evaluation of Item_equal for non-const table caused wrong · 593bed0d
      unknown authored
      select result
      
      Item equal objects are employed only at the optimize phase. Usually they are not
      supposed to be evaluated.  Yet in some cases we call the method val_int() for
      them. Here we have to take care of restricting the predicate such an object
      represents f1=f2= ...=fn to the projection of known fields fi1=...=fik.
      
      Added a check for field's table being const in Item_equal::val_int().
      If the field's table is not const val_int() just skips that field when
      evaluating Item_equal.
      
      
      mysql-test/t/select.test:
        Added test case for bug #15633: Evaluation of Item_equal for non-const table caused wrong select result
      mysql-test/r/select.result:
        Added test case for bug #15633: Evaluation of Item_equal for non-const table caused wrong select result
      mysql-test/r/func_group.result:
        Corrected test result for bug #12882 after fix for bug#15633
      sql/item_cmpfunc.h:
        Fixed bug #15633: Evaluation of Item_equal for non-const table caused wrong select result
        Added comment about fields from non-const tables in class description.
      sql/item_cmpfunc.cc:
        Fixed bug #15633: Evaluation of Item_equal for non-const table caused wrong select result
        Added check for field's table being const in Item_equal::val_int().
      593bed0d
  31. 09 Dec, 2005 1 commit
    • unknown's avatar
      Fix bug #15268 Unchecked null value caused server crash · cb06e0c1
      unknown authored
      cmp_item_sort_string::cmp() wasn't checking values_res variable for null.
      Later called function was dereferenced it and crashed server.
      
      Added null check to cmp_item_sort_string::cmp().
      
      
      
      sql/item_cmpfunc.h:
        Fix bug#15268  Unchecked null value caused server crash
        Added null check to cmp_item_sort_string::cmp().
      mysql-test/t/select.test:
        Test case for bug#15268 Unchecked null value caused server crash
      mysql-test/r/select.result:
        Test case for bug#15268 Unchecked null value caused server crash
      cb06e0c1