1. 27 Mar, 2008 2 commits
    • unknown's avatar
      Merge witty.:/Users/mattiasj/Public/shared-vms/bug21413-41-engines · da9db4ed
      unknown authored
      into  witty.:/Users/mattiasj/clones/bug21413-50-engines
      
      
      sql/sql_insert.cc:
        Manual merge
      da9db4ed
    • unknown's avatar
      Recommit of antonys previous commit. · fb27979e
      unknown authored
      Bug#21413
      "Engine table handler used by multiple threads in REPLACE DELAYED"
      When executing a REPLACE DELAYED statement, the storage engine
      ::extra() method was invoked by a different thread than the thread
      which has acquired the handler instance.
      
      This did not cause problems within the current server and with
      the current storage engines.
      But it has the potential to confuse future storage engines.
      
      Added code to avoid surplus calls to extra() method in case of DELAYED
      which avoids calling storage engine from a different thread than
      expected.
      
      No test case.
      This change does not change behavior in conjunction with current
      storage engines. So it cannot be tested by the regression test suite.
      
      
      sql/sql_insert.cc:
        Bug#21413
        When performing DELAYED operations, we should not call
        the storage engine methods from the 'wrong' context.
        Ensure that the calls to the methods are appropiately guarded
        by either moving calls to sections where the lock_type is checked.
        No need to copy all elements of TABLE_LIST when opening table
        using open_ltable().
      fb27979e
  2. 25 Mar, 2008 1 commit
    • 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
  3. 20 Mar, 2008 1 commit
    • 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
  4. 18 Mar, 2008 1 commit
  5. 14 Mar, 2008 6 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
      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 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
    • unknown's avatar
      BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if · 3ec86767
      unknown authored
                  log-slave-updates and circul repl
      
      This is a test case fix for BUG#13861.
      
      
      mysql-test/r/rpl_dual_pos_advance.result:
        Fix for a test case for BUG#13861.
      mysql-test/t/rpl_dual_pos_advance.test:
        Fix for a test case for BUG#13861.
        
        master_pos_wait() requires slave sql thread running. But it is not
        guaranteed for this test case. As we use start slave until it may
        execute all events and shutdown before master_pos_wait() is started.
        
        On the other hand it is safe just to wait for slave to stop here,
        as start slave returns _after_ sql thread is started.
      3ec86767
  6. 13 Mar, 2008 1 commit
  7. 12 Mar, 2008 4 commits
  8. 10 Mar, 2008 2 commits
  9. 08 Mar, 2008 1 commit
  10. 07 Mar, 2008 4 commits
  11. 06 Mar, 2008 3 commits
  12. 05 Mar, 2008 1 commit
    • unknown's avatar
      Fix for bug #34889: mysql_client_test::test_mysql_insert_id test fails · 0c1dd98e
      unknown authored
                          sporadically
      
      Under some circumstances, the mysql_insert_id() value after SELECT ...
      INSERT could return a wrong value. This could happen when the last
      SELECT ... INSERT did not involve an AUTO_INCREMENT column, but the
      value of mysql_insert_id() was changed by some previous statements.
      
      Fixed by checking the value of thd->insert_id_used in
      select_insert::send_eof() and returning 0 for mysql_insert_id() if it
      is not set.
      
      
      sql/sql_insert.cc:
        Do not return thd->last_insert_id unconditionally in
        select_insert::send_eof(). First check if thd->insert_id_used is
        non-zero, and return 0 otherwise.
      tests/mysql_client_test.c:
        Added a test case for bug #34889.
      0c1dd98e
  13. 04 Mar, 2008 1 commit
    • unknown's avatar
      Bug#23097 mysql can't insert korean on mysql prompt. · 8e4a3fcb
      unknown authored
      Problem: libedit is a very pure-ASCII oriented library,
      and it is not aware of extended (0x80..0xFF) or even multi-byte
      characters. It considered such characters as non-printable
      and didn't allow to input them.
      Fix: make libedit think that all bytes >= 0x80 are printable.
      
      
      cmd-line-utils/libedit/el.h:
        Defining macro, a locale's isprint() replacement.
        We'll consider all 8bit values as printable characters.
      cmd-line-utils/libedit/key.c:
        Changing isprint() to el_isprint().
      cmd-line-utils/libedit/map.c:
        Changing isprint() to el_isprint().
      cmd-line-utils/libedit/read.c:
        Changing isprint() to el_isprint().
      cmd-line-utils/libedit/refresh.c:
        Changing isprint() to el_isprint().
      8e4a3fcb
  14. 03 Mar, 2008 5 commits
    • unknown's avatar
      Raise the version number after cloning 5.0.58 · 4d09306d
      unknown authored
      4d09306d
    • unknown's avatar
      BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql" · cd9f2d1c
      unknown authored
      - Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
        to before the late NULLs filtering code.
      - Backport function comments from 6.0.
      
      
      mysql-test/r/null_key.result:
        BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
        - Testcase
      mysql-test/t/null_key.test:
        BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
        - Testcase
      sql/sql_select.cc:
        BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
        - Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
          to before the late NULLs filtering code.
        - Backport function comments from 6.0
      cd9f2d1c
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/bug31781/my50 · 64bdb0bd
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      64bdb0bd
    • unknown's avatar
      Fix for bug #31781: multi-table UPDATE with temp-pool enabled fails · 162eadbe
      unknown authored
                          with errno 17
      
      my_create() did not perform any checks for the case when a file is
      successfully created by a call to open(), but the call to
      my_register_filename() later fails because the number of open files
      has exceeded the my_open_files limit. This can happen on platforms 
      which do not have getrlimit(), and hence we do not know the real limit
      for open files. In such a case an error was returned to a caller
      although the file has actually been created. Since callers assume
      my_create() to return an error only when it failed to create a file,
      they did not perform any cleanups, leaving an 'orphaned' file on the
      file system.
      
      Fixed by adding a check for the above case to my_create() and ensuring
      the newly created file is deleted before returning an error.
      
      Creating a deterministic test case in the test suite is impossible,
      because the exact steps required to reproduce the above situation
      depend on the platform and/or environment (OS per-user limits, queries
      executed by previous tests, startup parameters). The patch was
      manually tested on Windows using examples posted in the bug report.
      
      
      mysys/my_create.c:
        Ensure that, if the call to my_register_filename() in my_create()
        failed, but the previous open() called succeeded, the newly created
        file is deleted before returning an error.
      162eadbe
    • unknown's avatar
      test case fix · 2cb35cd6
      unknown authored
      2cb35cd6
  15. 01 Mar, 2008 1 commit
  16. 29 Feb, 2008 6 commits
    • unknown's avatar
      wrong merge fix · 4e7c4ab9
      unknown authored
      4e7c4ab9
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt · 4460f5a5
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      mysql-test/t/symlink.test:
        Auto merged
      mysql-test/r/symlink.result:
        after merge fix
      4460f5a5
    • unknown's avatar
      test fix · be59a0ea
      unknown authored
      
      mysql-test/r/symlink.result:
        result fix
      be59a0ea
    • unknown's avatar
      Fixed bug #34830: mixed table and field names in Item_ref · d276cd90
      unknown authored
                        and Item_direct_ref constructor calls.
      
      Order of ref->field_name and ref->table_name arguments
      is of Item_ref and Item_direct_ref in the fix_inner_refs
      function is inverted.
      
      
      sql/sql_select.cc:
        Fixed bug #34830: mixed table and field names in Item_ref
                          and Item_direct_ref constructor calls.
        
        Order of ref->field_name and ref->table_name arguments
        is of Item_ref and Item_direct_ref in the fix_inner_refs
        function is inverted. See definitions:
        
          Item_ref(Name_resolution_context *context_arg, Item **item,
                   const char *table_name_arg, const char *field_name_arg,
                   bool alias_name_used_arg= FALSE)
          and
        
          Item_direct_ref(Name_resolution_context *context_arg, Item **item,
                          const char *table_name_arg,
                          const char *field_name_arg,
                          bool alias_name_used_arg= FALSE)
      d276cd90
    • unknown's avatar
      after merge fix · fa9e35b4
      unknown authored
      fa9e35b4
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt · 8bdb243f
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      sql/mysql_priv.h:
        Auto merged
      mysql-test/r/symlink.result:
        manual merge
      mysql-test/t/symlink.test:
        manual merge
      sql/mysqld.cc:
        manual merge
      sql/sql_parse.cc:
        manual merge
      8bdb243f