1. 09 Mar, 2007 1 commit
    • igor@olga.mysql.com's avatar
      Fixed bug #26661: crash when order by clause in a union · 96cfd5ab
      igor@olga.mysql.com authored
      construct references invalid name.
      Derived tables currently cannot use outer references.
      Thus there is no outer context for them.
      The 4.1 code takes this fact into account while the 
      Item_field::fix_outer_field code of 5.0 lost the check that blocks
      any attempts to resolve names in outer context for derived tables.
      96cfd5ab
  2. 07 Mar, 2007 3 commits
  3. 06 Mar, 2007 3 commits
  4. 05 Mar, 2007 2 commits
    • evgen@moonbone.local's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt · f4823792
      evgen@moonbone.local authored
      into  moonbone.local:/mnt/gentoo64/work/clean-5.0-opt-mysql
      f4823792
    • igor@olga.mysql.com's avatar
      Fixed bug #26560. · 08efa4e0
      igor@olga.mysql.com authored
      The flag alias_name_used was not set on for the outer references
      in subqueries. It resulted in replacement of any outer reference
      resolved against an alias for a full field name when the frm 
      representation of a view with a subquery was generated. 
      If the subquery and the outer query referenced the same table in
      their from lists this replacement effectively changed the meaning
      of the view and led to wrong results for selects from this view. 
      
      Modified several functions to ensure setting the right value of
      the alias_name_used flag for outer references resolved against
      aliases.
       
      08efa4e0
  5. 03 Mar, 2007 1 commit
    • evgen@sunlight.local's avatar
      Bug#25126: Wrongly resolved field leads to a crash. · 629c1231
      evgen@sunlight.local authored
      When the ORDER BY clause gets fixed it's allowed to search in the current
      item_list in order to find aliased fields and expressions. This is ok for a
      SELECT but wrong for an UPDATE statement. If the ORDER BY clause will
      contain a non-existing field which is mentioned in the UPDATE set list
      then the server will crash due to using of non-existing (0x0) field.
      
      When an Item_field is getting fixed it's allowed to search item list for
      aliased expressions and fields only for selects.
      629c1231
  6. 02 Mar, 2007 8 commits
  7. 01 Mar, 2007 3 commits
  8. 27 Feb, 2007 1 commit
  9. 26 Feb, 2007 3 commits
  10. 25 Feb, 2007 1 commit
    • evgen@sunlight.local's avatar
      item.h: · e91347dd
      evgen@sunlight.local authored
        Post fix for bug#23800.
        Copy the table name of an Item_outer_ref to the conventional memory.
      e91347dd
  11. 24 Feb, 2007 2 commits
    • evgen@moonbone.local's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · b617c369
      evgen@moonbone.local authored
      into  moonbone.local:/mnt/gentoo64/work/23800-bug1-5.0-opt-mysql
      b617c369
    • evgen@moonbone.local's avatar
      item.cc: · 47ffb61f
      evgen@moonbone.local authored
        Post fix for bug#23800.
        The Item_field constructor now increases the select_n_where_fields counter.
      sql_yacc.yy:
        Post fix for bug#23800.
        Take into account fields that might be added by subselects.
      sql_lex.h:
        Post fix for bug#23800.
        Added the select_n_where_fields variable to the st_select_lex class.
      sql_lex.cc:
        Post fix for bug#23800.
        Initialization of the select_n_where_fields variable.
      47ffb61f
  12. 22 Feb, 2007 8 commits
  13. 21 Feb, 2007 4 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
    • monty@mysql.com/hasky.mysql.fi's avatar
      Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0 · c55337e8
      monty@mysql.com/hasky.mysql.fi authored
      into  mysql.com:/home/my/mysql-5.0
      c55337e8
    • monty@mysql.com/narttu.mysql.fi's avatar
      After merge fixes · 6946fa68
      monty@mysql.com/narttu.mysql.fi authored
      This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
      6946fa68