1. 27 Sep, 2007 1 commit
    • unknown's avatar
      Bug #30468: column level privileges not respected when joining tables · 3f11d1b1
      unknown authored
      When expanding a * in a USING/NATURAL join the check for table access
      for both tables in the join was done using the grant information of the
      first one.
      Fixed by getting the grant information for the current table while 
      iterating through the columns of the join.
      
      
      mysql-test/r/grant2.result:
        Bug #30468: test case
      mysql-test/t/grant2.test:
        Bug #30468: test case
      sql/sql_acl.cc:
        Bug #30468: correctly check column grants
      sql/sql_acl.h:
        Bug #30468: correctly check column grants
      sql/sql_base.cc:
        Bug #30468: correctly check column grants
      sql/sql_insert.cc:
        Bug #30468: correctly check column grants
      3f11d1b1
  2. 29 Aug, 2007 2 commits
  3. 28 Aug, 2007 1 commit
    • unknown's avatar
      Bug #30377: EXPLAIN loses last_query_cost when used with UNION · 55bfb87a
      unknown authored
      Currently the Last_query_cost session status variable shows
      only the cost of a single flat subselect. For complex queries
      (with subselects or unions etc) Last_query_cost is not valid
      as it was showing the cost for the last optimized subselect.
      Fixed by reseting to zero Last_query_cost when the complete
      cost of the query cannot be determined.
      Last_query_cost will be non-zero only for single flat queries.
      
      
      mysql-test/r/status.result:
        Bug #30377: test case
      mysql-test/t/status.test:
        Bug #30377: test case
      sql/sql_lex.h:
        Bug #30377: helper function
      sql/sql_select.cc:
        Bug #30377: don't assign cost if not on single level statement
      55bfb87a
  4. 27 Aug, 2007 1 commit
    • unknown's avatar
      Bug #30596 GROUP BY optimization gives wrong result order · b968d99c
      unknown authored
      The optimization that uses a unique index to remove GROUP BY, did not 
      ensure that the index was actually used, thus violating the ORDER BY
      that is impled by GROUP BY.
      Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
      a unique index. In case GROUP BY ... ORDER BY null is used, GROUP BY is
      simply removed.
      
      
      BitKeeper/etc/ignore:
        Added support-files/mysqld_multi.server tests/bug25714 cscope.in.out cscope.out cscope.po.out to the ignore list
      mysql-test/r/distinct.result:
        Bug#30596: Changed test case. 
        Prior to Bug#16458, These queries use temp table and filesort. The
        bug was that they used a temp table. However, that patch removed
        filesort also, in which case we can no longer gurantee correct ordering.
      mysql-test/r/group_by.result:
        Bug#30596: Correct result
      mysql-test/r/innodb_mysql.result:
        Bug#30596: Test case for innodb. Here, as opposed to for MyISAM, row 
        lookup is done using index whenever the index covers the group list.
      mysql-test/t/group_by.test:
        Bug#30596: Test case
      mysql-test/t/innodb_mysql.test:
        Bug#30596: Test case
      sql/sql_select.cc:
        Bug#30596: The fix, replacing GROUP BY with ORDER BY unless 
        ORDER BY [NULL|<constant>]
      b968d99c
  5. 26 Aug, 2007 1 commit
  6. 25 Aug, 2007 3 commits
  7. 24 Aug, 2007 8 commits
  8. 23 Aug, 2007 2 commits
  9. 22 Aug, 2007 4 commits
    • unknown's avatar
      Cleanup in the "netware" subdirectory: · 49c07bc4
      unknown authored
      1) We do not provide the "isam" table handler in 5.0 and up (different from "myisam" !),
         so we do not need the ".def" files for the "isam"-specific tools.
      
      2) Use "basename" to get the base name of a file, not a harder-to-read sed expression.
      
      
      BitKeeper/deleted/.del-isamchk.def:
        Delete: netware/isamchk.def
      BitKeeper/deleted/.del-isamlog.def:
        Delete: netware/isamlog.def
      BitKeeper/deleted/.del-pack_isam.def:
        Delete: netware/pack_isam.def
      netware/Makefile.am:
        Use a plain "basename" showing the purpose, not a sed command which is harder to read.
      49c07bc4
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30201 · c21f354a
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      c21f354a
    • unknown's avatar
      Merge hynda.mysql.fi:/home/my/mysql-5.0-main · 0162f013
      unknown authored
      into  hynda.mysql.fi:/home/my/mysql-5.0-marvel
      
      0162f013
    • unknown's avatar
      Fixed bug #30201. · e4c8992d
      unknown authored
      Killing a SELECT query with KILL QUERY or KILL CONNECTION
      causes a server crash if the query cache is enabled.
      
      Normal evaluation of a query may be interrupted by the
      KILL QUERY/CONNECTION statement, in this case the mysql_execute_command
      function returns TRUE, and the thd->killed flag has true value.
      In this case the result of the query may
      be cached incompletely (omitting call to query_cache_insert inside
      the net_real_write function), and next call to query_cache_end_of_result
      may lead to server crash.
      Thus, the query_cache_end_of_result function has been modified to abort
      query cache in the case of killed thread.
      
      
      
      sql/sql_cache.cc:
        Fixed bug #30201.
        The  query_cache_end_of_result function has been modified to abort query
        cache in the case of query execution failure. Also this function has been
        modified to remove incomplete query block.
      e4c8992d
  10. 21 Aug, 2007 10 commits
  11. 20 Aug, 2007 4 commits
    • unknown's avatar
      Fixed bug #30287. · 79260ee0
      unknown authored
      The server created temporary tables for filesort in the working directory
      instead of the specified tmpdir directory.
      
      
      sql/item.cc:
        Fixed bug #30287.
        The Item_field::set_field method has been modified to reset the any_privileges
        flag to false in case of system temporary table. This modification prevents the
        server from unnecessary checking of user privileges to access system temporary
        tables.
      sql/sql_select.cc:
        Fixed bug #30287.
        Bugfix for #29015 has been removed: TABLE_SHARE::table_name of system
        temporary tables contains full path to table file basename again.
      sql/sql_view.cc:
        Fixed bug #30287.
        Commentary has been added.
      79260ee0
    • unknown's avatar
      Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base · ae349e98
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge
      
      
      sql/sql_base.cc:
        Auto merged
      sql/sql_handler.cc:
        Auto merged
      ae349e98
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · b857b104
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      b857b104
    • unknown's avatar
      Bug#27629 Possible security flaw in INFORMATION_SCHEMA and SHOW statements · bb1a074c
      unknown authored
      added SUPER_ACL check for I_S.TRIGGERS
      
      
      mysql-test/r/information_schema.result:
        result fix
      mysql-test/r/information_schema_db.result:
        result fix
      mysql-test/t/information_schema.test:
        test case
      sql/sql_show.cc:
        added SUPER_ACL check for I_S.TRIGGERS
      bb1a074c
  12. 18 Aug, 2007 1 commit
  13. 17 Aug, 2007 2 commits
    • unknown's avatar
      Merge adventure.(none):/home/thek/Development/cpp/bug30269/my50-bug30269 · 6677194e
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
      
      
      mysql-test/r/query_cache.result:
        Auto merged
      mysql-test/t/query_cache.test:
        Auto merged
      6677194e
    • unknown's avatar
      Bug #30269 Query cache eats memory · 28233c1f
      unknown authored
      Although the query cache doesn't support retrieval of statements containing
      column level access control, it was still possible to cache such statements
      thus wasting memory.
      
      This patch extends the access control check on the target tables to avoid
      caching a statement with column level restrictions. 
      
      
      mysql-test/r/query_cache.result:
        Added test
      mysql-test/t/query_cache.test:
        Added test
      sql/sql_cache.cc:
        The function check_table_access leaves the artifact
        grant.want_privileges= 1, if a statement refers to tables with column level
        privileges. To avoid the statement from being stored into the query cache,
        it is enough to check this flag and set 'safe_to_cache_query' to zero.
      sql/sql_cache.h:
        - Removed 'static' attribute or class methods
        - Added THD parameter to process_and_count_tables
      28233c1f