1. 02 Aug, 2006 5 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · f3919e92
      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.
      f3919e92
    • unknown's avatar
      Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0 · ed19079c
      unknown authored
      into  lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
      
      
      ed19079c
    • unknown's avatar
      Fix a compilation failiure on QNX · cb6e70a5
      unknown authored
      
      sql/udf_example.c:
        Declare tmp_error at the beginning of the block (this is C now)
      cb6e70a5
    • unknown's avatar
      Bug #21396: Wrong error number generated for a missing table · a29f10e8
      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.
      a29f10e8
    • unknown's avatar
      .del-sp.test.orig: · 53cc83fe
      unknown authored
        Delete: mysql-test/t/sp.test.orig
      
      
      BitKeeper/deleted/.del-sp.test.orig:
        Delete: mysql-test/t/sp.test.orig
      53cc83fe
  2. 01 Aug, 2006 3 commits
    • unknown's avatar
      Applied innodb-5.0-ss677 snapshot. · 75e40b16
      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)
      75e40b16
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0 · edeea349
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
      
      
      edeea349
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge · f3099ba3
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
      
      
      f3099ba3
  3. 31 Jul, 2006 4 commits
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl · 03206fd7
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
      
      
      extra/yassl/src/ssl.cpp:
        Auto merged
      03206fd7
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl · 76f65b3f
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
      
      
      76f65b3f
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · d57c41b7
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-21269
      
      
      d57c41b7
    • unknown's avatar
      Bug#21269 (DEFINER-clause is allowed for UDF-functions) · d251e9be
      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.
      d251e9be
  4. 29 Jul, 2006 6 commits
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1 · 10888499
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-5.0
      
      
      configure.in:
        Auto merged
      10888499
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0 · 66716f09
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-4.1
      
      
      configure.in:
        Auto merged
      66716f09
    • unknown's avatar
      configure.in: · 189a6879
      unknown authored
        Corrected typo
      
      
      configure.in:
        Corrected typo
      189a6879
    • unknown's avatar
      Fix after manual merge. · 1d0f873d
      unknown authored
      
      tests/mysql_client_test.c:
        Fix after manual merge: add test for bug#21206.
      1d0f873d
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/tmp_merge · 74214b86
      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.
      74214b86
    • unknown's avatar
      udf_example.c, udf.test, Makefile.am: · 3c9ba020
      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
      3c9ba020
  5. 28 Jul, 2006 11 commits
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0 · 04d60b38
      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
      04d60b38
    • unknown's avatar
      Makefile.am, configure.in: · d1fde0f7
      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)
      d1fde0f7
    • unknown's avatar
      make_binary_distribution.sh: · 6f65bffe
      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)
      6f65bffe
    • unknown's avatar
      mysql.spec.sh: · a811cc0a
      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)
      a811cc0a
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/tmp_merge · 8c4ba968
      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
      8c4ba968
    • unknown's avatar
      Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 · 77831e75
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-5.0-new
      
      
      sql/sql_select.cc:
        Auto merged
      77831e75
    • unknown's avatar
      sql_select.cc: · 8d73c0b3
      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
      8d73c0b3
    • unknown's avatar
      Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0 · 19860930
      unknown authored
      into  maint1.mysql.com:/data/localhome/tsmith/bk/global-50
      
      
      19860930
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · 918f9a38
      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
      918f9a38
    • unknown's avatar
      Bug#16581: deadlock: server and client both read from connection in · 0abc107c
      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.
      0abc107c
    • unknown's avatar
      Removing temporary changes. · 78e24656
      unknown authored
      78e24656
  6. 27 Jul, 2006 8 commits
    • unknown's avatar
    • unknown's avatar
      Fix for BUG#20438: CREATE statements for views, stored routines and triggers · d36f5781
      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.
      d36f5781
    • unknown's avatar
      Fix for BUG#16211: Stored function return type for strings is ignored. · 3c108584
      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.
      3c108584
    • unknown's avatar
      Don't complain in the error log about IM shutdown unless · 49d721d7
      unknown authored
      BUG#20761 is fixed.
      
      
      49d721d7
    • unknown's avatar
      Revert the change after null-merge. · c4cfa9ab
      unknown authored
      
      mysys/my_bitmap.c:
        Revert the change forced during null-merge.
      c4cfa9ab
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-release · 350cc461
      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
      350cc461
    • unknown's avatar
      BUG#21206: memory corruption when too many cursors are opened at once · 7dbd43b1
      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.
      7dbd43b1
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-release · a6557b0c
      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
      a6557b0c
  7. 26 Jul, 2006 3 commits
    • unknown's avatar
      Merge siva.hindu.god:/usr/home/tim/m/bk/global-41 · b6027291
      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
      b6027291
    • unknown's avatar
      BUG#21206: memory corruption when too many cursors are opened at once · 35945019
      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.
      35945019
    • unknown's avatar
      Applied innodb-5.0-ss660 snapshot. · 820840a0
      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.
      820840a0