1. 03 Sep, 2007 3 commits
    • unknown's avatar
      Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 403ed43b
      unknown authored
      into  dl145s.mysql.com:/data0/mhansson/my50-bug30234-push
      
      
      sql/sql_yacc.yy:
        Auto merged
      403ed43b
    • unknown's avatar
      Bug #30234: Unexpected behavior using DELETE with AS and USING · f0d4beee
      unknown authored
        
      DELETE FROM ... USING ... statements with the following type of 
      ambiguous aliasing gave unexpected results:
      DELETE FROM t1 AS alias USING t1, t2 AS alias WHERE t1.a = alias.a;
      This query would leave table t1 intact but delete rows from t2.
      Fixed by changing DELETE FROM ... USING syntax so that only alias 
      references (as opposed to alias declarations) may be used in FROM.
      
      
      mysql-test/r/delete.result:
        Bug#30234: Test Result
      mysql-test/t/delete.test:
        Bug#30234: Test Case
      sql/sql_yacc.yy:
        Bug#30234:
        - Added parser rule table_alias_ref_list that contains a list of table 
          aliases only.
        - Added parser rule table_alias_ref that sets the TL_OPTION_ALIAS in 
          order to turn off semantic checking that applies only for table names.
      f0d4beee
    • unknown's avatar
      Bug#29408 Cannot find view in columns table if the selection contains a function · ee0b7d89
      unknown authored
      Use view db name as thread default database, in order to ensure
      that the view is parsed and prepared correctly.
      
      
      mysql-test/r/sp.result:
        test result
      mysql-test/t/sp.test:
        test case
      sql/sql_parse.cc:
        copy thd->db_length to table_list->db_length
      sql/sql_view.cc:
        Use view db name as thread default database, in order to ensure
        that the view is parsed and prepared correctly.
      ee0b7d89
  2. 31 Aug, 2007 2 commits
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30126 · b25b8cbc
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      
      b25b8cbc
    • unknown's avatar
      Fixed bug #30126. · ff149b71
      unknown authored
      When dumping database from a 4.x server, the mysqldump client
      inserted a delimiter sign inside special commentaries of the form:
        /*!... CREATE DATABASE IF NOT EXISTS ... ;*/
      During restoration that dump file was splitten by delimiter signs on
      the client side, and the rest of some commentary strings was prepended
      to following statements.
      
      The 4x_server_emul test case option has been added for use with the
      DBUG_EXECUTE_IF debugging macro. This option affects debug server
      builds only to emulate particular behavior of a 4.x server for
      the mysqldump client testing. Non-debugging builds are not affected.
      
      
      mysql-test/r/mysqldump-compat.result:
        Added test case for bug #30126.
      mysql-test/t/mysqldump-compat.opt:
        Added test case for bug #30126.
      mysql-test/t/mysqldump-compat.test:
        Added test case for bug #30126.
      sql/sql_parse.cc:
        Fixed bug #30126.
        The mysqldump client uses the "SHOW CREATE DATABASE" query to
        obtain the "CREATE DATABASE" statement from that database.
        The 4.x server doesn't recognise that query, and mysqldump
        forms the "CREATE DATABASE" statement from scratch.
        That statement was formed incorrectly.
        
        To enforce the mysqldump client to create that statement from
        scratch, debugging code has been added to the mysql_execute_command
        function: in tcase of the --loose-debug=d,4x_server_emul option,
        the server returns parse error to client to emulate old behaviour.
        
        The 4x_server_emul test case option has been added for use with the
        DBUG_EXECUTE_IF debugging macro. This option affects debug server
        builds only to emulate particular behavior of a 4.x server for
        the mysqldump client testing. Non-debugging builds are not affected.
      client/mysqldump.c:
        Fixed bug #30126.
        The init_dumping_tables function has been modified to output semicolon
        outside of commentaries.
      ff149b71
  3. 29 Aug, 2007 2 commits
  4. 28 Aug, 2007 1 commit
    • unknown's avatar
      Bug #30377: EXPLAIN loses last_query_cost when used with UNION · 310afbd4
      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
      310afbd4
  5. 27 Aug, 2007 1 commit
    • unknown's avatar
      Bug #30596 GROUP BY optimization gives wrong result order · 23686646
      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>]
      23686646
  6. 26 Aug, 2007 1 commit
  7. 25 Aug, 2007 3 commits
  8. 24 Aug, 2007 8 commits
  9. 23 Aug, 2007 2 commits
  10. 22 Aug, 2007 4 commits
    • unknown's avatar
      Cleanup in the "netware" subdirectory: · 870958d2
      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.
      870958d2
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30201 · 10329092
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      
      10329092
    • unknown's avatar
      Merge hynda.mysql.fi:/home/my/mysql-5.0-main · 3dbffd24
      unknown authored
      into  hynda.mysql.fi:/home/my/mysql-5.0-marvel
      
      
      3dbffd24
    • unknown's avatar
      Fixed bug #30201. · 891b1659
      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.
      891b1659
  11. 21 Aug, 2007 10 commits
  12. 20 Aug, 2007 3 commits
    • unknown's avatar
      Fixed bug #30287. · 7c3d5bc5
      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.
      7c3d5bc5
    • unknown's avatar
      Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base · 3c52b2b3
      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
      3c52b2b3
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · d48e35b9
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      d48e35b9