1. 01 Aug, 2006 1 commit
  2. 31 Jul, 2006 3 commits
  3. 29 Jul, 2006 1 commit
  4. 27 Jul, 2006 3 commits
  5. 26 Jul, 2006 10 commits
  6. 25 Jul, 2006 9 commits
    • timour/tkatchaounov@lamia.home's avatar
      Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt · dd7ae38d
      timour/tkatchaounov@lamia.home authored
      into  lamia.home:/home/tkatchaounov/autopush/4.1-bug-20954
      dd7ae38d
    • timour/timka@lamia.home's avatar
      Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set · 86ae2f3b
      timour/timka@lamia.home 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.
      86ae2f3b
    • evgen@moonbone.local's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 0a84eb5f
      evgen@moonbone.local authored
      into  moonbone.local:/work/19862-bug-5.0-opt-mysql
      0a84eb5f
    • evgen@moonbone.local's avatar
      Fixed bug#19862: Sort with filesort by function evaluates function twice · 4ee2e07c
      evgen@moonbone.local authored
      When there is no index defined filesort is used to sort the result of a
      query. If there is a function in the select list and the result set should be
      ordered by it's value then this function will be evaluated twice. First time to
      get the value of the sort key and second time to send its value to a user.
      This happens because filesort when sorts a table remembers only values of its
      fields but not values of functions.
      All functions are affected. But taking into account that SP and UDF functions
      can be both expensive and non-deterministic a temporary table should be used 
      to store their results and then sort it to avoid twice SP evaluation and to 
      get a correct result.
      
      If an expression referenced in an ORDER clause contains a SP or UDF 
      function, force the use of a temporary table.
      
      A new Item_processor function called func_type_checker_processor is added
      to check whether the expression contains a function of a particular type.
      4ee2e07c
    • igor@olga.mysql.com's avatar
      Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 88e6b910
      igor@olga.mysql.com authored
      into  olga.mysql.com:/home/igor/mysql-5.0-opt
      88e6b910
    • gkodinov/kgeorge@macbook.gmz's avatar
      Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called · f5b0dd6a
      gkodinov/kgeorge@macbook.gmz authored
        When executing INSERT over a view with calculated columns it was assuming all
        elements of the fields collection are actually Item_field instances.
        This may not be true when inserting into a view and that view has columns that are 
        such expressions that allow updating (like setting a collation for example).
        Corrected to access field information through the filed_for_view_update() function and 
        retrieve correctly the field info even for "update-friendly" non-Item_field items.
      f5b0dd6a
    • gkodinov/kgeorge@rakia.(none)'s avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 9e9fb3e4
      gkodinov/kgeorge@rakia.(none) authored
      into  rakia.(none):/home/kgeorge/mysql/autopush/B16712-5.0-opt
      9e9fb3e4
    • gkodinov/kgeorge@macbook.gmz's avatar
      Bug#16712: group_concat returns odd srting insead of intended result · 9380bb83
      gkodinov/kgeorge@macbook.gmz authored
        when calculating GROUP_CONCAT all blob fields are transformed
        to varchar when making the temp table.
        However a varchar has at max 2 bytes for length. 
        This fix makes the conversion only for blobs whose max length 
        is below that limit. 
        Otherwise blob field is created by make_string_field() call.
      9380bb83
    • igor@olga.mysql.com's avatar
      Fixed bug #21231: wrong results for a simple query with a · 69856b29
      igor@olga.mysql.com authored
      a non-correlated single-row subquery over information schema.
      
      The function get_all_tables filling all information schema
      tables reset lex->sql_command to SQLCOM_SHOW_FIELDS. After
      this the function could evaluate partial conditions related to
      some columns. If these conditions contained a subquery over
      information schema it led to a wrong evaluation and a wrong 
      result set.
      This bug was already fixed in 5.1.
      This patch follows the way how it was done in 5.1 where
      the value of lex->sql_command is set to SQLCOM_SHOW_FIELDS
      in get_all_tables only for the calls of the function 
      open_normal_and_derived_tables and is restored after these
      calls.
      69856b29
  7. 22 Jul, 2006 9 commits
  8. 21 Jul, 2006 4 commits
    • sergefp@mysql.com's avatar
      Merge mysql.com:/home/psergey/mysql-4.1-opt · 964a4b5f
      sergefp@mysql.com authored
      into  mysql.com:/home/psergey/mysql-5.0-opt2
      964a4b5f
    • sergefp@mysql.com's avatar
      Add missing "DROP TABLE" clause · 59dc5e88
      sergefp@mysql.com authored
      59dc5e88
    • evgen@moonbone.local's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 85405574
      evgen@moonbone.local authored
      into  moonbone.local:/work/autopush/12185-bug-5.0-opt-mysql
      85405574
    • evgen@moonbone.local's avatar
      Fixed bug#12185: Data type aggregation may produce wrong result · c875b8eb
      evgen@moonbone.local authored
      The Item::tmp_table_field_from_field_type() function creates Field_datetime
      object instead of Field_timestamp object for timestamp field thus always
      changing data type is a tmp table is used.
      
      The Field_blob object constructor which is used in the 
      Item::tmp_table_field_from_field_type() is always setting packlength field of
      newly created blob to 4. This leads to changing fields data type for example
      from the blob to the longblob if a temporary table is used.
      
      The Item::make_string_field() function always converts Field_string objects 
      to Field_varstring objects. This leads to changing data type from the 
      char/binary to varchar/varbinary.
      
      Added appropriate Field_timestamp object constructor for using in the 
      Item::tmp_table_field_from_field_type() function.
      
      Added Field_blob object constructor which sets pack length according to
      max_length argument.
      
      The Item::tmp_table_field_from_field_type() function now creates
      Field_timestamp object for a timestamp field.
      
      The Item_type_holder::display_length() now returns correct NULL length NULL
      length. 
      
      The Item::make_string_field() function now doesn't change Field_string to
      Field_varstring in the case of Item_type_holder. 
      
      The Item::tmp_table_field_from_field_type() function now uses the Field_blob
      constructor which sets packlength according to max_length.
      c875b8eb