1. 31 Jul, 2006 1 commit
    • unknown's avatar
      Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM · a04713a4
      unknown authored
        When executing ALTER TABLE all the attributes of the view were overwritten.
        This is contrary to the user's expectations.
        So some of the view attributes are preserved now : namely security and 
        algorithm. This means that if they are not specified in ALTER VIEW
        their values are preserved from CREATE VIEW instead of being defaulted.
      
      
      mysql-test/r/view.result:
        Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
         - test suite
      mysql-test/t/view.test:
        Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
         - test suite
      sql/sql_lex.h:
        Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
         - must make create_view_suid a tristate : on/off/unspecified
      sql/sql_view.cc:
        Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
         - open the view to get it's attributes and put then as defaults 
           for ALTER VIEW
      sql/sql_yacc.yy:
        Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
         - must make create_view_suid a tristate : on/off/unspecified
      sql/table.h:
        Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
         - must make create_view_suid a tristate : on/off/unspecified
      a04713a4
  2. 25 Jul, 2006 2 commits
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 8b34130a
      unknown authored
      into  rakia.(none):/home/kgeorge/mysql/autopush/B16712-5.0-opt
      
      
      sql/item_sum.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      8b34130a
    • unknown's avatar
      Bug#16712: group_concat returns odd srting insead of intended result · 51aca02d
      unknown 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.
      
      
      mysql-test/r/func_gconcat.result:
        Bug#16712: group_concat returns odd srting insead of intended result
          * testsuite for the bug
      mysql-test/t/func_gconcat.test:
        Bug#16712: group_concat returns odd srting insead of intended result
          * testsuite for the bug
      sql/item_sum.cc:
        Bug#16712: group_concat returns odd srting insead of intended result
          * force blob->varchar conversion for small enough blobs only
      sql/sql_select.cc:
        Bug#16712: group_concat returns odd srting insead of intended result
          * force blob->varchar conversion for small enough blobs only
      51aca02d
  3. 22 Jul, 2006 9 commits
  4. 21 Jul, 2006 10 commits
    • unknown's avatar
      Merge mysql.com:/home/psergey/mysql-4.1-opt · a1f2ed15
      unknown authored
      into  mysql.com:/home/psergey/mysql-5.0-opt2
      
      
      mysql-test/r/subselect.result:
        Manual merge
      mysql-test/t/subselect.test:
        Manual merge
      a1f2ed15
    • unknown's avatar
      Add missing "DROP TABLE" clause · dae1cb0e
      unknown authored
      dae1cb0e
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 147da135
      unknown authored
      into  moonbone.local:/work/autopush/12185-bug-5.0-opt-mysql
      
      
      mysql-test/r/create.result:
        Auto merged
      mysql-test/t/innodb.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/field.h:
        Auto merged
      sql/item.cc:
        Auto merged
      mysql-test/r/union.result:
        SCCS merged
      mysql-test/t/union.test:
        SCCS merged
      147da135
    • unknown's avatar
      Fixed bug#12185: Data type aggregation may produce wrong result · a05809b6
      unknown 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.
      
      
      mysql-test/t/union.test:
        Added test case for bug#12185: Data type aggregation may produce wrong result
        Corrected test case after fix for bug#12185
      mysql-test/t/innodb.test:
        Corrected test case after fix for bug#12185
      mysql-test/r/union.result:
        Added test case for bug#12185: Data type aggregation may produce wrong result
         Corrected test case after fix for bug#12185
      mysql-test/r/innodb.result:
        Corrected test case after fix for bug#12185
      mysql-test/r/create.result:
        Corrected the test case after fixing bug#12185
      sql/field.h:
        Fixed bug#12185: Data type aggregation may produce wrong result
        Added Field_blob object constructor which sets packlength according to
        max_length argument.
      sql/item.cc:
        Fixed bug#12185: Data type aggregation may produce wrong result
        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 creates
        Field_timestamp object for a timestamp field.
        The Item::tmp_table_field_from_field_type() function now uses the Field_blob
        constructor which sets packlength according to max_length.
        The Item_type_holder::display_length() now returns correct NULL length NULL
        length.
      sql/field.cc:
        Fixed bug#12185: Data type aggregation may produce wrong result
        Added appropriate Field_timestamp object constructor for using in the 
        Item::tmp_table_field_from_field_type() function.
      a05809b6
    • unknown's avatar
      Merge mysql.com:/home/psergey/mysql-4.1-opt · ecc6e990
      unknown authored
      into  mysql.com:/home/psergey/mysql-5.0-opt
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/item_subselect.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      mysql-test/r/subselect.result:
        Manual merge
      mysql-test/t/subselect.test:
        Manual merge
      sql/mysql_priv.h:
        Manual merge
      ecc6e990
    • unknown's avatar
      Bug #20466: a view is mixing data when there's a trigger on the table · 224b5785
      unknown authored
        When making a place to store field values at the start of each group
        the real item (not the reference) must be used when deciding which column
        to copy.
      
      
      mysql-test/r/group_by.result:
        Bug #20466: a view is mixing data when there's a trigger on the table
         - test suite for the bug
      mysql-test/t/group_by.test:
        Bug #20466: a view is mixing data when there's a trigger on the table
         - test suite for the bug
      sql/sql_select.cc:
        Bug #20466: a view is mixing data when there's a trigger on the table
         - deal correctly with references
      224b5785
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 672c8d2c
      unknown authored
      into  rakia.(none):/home/kgeorge/mysql/autopush/B20868-5.0-opt
      
      672c8d2c
    • unknown's avatar
      Bug #20868: Client connection is broken on SQL query error · 579a7c5b
      unknown authored
       An aggregate function reference was resolved incorrectly and
      caused a crash in count_field_types.
       Must use real_item() to get to the real Item instance through
      the reference
      
      
      mysql-test/r/func_group.result:
        Bug #20868: Client connection is broken on SQL query error
         * test case for the bug
      mysql-test/t/func_group.test:
        Bug #20868: Client connection is broken on SQL query error
         * test case for the bug
      sql/sql_select.cc:
        Bug #20868: Client connection is broken on SQL query error
         * correctly resolve aggregate function references.
      579a7c5b
    • unknown's avatar
      Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 9f4a3819
      unknown authored
      into  lamia.home:/home/tkatchaounov/autopush/5.0-bug-21007
      
      
      client/mysql.cc:
        Auto merged
      mysql-test/r/date_formats.result:
        Auto merged
      mysql-test/r/func_str.result:
        Auto merged
      mysql-test/t/date_formats.test:
        Auto merged
      mysql-test/t/func_str.test:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/time.cc:
        Auto merged
      9f4a3819
    • unknown's avatar
      Fix for BUG#21007. · 2ce5582a
      unknown authored
      The problem was that store_top_level_join_columns() incorrectly assumed
      that the left/right neighbor of a nested join table reference can be only
      at the same level in the join tree.
      
      The fix checks if the current nested join table reference has no immediate
      left/right neighbor, and if so chooses the left/right neighbors of the
      nearest upper level, where these references are != NULL.
      
      
      mysql-test/r/group_min_max.result:
        Test for BUG#21007.
      mysql-test/t/group_min_max.test:
        Test for BUG#21007.
      sql/sql_base.cc:
        After computing and materializing the columns of all NATURAL joins in a FROM clause,
        the procedure store_top_level_join_columns() has to change the current natural join
        into a leaf table reference for name resolution. For this it needs to make the left
        neighbor point to the natural join table reference, and the natural join itself point
        to its left neighbor.
        
        This fix correctly determines the left/right neighbors of a table reference, even if
        the neghbors are at higher levels in the nested join tree. The rule is that if a table
        reference has no immediate left/right neighbors, we recursively pick the left/right
        neighbor of the level(s) above.
      2ce5582a
  5. 20 Jul, 2006 1 commit
    • unknown's avatar
      BUG#20975: Incorrect query result for NOT (subquery): · 1b03ac4c
      unknown authored
        Add implementations of Item_func_{nop,not}_all::neg_transformer
      
      
      mysql-test/r/subselect.result:
        BUG#20975: testcase
      mysql-test/t/subselect.test:
        BUG#20975: testcase
      sql/mysql_priv.h:
        Make chooser_compare_func_creator visible in item.h
      1b03ac4c
  6. 19 Jul, 2006 3 commits
    • unknown's avatar
      Added a test case with views for bug #17526. · 2fed1348
      unknown authored
      
      mysql-test/r/func_str.result:
        Adjusted results for the test case of bug 17526.
      sql/item_strfunc.cc:
        Post-merge modification
      2fed1348
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-4.1-opt · e8f7ed95
      unknown authored
      into  olga.mysql.com:/home/igor/mysql-5.0-opt
      
      
      mysql-test/r/func_str.result:
        Auto merged
      mysql-test/t/func_str.test:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/item_strfunc.h:
        Auto merged
      e8f7ed95
    • unknown's avatar
      Fixed bug #17526: incorrect print method · fbf07364
      unknown authored
      for class Item_func_trim. 
      For 4.1 it caused wrong output for EXPLAIN EXTENDED commands
      if expressions with the TRIM function of two arguments were used.
      For 5.0 it caused an error message when trying to select
      from a view with the TRIM function of two arguments.
      This unexpected error message was due to the fact that the
      print method for the class Item_func_trim was inherited from
      the class Item_func. Yet the TRIM function does not take a list
      of its arguments. Rather it takes the arguments in the form:
        [{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
        [remstr FROM] str
      
      
      mysql-test/r/func_str.result:
        Added a test case for bug #17526: uncorrect print method
        for class Item_func_trim.
      mysql-test/t/func_str.test:
        Added a test case for bug #17526: incorrect print method
        for class Item_func_trim.
      sql/item_strfunc.cc:
        Fixed bug #17526: incorrect print method
        for class Item_func_trim.
            
        Added an implementation for the virtual function print
        in the class Item_func_trim.
        The implementation takes into account the fact the TRIM
        function takes the arguments in the following forms:
          [{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
          [remstr FROM] str
      sql/item_strfunc.h:
        Fixed bug #17526: incorrect print method
        for class Item_func_trim.
            
        Added an implementation for the virtual function print
        in the class Item_func_trim.
        Declared a virtual method to return the mode of the TRIM 
        function: LEADING, TRAILING or BOTH.
        Added implementations of this method for Item_func_trim and
        its descendants Item_func_ltrim and Item_func_rtrim.
      fbf07364
  7. 18 Jul, 2006 3 commits
  8. 17 Jul, 2006 5 commits
    • unknown's avatar
      Post-merge fix. · 5da5f4e0
      unknown authored
      5da5f4e0
    • unknown's avatar
      Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 8db9d704
      unknown authored
      into  rurik.mysql.com:/home/igor/mysql-5.0-opt
      
      
      mysql-test/r/subselect.result:
        Manual merge
      mysql-test/t/subselect.test:
        Manual merge
      8db9d704
    • unknown's avatar
      Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · f4aa13fe
      unknown authored
      into  olga.mysql.com:/home/igor/mysql-5.0-opt
      
      f4aa13fe
    • unknown's avatar
      select.result, select.test: · a23ae773
      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.
      a23ae773
    • unknown's avatar
      mysql.test, mysql.result: · 0ccdc6ab
      unknown authored
        Corrected the test case after fixing bug#10977
      
      
      mysql-test/t/mysql.test:
        Corrected the test case after fixing bug#10977
      mysql-test/r/mysql.result:
        Corrected the test case after fixing bug#10977
      0ccdc6ab
  9. 16 Jul, 2006 1 commit
  10. 15 Jul, 2006 5 commits
    • unknown's avatar
      errmsg.txt: · 6f07adce
      unknown authored
        Fixed bug#10977: No warning issued if a column name is truncated
        New warning message is added.
      
      
      sql/share/errmsg.txt:
        Fixed bug#10977: No warning issued if a column name is truncated
        New warning message is added.
      6f07adce
    • unknown's avatar
      Fixed bug#10977: No warning issued if a column name is truncated · db1c95e8
      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.
      db1c95e8
    • unknown's avatar
      Merge orca.ndb.mysql.com:/space_old/pekka/ndb/version/my41-1.2461 · 233b14ff
      unknown authored
      into  orca.ndb.mysql.com:/space_old/pekka/ndb/version/my50
      
      233b14ff
    • unknown's avatar
      Fixed bug #20869. · d771113d
      unknown authored
      The bug caused a crash of the server if a subquery with
      ORDER BY DESC used the range access method.
      The bug happened because the method QUICK_SELECT_DESC::reset
      was not reworked after MRR interface had been introduced.
      
      
      mysql-test/r/subselect.result:
        Added a test case for bug #20869.
      mysql-test/t/subselect.test:
        Added a test case for bug #20869.
      d771113d
    • unknown's avatar
      Fixed bug #20519. · c181b7d9
      unknown authored
      The bug was due to a loss happened during a refactoring made
      on May 30 2005 that modified the function JOIN::reinit.
      As a result of it for any subquery the value of offset_limit_cnt
      was not restored for the following executions. Yet the first 
      execution of the subquery made it equal to 0.
      The fix restores this value in the function JOIN::reinit.  
      
      
      mysql-test/r/subselect.result:
        Added a test case fir bug #20519.
      mysql-test/t/subselect.test:
        Added a test case fir bug #20519.
      c181b7d9