1. 27 Mar, 2008 3 commits
  2. 26 Mar, 2008 5 commits
    • unknown's avatar
      Merge host.loc:/home/uchum/work/5.0-opt-35193 · c3f2e303
      unknown authored
      into  host.loc:/home/uchum/work/5.0-opt
      
      
      c3f2e303
    • unknown's avatar
      Fixed bug #35193. · 0b8342ba
      unknown authored
      View definition as SELECT ... FROM DUAL WHERE ... has
      valid syntax, but use of such view in SELECT or
      SHOW CREATE VIEW syntax causes unexpected syntax error.
      
      Server omits FROM DUAL clause when storing view body
      string in a .frm file for further evaluation.
      However, syntax of SELECT-witout-FROM query is more
      restrictive than SELECT FROM DUAL syntax, and doesn't
      allow the WHERE clause.
      
      NOTE: this syntax difference is not documented.
      
      
      View registration procedure has been modified to
      preserve original structure of view's body.
      
      
      
      mysql-test/r/view.result:
        Added test case for bug #35193.
      mysql-test/t/view.test:
        Added test case for bug #35193.
      sql/sql_select.cc:
        Fixed bug #35193.
        The st_select_lex::print function always omits FROM DUAL clause,
        even if original SELECT query has the WHERE clause.
        
        The mysql_register_view function uses this function to reconstruct
        a body of view's AS clause for further evaluation and stores that
        reconstructed clause in a .frm file.
        
        SELECT without FROM syntax is more restrictive than 
        SELECT FROM DUAL syntax: second one allows
        the WHERE clause, but first one is not.
        
        Use of this view in SELECT or SHOW CREATE VIEW queries
        causes unexpected syntax errors.
        
        
        The st_select_lex::print function has been modified to
        reconstruct FROM DUAL clause in queries when needed.
        
        
        TODO: Syntax difference is not documented and should be
        eliminated, however improvement of
        the SELECT-without-FROM syntax is not trivial and leads to
        significant modification of grammar file because of additional
        shift/reduce conflicts.
      0b8342ba
    • unknown's avatar
      Merge stella.local:/home2/mydev/mysql-5.0-amain · 4eaa7303
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.0-axmrg
      
      
      4eaa7303
    • unknown's avatar
      Merge stella.local:/home2/mydev/mysql-5.0-ateam · 7587a871
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.0-axmrg
      
      
      7587a871
    • unknown's avatar
      Merge stella.local:/home2/mydev/mysql-5.0-amain · 0d6f9bad
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.0-axmrg
      
      
      mysql-test/r/ctype_big5.result:
        Auto merged
      mysql-test/r/ctype_cp932.result:
        Auto merged
      mysql-test/r/ctype_euckr.result:
        Auto merged
      mysql-test/r/ctype_gb2312.result:
        Auto merged
      mysql-test/r/ctype_gbk.result:
        Auto merged
      mysql-test/r/ctype_uca.result:
        Auto merged
      mysql-test/r/ctype_ucs.result:
        Auto merged
      mysql-test/t/ctype_ucs.test:
        Auto merged
      sql/slave.cc:
        Auto merged
      0d6f9bad
  3. 25 Mar, 2008 4 commits
    • unknown's avatar
      Bug#20906 (Multiple assignments in SET in stored routine produce incorrect · 18801aa8
      unknown authored
      instructions)
      
      This bug can not be reproduced in the current version,
      adding the test case to the test suite for coverage, no code change.
      
      
      mysql-test/r/sp-code.result:
        Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
        instructions)
      mysql-test/t/sp-code.test:
        Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
        instructions)
      18801aa8
    • unknown's avatar
      information_schema.test, information_schema.result: · d62c9e33
      unknown authored
        Minor test case cleanup after bug#34529.
      
      
      mysql-test/r/information_schema.result:
        Minor test case cleanup after bug#34529.
      mysql-test/t/information_schema.test:
        Minor test case cleanup after bug#34529.
      d62c9e33
    • unknown's avatar
      Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0 · 4816e7b7
      unknown authored
      into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt-merged
      
      
      sql/sql_delete.cc:
        Auto merged
      4816e7b7
    • unknown's avatar
      BUG#35509 - Federated leaks memory when connecting to · 5ad505dd
      unknown authored
                  localhost/default port
      
      When creating federated table that points to unspecified host or
      localhost on unspecified port or port is 0, small memory leak occurs.
      
      This happens because we make a copy of unix socket path, which is
      never freed.
      
      With this fix we do not make a copy of unix socket path, instead
      share->socket points to MYSQL_UNIX_ADDR constant directly.
      
      This fix is covered by a test case for BUG34788.
      
      Affects 5.0 only.
      
      
      mysql-test/t/federated.test:
        A test case for BUG#35509.
      sql/ha_federated.cc:
        When creating federated table we call parse_url() to check if connect
        string is correct. parse_url() may make a copy of unix socket path if
        port is not specified or 0 and host is not specified or 'localhost'.
        This copy is never freed.
        
        As there is no need to make a copy of unix socket path, let
        share->socket point to MYSQL_UNIX_ADDR directly.
      5ad505dd
  4. 24 Mar, 2008 1 commit
  5. 23 Mar, 2008 1 commit
  6. 21 Mar, 2008 2 commits
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · a3558b5f
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B26461-5.0-opt
      
      
      a3558b5f
    • unknown's avatar
      Bug #26461: Intrinsic data type bool (1 byte) redefined to BOOL (4 bytes) · cebb6727
      unknown authored
      The bool data type was redefined to BOOL (4 bytes on windows).
      Removed the #define and fixed some of the warnings that were uncovered
      by this.
      Note that the fix also disables 2 warnings :
      4800 : 'type' : forcing value to bool 'true' or 'false' (performance warning)
      4805: 'operation' : unsafe mix of type 'type' and type 'type' in operation
      
      These warnings will be handled in a separate bug, as they are performance related or bogus.
      
      Fixed to int the return type of functions that return more than 
      2 distinct values.
      
      
      CMakeLists.txt:
        Bug #26461: disable the C4800 and C4805 warnings temporarily
      include/config-win.h:
        Bug #26461: 
         - no need for this define for Windows.
         - windows C++ compilers have a bool type
      include/my_global.h:
        Bug #26461: removed bool_defined (no longer needed)
      sql/handler.h:
        Bug #26461: bool functions must return boolean values
      sql/mysql_priv.h:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/procedure.h:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_acl.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_acl.h:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_analyse.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_analyse.h:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_base.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_db.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_delete.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_load.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_parse.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_prepare.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_update.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      cebb6727
  7. 20 Mar, 2008 3 commits
    • unknown's avatar
      BUG#34788 - malformed federated connection url is not handled · 8030bdfc
      unknown authored
                  correctly - crashes server !
      
      Creating federated table with connect string containing empty
      (zero-length) host name and port is evaluated as 0 (port is
      incorrect, omitted or 0) crashes server.
      
      This happens because federated calls strcmp() with NULL pointer.
      
      Fixed by avoiding strcmp() call if hostname is set to NULL.
      
      
      mysql-test/r/federated.result:
        A test case for BUG#34788.
      mysql-test/t/federated.test:
        A test case for BUG#34788.
      sql/ha_federated.cc:
        Fixed that parse_url() may call strcmp() with NULL pointer.
      8030bdfc
    • unknown's avatar
      Merge stella.local:/home2/mydev/mysql-5.0-ateam · 0cb21ac2
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.0-axmrg
      
      
      0cb21ac2
    • unknown's avatar
      Merge stella.local:/home2/mydev/mysql-4.1-axmrg · 4a0210bc
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.0-axmrg
      
      
      configure.in:
        Manual merge
      4a0210bc
  8. 19 Mar, 2008 5 commits
    • unknown's avatar
      Merge host.loc:/home/uchum/work/PA/5.0-opt-34763 · 070a2334
      unknown authored
      into  host.loc:/home/uchum/work/5.0-opt
      
      
      sql/item.cc:
        Auto merged
      070a2334
    • unknown's avatar
      Bug#30960 processlist state '*** DEAD ***' on recent 5.0.48 windows builds · edce44ee
      unknown authored
      The problem is that unimplemented WIN32 version of pthread_kill
      is returning ESRCH no matter the arguments, causing calls to
      mysqld_list_processes to set the procinfo to dead because
      pthread_kill returns non zero. The dead procinfo would show
      up on a second invocation of show processlist.
      
      
      include/my_pthread.h:
        When unimplemented, pthread_kill must return zero for
        any process id other then zero.
      edce44ee
    • unknown's avatar
      Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY · 3c5894ba
      unknown authored
        
      When swapping out heap I_S tables to disk, this is done after plan refinement.
      Thus, READ_RECORD::file will still point to the (deleted) heap handler at start
      of execution. This causes segmentation fault if join buffering is used and the 
      query is a star query where the result is found to be empty before accessing
      some table. In this case that table has not been initialized (i.e. had its 
      READ_RECORD re-initialized) before the cleanup routine tries to close the handler.
      Fixed by updating READ_RECORD::file when changing handler.
      
      
      mysql-test/r/information_schema.result:
        Bug#34529: Test result.
      mysql-test/t/information_schema.test:
        Bug#34529: Test case.
      sql/sql_show.cc:
        Bug#34529: The fix.
      3c5894ba
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/bug34512/my50 · e12afb1e
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      e12afb1e
    • unknown's avatar
      Bug #33334 mysqltest_embedded crashes when disconnecting before reap. · 4018b139
      unknown authored
      Before breaking the connection we have to check that there's no query
        executing at the moment. Otherwise it can lead to crash in embedded server.
      
      
      client/mysqltest.c:
        Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
        
        Wait until the query thread is finished before we break the connection.
        Waiting part moved to a separate wait_query_thread_end() function
      mysql-test/r/flush.result:
        Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
        
        test result
      mysql-test/t/flush.test:
        Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
        
        test case
      4018b139
  9. 18 Mar, 2008 2 commits
  10. 17 Mar, 2008 2 commits
  11. 15 Mar, 2008 1 commit
    • unknown's avatar
      Merge stella.local:/home2/mydev/mysql-5.0-ateam · 33822381
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.0-axmrg
      
      
      mysql-test/r/func_misc.result:
        Auto merged
      mysql-test/r/myisam.result:
        Auto merged
      mysql-test/t/func_misc.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      33822381
  12. 14 Mar, 2008 11 commits
    • unknown's avatar
      Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0-engines · eda0b52c
      unknown authored
      into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.0
      
      
      sql/sql_yacc.yy:
        Auto merged
      eda0b52c
    • unknown's avatar
      Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures · 063b5047
      unknown authored
      The problem was that the COM_STMT_SEND_LONG_DATA was sending a response
      packet if the prepared statement wasn't found in the server (due to
      reconnection). The commands COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE
      should not send any packets, even error packets should not be sent since
      they are not expected by the client API.
      
      The solution is to clear generated during the execution of the aforementioned
      commands and to skip resend of prepared statement commands. Another fix is
      that if the connection breaks during the send of prepared statement command,
      the command is not sent again since the prepared statement is no longer in the
      server.
      
      
      libmysql/libmysql.c:
        The mysql handle might be reset after a reconnection.
        Pass the now used stmt argument to cli_advanced_command.
      sql-common/client.c:
        Don't resend command if the connection broke and it's a prepared
        statement command. If the session is broken, prepared statements
        on the server are gone, set the error accordanly.
      sql/sql_prepare.cc:
        Clear any error set during the execution of the request
        command.
      tests/mysql_client_test.c:
        Fix memory leak by freeing result associated with statement.
        Remove test case for Bug 29948 because it's not reliable in
        5.0 (fixed in 5.1) due to KILL queries sending two packets for
        a thread that kills itself.
      063b5047
    • unknown's avatar
      Post-merge fix · 451de554
      unknown authored
      451de554
    • unknown's avatar
      Fixed bug #34763. · 9699767c
      unknown authored
      Queries like:
      
        SELECT ROW(1, 2) IN (SELECT t1.a, 2)
          FROM t1 GROUP BY t1.a
      
      or 
      
        SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2)
          FROM t1 GROUP BY t1.a
      
      lead to assertion failure in the
      Item_in_subselect::row_value_transformer method in debugging
      build, or to unexpected error message in release build:
      
        ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
                            reference in item list)
      
      Unexpected error message and assertion failure have been
      eliminated.
      
      
      mysql-test/r/subselect3.result:
        Added test case for bug #34763.
      mysql-test/t/subselect3.test:
        Added test case for bug #34763.
      sql/item.cc:
        Fixed bug #34763.
        The Item_ref::fix_fields method has been modified to silently
        ignore not fixed outer references: by the definition, those
        references should be fixed later by the call to the
        fix_inner_refs function.
      sql/item_subselect.cc:
        Fixed bug #34763.
        The Item_in_subselect::row_value_transformer method has been
        modified to eliminate assertion failure on not fixed outer
        references: by the definition those references are allowed in
        this context and should be fixed later by the call to the
        fix_inner_refs function.
      9699767c
    • unknown's avatar
      Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines · 3834f421
      unknown authored
      into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.0
      
      
      3834f421
    • unknown's avatar
      Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0 · b09254f0
      unknown authored
      into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.0
      
      
      mysql-test/r/func_misc.result:
        Auto merged
      mysql-test/r/myisam.result:
        Auto merged
      mysql-test/t/func_misc.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      b09254f0
    • unknown's avatar
      Merge stella.local:/home2/mydev/mysql-5.0-ateam · 7a10ede8
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.0-axmrg
      
      
      sql/sql_yacc.yy:
        Auto merged
      7a10ede8
    • unknown's avatar
      Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0 · 4097ee7f
      unknown authored
      into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
      
      
      4097ee7f
    • unknown's avatar
      Merge stella.local:/home2/mydev/mysql-5.0-ateam · c27e6178
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.0-axmrg
      
      
      c27e6178
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-5.0-engines · 7e01efff
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG28248/mysql-5.0-engines
      
      
      7e01efff
    • unknown's avatar
      BUG#28248 - mysqldump results with MERGE ... UNION=() cannot be executed · 196b616a
      unknown authored
      When there are no underlying tables specified for a merge table,
      SHOW CREATE TABLE outputs a statement that cannot be executed. The
      same is true for mysqldump (it generates dumps that cannot be
      executed).
      
      This happens because SQL parser does not accept empty UNION() clause.
      
      This patch changes the following:
      - it is now possible to execute CREATE/ALTER statement with
        empty UNION() clause.
      - the same as above, but still worth noting: it is now possible to
        remove underlying tables mapping using ALTER TABLE ... UNION=().
      - SHOW CREATE TABLE does not output UNION() clause if there are
        no underlying tables specified for a merge table. This makes
        mysqldump slightly smaller.
      
      
      mysql-test/r/merge.result:
        A test case for BUG#28248.
      mysql-test/t/merge.test:
        A test case for BUG#28248.
      sql/ha_myisammrg.cc:
        Do not output UNION clause in SHOW CREATE TABLE, when there are
        no underlying tables defined.
      sql/sql_yacc.yy:
        Make underlying table list for MERGE engine optional.
        
        As for MERGE engine empty underlying tables list is valid, it should
        be valid for the parser as well.
        
        This change is mostly needed to restore dumps made by earlier MySQL
        versions. Also with this fix it is possible to remove underlying
        tables mapping by using ALTER TABLE ... UNION=().
      196b616a