1. 21 Feb, 2007 2 commits
    • evgen@moonbone.local's avatar
      Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt · 76461a44
      evgen@moonbone.local authored
      into  moonbone.local:/mnt/gentoo64/work/23800-bug1-5.0-opt-mysql
      76461a44
    • evgen@moonbone.local's avatar
      Bug#23800: Outer fields in correlated subqueries is used in a temporary table · 9a233742
      evgen@moonbone.local authored
      created for sorting.
      
      Any outer reference in a subquery was represented by an Item_field object.
      If the outer select employs a temporary table all such fields should be
      replaced with fields from that temporary table in order to point to the 
      actual data. This replacement wasn't done and that resulted in a wrong
      subquery evaluation and a wrong result of the whole query.
      
      Now any outer field is represented by two objects - Item_field placed in the
      outer select and Item_outer_ref in the subquery. Item_field object is
      processed as a normal field and the reference to it is saved in the
      ref_pointer_array. Thus the Item_outer_ref is always references the correct
      field. The original field is substituted for a reference in the
      Item_field::fix_outer_field() function.
      
      New function called fix_inner_refs() is added to fix fields referenced from
      inner selects and to fix references (Item_ref objects) to these fields.
      
      The new Item_outer_ref class is a descendant of the Item_direct_ref class.
      It additionally stores a reference to the original field and designed to
      behave more like a field.
      9a233742
  2. 19 Feb, 2007 4 commits
    • gkodinov/kgeorge@rakia.gmz's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 96a868a7
      gkodinov/kgeorge@rakia.gmz authored
      into  rakia.gmz:/home/kgeorge/mysql/autopush/B19717-5.0-opt
      96a868a7
    • gkodinov/kgeorge@rakia.gmz's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 90a69255
      gkodinov/kgeorge@rakia.gmz authored
      into  rakia.gmz:/home/kgeorge/mysql/autopush/B19717-5.0-opt
      90a69255
    • gkodinov/kgeorge@rakia.gmz's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 8f52c5b2
      gkodinov/kgeorge@rakia.gmz authored
      into  rakia.gmz:/home/kgeorge/mysql/autopush/B25831-5.0-opt
      8f52c5b2
    • gkodinov/kgeorge@macbook.gmz's avatar
      Bug #25831: Deficiencies in INSERT ... SELECT ... field name resolving. · d17ad7b3
      gkodinov/kgeorge@macbook.gmz authored
       Several problems fixed: 
        1. There was a "catch-all" context initialization in setup_tables()
          that was causing the table that we insert into to be visible in the 
          SELECT part of an INSERT .. SELECT .. statement with no tables in
          its FROM clause. This was making sure all the under-initialized
          contexts in various parts of the code are not left uninitialized.
          Fixed by removing the "catch-all" statement and initializing the 
          context in the parser.
        2. Incomplete name resolution context when resolving the right-hand
          values in the ON DUPLICATE KEY UPDATE ... part of an INSERT ... SELECT ...
          caused columns from NATURAL JOIN/JOIN USING table references in the
          FROM clause of the select to be unavailable.
          Fixed by establishing a proper name resolution context.
        3. When setting up the special name resolution context for problem 2
          there was no check for cases where an aggregate function without a
          GROUP BY effectively takes the column from the SELECT part of an 
          INSERT ... SELECT unavailable for ON DUPLICATE KEY UPDATE.
          Fixed by checking for that condition when setting up the name 
          resolution context.
      d17ad7b3
  3. 16 Feb, 2007 5 commits
  4. 15 Feb, 2007 1 commit
  5. 14 Feb, 2007 1 commit
  6. 13 Feb, 2007 5 commits
  7. 12 Feb, 2007 16 commits
  8. 11 Feb, 2007 3 commits
  9. 09 Feb, 2007 3 commits
    • evgen@moonbone.local's avatar
      Bug#12122: The MERGE algorithm isn't applicable if the ORDER BY clause is · a2414463
      evgen@moonbone.local authored
      present.
      
      A view created with CREATE VIEW ... ORDER BY ... cannot be resolved with
      the MERGE algorithm, even when no other part of the CREATE VIEW statement
      would require the view to be resolved using the TEMPTABLE algorithm.
      
      The check for presence of the ORDER BY clause in the underlying select is 
      removed from the st_lex::can_be_merged() function.
      The ORDER BY list of the underlying select is appended to the ORDER BY list 
      a2414463
    • igor@olga.mysql.com's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · 3fe9de28
      igor@olga.mysql.com authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26017
      3fe9de28
    • igor@olga.mysql.com's avatar
      Fixed bug #26017. · 951fe3ca
      igor@olga.mysql.com authored
      Objects of the class Item_equal contain an auxiliary member
      eval_item of the type cmp_item that is used only for direct 
      evaluation of multiple equalities. Currently a multiple equality
      is evaluated directly only in the cases when the equality holds
      at most for one row in the result set.
      The compare collation of eval_item was determined incorectly.
      It could lead to returning incorrect results for some queries.
      951fe3ca