1. 02 Aug, 2006 5 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 9813aff5
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
      
      
      include/mysql.h:
        Auto merged
      include/sql_common.h:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/mysqldump.result:
        Auto merged
      mysql-test/t/udf.test:
        Auto merged
      ndb/src/mgmsrv/ConfigInfo.cpp:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/slave.cc:
        Auto merged
      sql/sp.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql-common/client.c:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      sql/table.h:
        Auto merged
      mysql-test/r/ps.result:
        Manual merge.
      mysql-test/r/sp.result:
        Manual merge.
      mysql-test/t/ps.test:
        Manual merge.
      mysql-test/t/sp.test:
        Manual merge.
      sql/sql_prepare.cc:
        Manual merge.
      sql/table.cc:
        Manual merge.
      tests/mysql_client_test.c:
        Manual merge.
      9813aff5
    • unknown's avatar
      Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0 · 0a5b8ba6
      unknown authored
      into  lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
      
      0a5b8ba6
    • unknown's avatar
      Fix a compilation failiure on QNX · ec05d4b0
      unknown authored
      
      sql/udf_example.c:
        Declare tmp_error at the beginning of the block (this is C now)
      ec05d4b0
    • unknown's avatar
      Bug #21396: Wrong error number generated for a missing table · 00e2974f
      unknown authored
      
      BitKeeper/etc/collapsed:
        BitKeeper file /home/georg/work/mysql/prod/mysql-5.0/BitKeeper/etc/collapsed
      mysys/my_open.c:
        Win64 bit fix: Replacing 32-bit value (0xFFFFFFFF) by a generic error constant.
      00e2974f
    • unknown's avatar
      .del-sp.test.orig: · eae15716
      unknown authored
        Delete: mysql-test/t/sp.test.orig
      
      
      BitKeeper/deleted/.del-sp.test.orig:
        Delete: mysql-test/t/sp.test.orig
      eae15716
  2. 01 Aug, 2006 3 commits
    • unknown's avatar
      Applied innodb-5.0-ss677 snapshot. · bc7a1822
      unknown authored
      Fixes:
      - bug #19834: Using cursors when running in READ-COMMITTED can cause InnoDB to crash
      - bug #21112: InnoDB slow with > 100,000 .ibd files
      - bug #21113: Duplicate printout in SHOW INNODB STATUS
      
      
      innobase/fil/fil0fil.c:
        Applied innodb-5.0-ss677 snapshot.
          Make the tablespace cache hash size 100 or 1000 times bigger. Fixes bug #21112.
      innobase/ibuf/ibuf0ibuf.c:
        Applied innodb-5.0-ss677 snapshot.
          ibuf_print(): Don't print redundant information. Fixes bug #21113.
      sql/ha_innodb.cc:
        Applied innodb-5.0-ss677 snapshot.
          ha_innobase::start_stmt(): patch from Heikki:
          Do not call read_view_close_for_mysql().  (Bug #19834)
      bc7a1822
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0 · 7b8a2f46
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
      
      7b8a2f46
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge · 6be8a9f7
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
      
      6be8a9f7
  3. 31 Jul, 2006 4 commits
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl · f15ff063
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
      
      
      extra/yassl/src/ssl.cpp:
        Auto merged
      f15ff063
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl · 4aee1231
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
      
      4aee1231
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 10b764d6
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-21269
      
      10b764d6
    • unknown's avatar
      Bug#21269 (DEFINER-clause is allowed for UDF-functions) · f48ac9aa
      unknown authored
      The problem was that the grammar allows to create a function with an optional
      definer clause, and define it as a UDF with the SONAME keyword.
      Such combination should be reported as an error.
      
      The solution is to not change the grammar itself, and to introduce a
      specific check in the yacc actions in 'create_function_tail' for UDF,
      that now reports ER_WRONG_USAGE when using both DEFINER and SONAME.
      
      
      mysql-test/r/udf.result:
        Added tests for Bug#21269 (DEFINER-clause is allowed for UDF-functions)
      mysql-test/t/udf.test:
        Added tests for Bug#21269 (DEFINER-clause is allowed for UDF-functions)
      sql/sql_yacc.yy:
        Creating a UDF function with a DEFINER clause is now a syntax error.
      f48ac9aa
  4. 29 Jul, 2006 6 commits
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1 · d55cc6b8
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-5.0
      
      
      configure.in:
        Auto merged
      d55cc6b8
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0 · 5ae3d614
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-4.1
      
      
      configure.in:
        Auto merged
      5ae3d614
    • unknown's avatar
      configure.in: · 7991d78a
      unknown authored
        Corrected typo
      
      
      configure.in:
        Corrected typo
      7991d78a
    • unknown's avatar
      Fix after manual merge. · 56fce638
      unknown authored
      
      tests/mysql_client_test.c:
        Fix after manual merge: add test for bug#21206.
      56fce638
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/tmp_merge · 4028d6ea
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-merge
      
      
      configure.in:
        Auto merged
      man/Makefile.am:
        Auto merged
      mysys/my_bitmap.c:
        Auto merged
      scripts/make_binary_distribution.sh:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/sql_locale.cc:
        Auto merged
      support-files/mysql.spec.sh:
        Auto merged
      mysql-test/t/mysqlbinlog.test:
        Manual merge.
      sql/sql_select.cc:
        Manual merge.
      4028d6ea
    • unknown's avatar
      udf_example.c, udf.test, Makefile.am: · 6b6c1724
      unknown authored
        Converted "udf_example.cc" to C, avoids C++ runtime lib dependency (bug#21336)
      
      
      sql/Makefile.am:
        "udf_example.cc" converted to C, avoids C++ runtime lib dependency (bug#21336)
      mysql-test/t/udf.test:
        "udf_example.cc" converted to C, avoids C++ runtime lib dependency (bug#21336)
      sql/udf_example.c:
        Changes to be strict ansi, except long long
      6b6c1724
  5. 28 Jul, 2006 11 commits
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0 · 608d7e92
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-4.1
      
      
      configure.in:
        Auto merged
      scripts/make_binary_distribution.sh:
        Auto merged
      support-files/mysql.spec.sh:
        SCCS merged
      608d7e92
    • unknown's avatar
      Makefile.am, configure.in: · 4f0c394c
      unknown authored
        Man page for mysqld command move to section 8 (bug#21220)
      
      
      configure.in:
        Man page for mysqld command move to section 8 (bug#21220)
      man/Makefile.am:
        Man page for mysqld command move to section 8 (bug#21220)
      4f0c394c
    • unknown's avatar
      make_binary_distribution.sh: · 3423142a
      unknown authored
        Man page for "mysqld" command move to section 8 (bug#21220)
      
      
      scripts/make_binary_distribution.sh:
        Man page for "mysqld" command move to section 8 (bug#21220)
      3423142a
    • unknown's avatar
      mysql.spec.sh: · 00c97fe0
      unknown authored
        Man page for "mysqld" command move to section 8 (bug#21220)
      
      
      support-files/mysql.spec.sh:
        Man page for "mysqld" command move to section 8 (bug#21220)
      00c97fe0
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/tmp_merge · de11a26d
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-5.0-new
      
      
      netware/BUILD/mwasmnlm:
        Auto merged
      netware/BUILD/mwccnlm:
        Auto merged
      netware/BUILD/mwldnlm:
        Auto merged
      de11a26d
    • unknown's avatar
      Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 · 40ea9e3f
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-5.0-new
      
      
      sql/sql_select.cc:
        Auto merged
      40ea9e3f
    • unknown's avatar
      sql_select.cc: · 342ae61d
      unknown authored
        Renamed variable, to avoid name clash with macro "rem_size"
        on AIX 5.3 and "/usr/include/sys/xmem.h" (bug#17648)
      asn.cpp, asn.hpp:
        Avoid name clash with NAME_MAX
      
      
      sql/sql_select.cc:
        Renamed variable, to avoid name clash with macro "rem_size"
        on AIX 5.3 and "/usr/include/sys/xmem.h" (bug#17648)
      extra/yassl/taocrypt/src/asn.cpp:
        Avoid name clash with NAME_MAX
      extra/yassl/taocrypt/include/asn.hpp:
        Avoid name clash with NAME_MAX
      342ae61d
    • unknown's avatar
      Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0 · b0b5fc60
      unknown authored
      into  maint1.mysql.com:/data/localhome/tsmith/bk/global-50
      
      b0b5fc60
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · 9b723bb0
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug16581
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      9b723bb0
    • unknown's avatar
      Bug#16581: deadlock: server and client both read from connection in · c0396709
      unknown authored
                 'conc_sys' test
      
      Concurrent execution of SELECT involing at least two INFORMATION_SCHEMA
      tables, DROP DATABASE statement and DROP TABLE statement could have
      resulted in stalled connection for this SELECT statement.
      
      The problem was that for the first query of a join there was a race
      between select from I_S.TABLES and DROP DATABASE, and the error (no
      such database) was prepared to be send to the client, but the join
      processing was continued.  On second query to I_S.COLUMNS there was a
      race with DROP TABLE, but this error (no such table) was downgraded to
      warning, and thd->net.report_error was reset.  And so neither result
      nor error was sent to the client.
      
      The solution is to stop join processing once it is clear we are going
      to report a error, and also to downgrade to warnings file system errors
      like 'no such database' (unless we are in the 'SHOW' command), because
      I_S is designed not to use locks and the query to I_S should not abort
      if something is dropped in the middle.
      
      No test case is provided since this bug is a result of a race, and is
      timing dependant.  But we test that plain SHOW TABLES and SHOW COLUMNS
      give a error if there is no such database or a table respectively.
      
      
      mysql-test/r/show_check.result:
        Add result for the test that SHOW TABLES and SHOW COLUMNS give a error
        if there is no such database or a table respectively.
      mysql-test/t/show_check.test:
        Add test case that SHOW TABLES and SHOW COLUMNS give a error
        if there is no such database or a table respectively.
      sql/mysql_priv.h:
        Remove prototype of mysql_find_files(), which is made static under
        find_files() name.
      sql/sql_show.cc:
        Rename mysql_find_files() to find_files() and make it static.
        Return FIND_FILES_OK for success, FIND_FILES_OOM for out of memory,
        and FIND_FILES_DIR for directory reading error.
        Downgrade error to warning in get_all_tables() if it is a
        FIND_FILES_DIR error, and we are not in the 'SHOW' command.
        Once 'result' is set to 1 in get_schema_tables_result(), there's no
        need in continuing iterations, as we are about to return a error.
      c0396709
    • unknown's avatar
      Removing temporary changes. · 7c6110d8
      unknown authored
      7c6110d8
  6. 27 Jul, 2006 8 commits
    • unknown's avatar
    • unknown's avatar
      Fix for BUG#20438: CREATE statements for views, stored routines and triggers · a6387500
      unknown authored
      can be not replicable.
      
      Now CREATE statements for writing in the binlog are created as follows:
        - the beginning of the statement is re-created;
        - the rest of the statement is copied from the original query.
      
      The problem appears when there is a version-specific comment (produced by
      mysqldump), started in the re-created part of the statement and closed in the
      copied part -- there is closing comment-parenthesis, but there is no opening
      one.
      
      The proper fix could be to re-create original statement, but we can not
      implement it in 5.0. So, for 5.0 the fix is just to cut closing
      comment-parenthesis. This technique is also used for SHOW CREATE PROCEDURE
      statement (so we are able to reuse existing code).
      
      
      mysql-test/r/rpl_sp.result:
        Updated result file.
      mysql-test/r/rpl_trigger.result:
        Updated result file.
      mysql-test/r/rpl_view.result:
        Updated result file.
      mysql-test/t/rpl_sp.test:
        Added test case for BUG#20438.
      mysql-test/t/rpl_trigger.test:
        Added test case for BUG#20438.
      mysql-test/t/rpl_view.test:
        Added test case for BUG#20438.
      sql/sp.cc:
        Trim comments at the end.
      sql/sp_head.cc:
        Moved this code to the separate function to be re-used.
      sql/sql_lex.cc:
        Added a new function.
      sql/sql_lex.h:
        Added a new function.
      sql/sql_trigger.cc:
        Trim comments at the end.
      sql/sql_view.cc:
        Trim comments at the end.
      a6387500
    • unknown's avatar
      Fix for BUG#16211: Stored function return type for strings is ignored. · 51ce3a0e
      unknown authored
      Fix for BUG#16676: Database CHARSET not used for stored procedures
      
      The problem in BUG#16211 is that CHARSET-clause of the return type for
      stored functions is just ignored.
      
      The problem in BUG#16676 is that if character set is not explicitly
      specified for sp-variable, the server character set is used instead
      of the database one.
      
      The fix has two parts:
      
        - always store CHARSET-clause of the return type along with the
          type definition in mysql.proc.returns column. "Always" means that
          CHARSET-clause is appended even if it has not been explicitly
          specified in CREATE FUNCTION statement (this affects BUG#16211 only).
      
          Storing CHARSET-clause if it is not specified is essential to avoid
          changing character set if the database character set is altered in
          the future.
      
          NOTE: this change is not backward compatible with the previous releases.
      
        - use database default character set if CHARSET-clause is not explicitly
          specified (this affects both BUG#16211 and BUG#16676).
      
          NOTE: this also breaks backward compatibility.
      
      
      mysql-test/r/mysqldump.result:
        Updated result file.
      mysql-test/r/sp.result:
        Updated result file.
      mysql-test/t/sp.test:
        Provided test cases for BUG#16211, BUG#16676.
      sql/mysql_priv.h:
        Added two convenient functions for work with databases.
      sql/sp.cc:
        1. Add CHARSET-clause to CREATE-statement if it has been explicitly specified.
        2. Polishing -- provided some comments.
      sql/sp_head.cc:
        Use database charset as default charset of sp-variable.
      sql/sp_head.h:
        Move init_sp_name() out of init_strings().
      sql/sql_db.cc:
        Two new functions created:
          - load_db_opt_by_name();
          - check_db_dir_existence();
      sql/sql_show.cc:
        Eliminate duplicated code by using
        check_db_dir_existence() and load_db_opt_by_name()
      sql/sql_table.cc:
        Eliminate duplicated code by using
        check_db_dir_existence() and load_db_opt_by_name()
      sql/sql_yacc.yy:
        Call sp_head::init_sp_name() to initialize stored routine name.
      51ce3a0e
    • unknown's avatar
      Don't complain in the error log about IM shutdown unless · f3c93b0f
      unknown authored
      BUG#20761 is fixed.
      
      f3c93b0f
    • unknown's avatar
      Revert the change after null-merge. · 155de819
      unknown authored
      
      mysys/my_bitmap.c:
        Revert the change forced during null-merge.
      155de819
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-release · 646f2216
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-main
      
      
      sql/sql_select.cc:
        Null-merge
      tests/mysql_client_test.c:
        Null-merge
      646f2216
    • unknown's avatar
      BUG#21206: memory corruption when too many cursors are opened at once · 23f3dd1d
      unknown authored
      Too many cursors (more than 1024) could lead to memory corruption.
      This affects both, stored routines and C API cursors, and the
      threshold is per-server, not per-connection.  Similarly, the
      corruption could happen when the server was under heavy load
      (executing more than 1024 simultaneous complex queries), and this is
      the reason why this bug is fixed in 4.1, which doesn't support
      cursors.
      
      The corruption was caused by a bug in the temporary tables code, when
      an attempt to create a table could lead to a write beyond allocated
      space.  Note, that only internal tables were affected (the tables
      created internally by the server to resolve the query), not tables
      created with CREATE TEMPORARY TABLE.  Another pre-condition for the
      bug is TRUE value of --temp-pool startup option, which, however, is a
      default.
      
      The cause of a bug was that random memory was overwritten in
      bitmap_set_next() due to out-of-bound memory access.
      
      
      mysys/my_bitmap.c:
        Local 'bitmap_size' is measured in bytes, no need to multiply it by 8.
      sql/sql_select.cc:
        Clear the temp_pool_slot bit only if we have set it previously.
      tests/mysql_client_test.c:
        Add test case for bug#21206: memory corruption when too many cursors
        are opened at once.
      23f3dd1d
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-release · d4922cff
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-main
      
      
      VC++Files/sql/mysqld.vcproj:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/r/warnings.result:
        Auto merged
      mysql-test/t/warnings-master.opt:
        Auto merged
      mysql-test/t/warnings.test:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      d4922cff
  7. 26 Jul, 2006 3 commits
    • unknown's avatar
      Merge siva.hindu.god:/usr/home/tim/m/bk/global-41 · 05373cfe
      unknown authored
      into  siva.hindu.god:/usr/home/tim/m/bk/global-50
      
      
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      sql/field.cc:
        Auto merged
      05373cfe
    • unknown's avatar
      BUG#21206: memory corruption when too many cursors are opened at once · 3fcef0c7
      unknown authored
      Too many cursors (more than 1024) could lead to memory corruption.
      This affects both, stored routines and C API cursors, and the
      threshold is per-server, not per-connection.  Similarly, the
      corruption could happen when the server was under heavy load
      (executing more than 1024 simultaneous complex queries), and this is
      the reason why this bug is fixed in 4.1, which doesn't support
      cursors.
      
      The corruption was caused by a bug in the temporary tables code, when
      an attempt to create a table could lead to a write beyond allocated
      space.  Note, that only internal tables were affected (the tables
      created internally by the server to resolve the query), not tables
      created with CREATE TEMPORARY TABLE.  Another pre-condition for the
      bug is TRUE value of --temp-pool startup option, which, however, is a
      default.
      
      The cause of a bug was that random memory was overwritten in
      bitmap_set_next() due to out-of-bound memory access.
      
      
      mysys/my_bitmap.c:
        Local 'bitmap_size' is measured in bytes, no need to multiply it by 8.
      sql/sql_select.cc:
        Clear the temp_pool_slot bit only if we have set it previously.
      3fcef0c7
    • unknown's avatar
      Applied innodb-5.0-ss660 snapshot. · 1c65e1f7
      unknown authored
      
      innobase/btr/btr0cur.c:
        Applied innodb-5.0-ss660 snapshot.
         btr_cur_search_to_nth_level(): Reacquire btr_search_latch after
         inserting to the insert buffer. This was noticed while analyzing
         Bug#19081 but this shold not fix this bug since according to
         Heikki, btr_search_latch is not reserved during an insert.
      innobase/ibuf/ibuf0ibuf.c:
        Applied innodb-5.0-ss660 snapshot.
         ibuf_fixed_addr_page(): Add parameter space. As the insert buffer
         B-tree is only located in the system tablespace (space 0),
         IBUF_TREE_ROOT_PAGE_NO is only special in space 0.
      innobase/include/sync0rw.ic:
        Applied innodb-5.0-ss660 snapshot.
         rw_lock_s_unlock_func(): Change a debug assertion to a
         production assertion in order to track down Bug#19081.
      1c65e1f7