MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:February 25 2010 7:46pm
Subject:bzr push into mysql-6.0-codebase branch (alik:2943 to 2965)
View as plain text  
 2965 Alexander Nozdrin	2010-02-25 [merge]
      Fix default.conf.

    modified:
      .bzr-mysql/default.conf
 2964 Vladislav Vaintroub	2010-02-25 [merge]
      merge

    removed:
      mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result
      mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test
    added:
      mysql-test/include/icp_tests.inc
      mysql-test/r/innodb_icp.result
      mysql-test/r/myisam_icp.result
      mysql-test/t/innodb_icp.test
      mysql-test/t/myisam_icp.test
    modified:
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/row/row0sel.c
 2963 Vladislav Vaintroub	2010-02-25 [merge]
      merge

    modified:
      cmake/dtrace.cmake
 2962 Vladislav Vaintroub	2010-02-25 [merge]
      merge

    modified:
      cmake/os/SunOS.cmake
 2961 Vladislav Vaintroub	2010-02-24 [merge]
      merge

    added:
      cmake/cpack_source_ignore_files.cmake
    modified:
      cmake/Makefile.am
      cmake/configure.pl
      cmake/mysql_version.cmake
 2960 Jonathan Perkin	2010-02-24 [merge]
      Merge to mysql-6.0-codebase-bugfixing

    modified:
      CMakeLists.txt
      cmake/build_configurations/mysql_release.cmake
      cmake/install_layout.cmake
      mysql-test/CMakeLists.txt
      sql/CMakeLists.txt
      sql/share/CMakeLists.txt
 2959 Alexander Nozdrin	2010-02-24 [merge]
      Auto-merge from mysql-next-mr-bugfixing.

 2958 Marc Alff	2010-02-24 [merge]
      Null merge from mysql-next-mr-bugfixing

 2957 Vladislav Vaintroub	2010-02-24 [merge]
      null merge

 2956 Vladislav Vaintroub	2010-02-24 [merge]
      null merge

 2955 Vladislav Vaintroub	2010-02-23 [merge]
      merge

    modified:
      libmysqld/lib_sql.cc
 2954 Marc Alff	2010-02-23 [merge]
      Null merge from mysql-next-mr-bugfixing

 2953 Alexander Nozdrin	2010-02-23 [merge]
      Manual merge from mysql-next-mr-bugfixing (mysql-next-4284).
      Conflicts:
        - mysql-test/r/innodb_mysql.result
        - mysql-test/t/innodb_mysql.test

    modified:
      include/atomic/x86-gcc.h
      include/my_atomic.h
      mysql-test/r/innodb_mysql.result
      mysql-test/r/view.result
      mysql-test/t/innodb_mysql.test
      mysql-test/t/view.test
      sql/sql_base.cc
 2952 Alexander Nozdrin	2010-02-23 [merge]
      Auto-merge (empty) from mysql-next-mr-bugfixing.

 2951 Vladislav Vaintroub	2010-02-23
      Reenable windows embedded tests that are fixed now.

    modified:
      mysql-test/collections/default.experimental
 2950 Vladislav Vaintroub	2010-02-23 [merge]
      merge

    modified:
      storage/innobase/handler/ha_innodb.cc
 2949 Vladislav Vaintroub	2010-02-23 [merge]
      merge

    modified:
      mysql-test/include/mtr_warnings.sql
 2948 Vladislav Vaintroub	2010-02-23 [merge]
      merge

    modified:
      cmake/Makefile.am
 2947 Vladislav Vaintroub	2010-02-23 [merge]
      merge Cmake bugfixes

    modified:
      BUILD/choose_configure.sh
      cmake/configure.pl
      mysql-test/lib/v1/mysql-test-run.pl
      mysys/CMakeLists.txt
      scripts/CMakeLists.txt
      sql/item_cmpfunc.cc
      sql/item_func.cc
      sql/mysql_priv.h
      sql/sql_parse.cc
 2946 Jonathan Perkin	2010-02-23 [merge]
      Merge to mysql-6.0-codebase-bugfixing

    modified:
      CMakeLists.txt
 2945 Olav.Sandstaa@sun.com	2010-02-22
      Test case for Bug#49604 6.0 processing compound WHERE clause incorrectly with Innodb - extra rows
      
      The fix for this bug is found in the patch for Bug#48665. This patch adds a test for this bug.
     @ mysql-test/r/innodb_mysql.result
        Result for test for Bug#49604.
     @ mysql-test/t/innodb_mysql.test
        Test case for Bug#49604.

    modified:
      mysql-test/r/innodb_mysql.result
      mysql-test/t/innodb_mysql.test
 2944 Alexander Nozdrin	2010-02-22 [merge]
      Manual merge from mysql-next-mr-bugfixing.
      Conflicts:
        - mysql-test/r/mysqld--help-win.result

    modified:
      mysql-test/r/mysqld--help-win.result
 2943 Alexander Nozdrin	2010-02-22 [merge]
      Manual merge from mysql-6.0-codebase.
      Conflicts:
        - mysql-test/r/mysqld--help-notwin.result
        - mysql-test/r/mysqld--help-win.result

    removed:
      unittest/mysys/CMakeLists.txt
    added:
      BUILD-CMAKE
      BUILD/choose_configure.sh
      cmake/
      cmake/Makefile.am
      cmake/abi_check.cmake
      cmake/bison.cmake
      cmake/build_configurations/
      cmake/build_configurations/mysql_release.cmake
      cmake/cat.cmake
      cmake/character_sets.cmake
      cmake/check_minimal_version.cmake
      cmake/cmake_parse_arguments.cmake
      cmake/configurable_file_content.in
      cmake/configure.pl
      cmake/create_initial_db.cmake.in
      cmake/do_abi_check.cmake
      cmake/dtrace.cmake
      cmake/dtrace_prelink.cmake
      cmake/install_layout.cmake
      cmake/install_macros.cmake
      cmake/libutils.cmake
      cmake/make_dist.cmake.in
      cmake/merge_archives_unix.cmake.in
      cmake/mysql_add_executable.cmake
      cmake/mysql_version.cmake
      cmake/os/
      cmake/os/AIX.cmake
      cmake/os/Cygwin.cmake
      cmake/os/Darwin.cmake
      cmake/os/FreeBSD.cmake
      cmake/os/HP-UX.cmake
      cmake/os/Linux.cmake
      cmake/os/OS400.cmake
      cmake/os/SunOS.cmake
      cmake/os/Windows.cmake
      cmake/os/WindowsCache.cmake
      cmake/package_name.cmake
      cmake/plugin.cmake
      cmake/readline.cmake
      cmake/ssl.cmake
      cmake/stack_direction.c
      cmake/versioninfo.rc.in
      cmake/zlib.cmake
      cmd-line-utils/libedit/CMakeLists.txt
      cmd-line-utils/readline/CMakeLists.txt
      config.h.cmake
      configure.cmake
      include/CMakeLists.txt
      man/CMakeLists.txt
      mysql-test/CMakeLists.txt
      mysql-test/collections/test-bt
      mysql-test/collections/test-bt-debug
      mysql-test/collections/test-bt-debug-fast
      mysql-test/collections/test-bt-fast
      mysql-test/mtr.out-of-source
      plugin/audit_null/CMakeLists.txt
      plugin/daemon_example/CMakeLists.txt
      plugin/fulltext/CMakeLists.txt
      sql-bench/CMakeLists.txt
      sql/main.cc
      sql/share/CMakeLists.txt
      support-files/CMakeLists.txt
      unittest/mysys/CMakeLists.txt
    modified:
      BUILD/Makefile.am
      BUILD/autorun.sh
      CMakeLists.txt
      Makefile.am
      client/CMakeLists.txt
      client/mysqltest.cc
      cmd-line-utils/libedit/Makefile.am
      cmd-line-utils/readline/Makefile.am
      configure.in
      dbug/CMakeLists.txt
      extra/CMakeLists.txt
      extra/yassl/CMakeLists.txt
      extra/yassl/taocrypt/CMakeLists.txt
      include/Makefile.am
      include/keycache.h
      include/my_atomic.h
      include/my_global.h
      include/my_pthread.h
      include/my_sys.h
      include/mysql/plugin.h
      include/thr_alarm.h
      libmysql/CMakeLists.txt
      libmysql/libmysql.def
      libmysqld/CMakeLists.txt
      libmysqld/examples/CMakeLists.txt
      libmysqld/lib_sql.cc
      man/Makefile.am
      mysql-test/Makefile.am
      mysql-test/collections/default.experimental
      mysql-test/include/mysqld--help.inc
      mysql-test/lib/My/ConfigFactory.pm
      mysql-test/lib/My/Find.pm
      mysql-test/lib/My/SafeProcess.pm
      mysql-test/lib/My/SafeProcess/CMakeLists.txt
      mysql-test/lib/My/SafeProcess/safe_kill_win.cc
      mysql-test/lib/My/SafeProcess/safe_process_win.cc
      mysql-test/mysql-test-run.pl
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/suite/parts/r/partition_recover_myisam.result
      mysql-test/suite/parts/r/partition_repair_myisam.result
      mysql-test/suite/parts/t/partition_recover_myisam.test
      mysql-test/suite/parts/t/partition_repair_myisam.test
      mysql-test/suite/sys_vars/r/character_sets_dir_basic.result
      mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
      mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test
      mysql-test/suite/sys_vars/t/shared_memory_basic.test
      mysql-test/t/fulltext_plugin.test
      mysql-test/t/loadxml.test
      mysys/CMakeLists.txt
      mysys/my_create.c
      mysys/my_getsystime.c
      mysys/my_handler.c
      mysys/my_rdtsc.c
      mysys/my_winthread.c
      mysys/mysys_priv.h
      mysys/typelib.c
      plugin/daemon_example/Makefile.am
      plugin/fulltext/Makefile.am
      plugin/semisync/CMakeLists.txt
      regex/CMakeLists.txt
      regex/regex2.h
      scripts/CMakeLists.txt
      scripts/Makefile.am
      scripts/mysqld_safe.sh
      sql-bench/Makefile.am
      sql/CMakeLists.txt*
      sql/Makefile.am
      sql/backup/CMakeLists.txt
      sql/log.cc
      sql/mysqld.cc
      sql/nt_servc.cc
      sql/share/Makefile.am
      sql/sql_builtin.cc.in
      sql/sql_class.h
      storage/Makefile.am
      storage/archive/CMakeLists.txt
      storage/blackhole/CMakeLists.txt
      storage/csv/CMakeLists.txt
      storage/example/CMakeLists.txt
      storage/federated/CMakeLists.txt
      storage/heap/CMakeLists.txt
      storage/ibmdb2i/CMakeLists.txt
      storage/innobase/CMakeLists.txt
      storage/myisam/CMakeLists.txt
      storage/myisammrg/CMakeLists.txt
      storage/perfschema/CMakeLists.txt
      storage/perfschema/pfs_instr.cc
      storage/perfschema/unittest/CMakeLists.txt
      strings/CMakeLists.txt
      support-files/Makefile.am
      tests/CMakeLists.txt
      unittest/mytap/CMakeLists.txt
      unittest/mytap/tap.c
      vio/CMakeLists.txt
      win/configure.js
      win/create_def_file.js
      zlib/CMakeLists.txt
=== modified file 'BUILD/choose_configure.sh'
--- a/BUILD/choose_configure.sh	2009-11-09 11:32:48 +0000
+++ b/BUILD/choose_configure.sh	2010-02-23 11:32:57 +0000
@@ -7,8 +7,8 @@ cmake -P cmake/check_minimal_version.cma
 perl --version >/dev/null 2>&1 || HAVE_CMAKE=no
 if test "$HAVE_CMAKE" = "no"
 then
-  sh ./configure.am $@
+  sh ./configure.am "$@"
 else
-  perl ./cmake/configure.pl $@
+  perl ./cmake/configure.pl "$@"
 fi
 

=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	2010-02-20 01:26:07 +0000
+++ b/CMakeLists.txt	2010-02-24 19:27:59 +0000
@@ -268,7 +268,8 @@ ELSE()
   SET(CPACK_GENERATOR "TGZ")
 ENDIF() 
 INCLUDE(CPack)
-INSTALL(FILES COPYING EXCEPTIONS-CLIENT README DESTINATION ${INSTALL_DOCREADMEDIR})
+INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql DESTINATION ${INSTALL_DOCREADMEDIR} OPTIONAL)
+INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR})
 IF(UNIX)
   INSTALL(FILES Docs/INSTALL-BINARY DESTINATION 
   ${INSTALL_DOCREADMEDIR})
@@ -277,9 +278,10 @@ ENDIF()
 SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied")
 MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION)
 INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR}
+  PATTERN "INSTALL-BINARY" EXCLUDE
   PATTERN "Makefile.*" EXCLUDE
   PATTERN "myisam.txt" EXCLUDE
   PATTERN "glibc*" EXCLUDE
   PATTERN "sp-imp-spec.txt" EXCLUDE
   PATTERN "linuxthreads.txt" EXCLUDE
-)
\ No newline at end of file
+)

=== modified file 'client/client_priv.h'
--- a/client/client_priv.h	2010-02-04 10:55:39 +0000
+++ b/client/client_priv.h	2010-02-17 12:31:51 +0000
@@ -34,7 +34,7 @@
 enum options_client
 {
   OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
-  OPT_PAGER, OPT_NOPAGER, OPT_TEE, OPT_NOTEE,
+  OPT_PAGER, OPT_TEE,
   OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS,
   OPT_DROP, OPT_LOCKS, OPT_KEYWORDS, OPT_DELAYED, OPT_OPTIMIZE,
   OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES,
@@ -48,8 +48,8 @@ enum options_client
   OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
   OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
   OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
-  OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_SERVER_ARG,
-  OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
+  OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG,
+  OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
   OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT,
 #ifdef HAVE_NDBCLUSTER_DB
   OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,

=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2010-02-10 21:11:06 +0000
+++ b/client/mysql.cc	2010-02-20 09:48:54 +0000
@@ -1378,7 +1378,7 @@ static struct my_option my_long_options[
    (uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
    0, 0},
   {"no-auto-rehash", 'A',
-   "No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead.",
+   "No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect.",
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
    {"auto-vertical-output", OPT_AUTO_VERTICAL_OUTPUT,
     "Automatically switch to vertical output mode if the result is wider than the terminal width.",
@@ -1430,9 +1430,6 @@ static struct my_option my_long_options[
    "Enable named commands. Named commands mean this program's internal commands; see mysql> help . When enabled, the named commands can be used from any line of the query, otherwise only from the first line, before an enter. Disable with --disable-named-commands. This option is disabled by default.",
    (uchar**) &named_cmds, (uchar**) &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
    0, 0},
-  {"no-named-commands", 'g',
-   "Named commands are disabled. Use \\* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. WARNING: option deprecated; use --disable-named-commands instead.",
-   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"ignore-spaces", 'i', "Ignore space after function names.",
    (uchar**) &ignore_spaces, (uchar**) &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
    0, 0, 0, 0},
@@ -1454,7 +1451,7 @@ static struct my_option my_long_options[
   {"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
    (uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
    NO_ARG, 1, 0, 0, 0, 0, 0},  
-  {"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG,
+  {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
    NO_ARG, 0, 0, 0, 0, 0, 0},
   {"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered,
    (uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -1462,11 +1459,8 @@ static struct my_option my_long_options[
    (uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL,
    NO_ARG, 1, 0, 0, 0, 0, 0},
   {"skip-column-names", 'N',
-   "Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.",
+   "Don't write column names in results.",
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-  {"set-variable", 'O',
-   "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
-   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C)",
    (uchar**) &opt_sigint_ignore,  (uchar**) &opt_sigint_ignore, 0, GET_BOOL,
    NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -1477,9 +1471,6 @@ static struct my_option my_long_options[
   {"pager", OPT_PAGER,
    "Pager to use to display results. If you don't supply an option the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\\h) also. This option does not work in batch mode. Disable with --disable-pager. This option is disabled by default.",
    0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
-  {"no-pager", OPT_NOPAGER,
-   "Disable pager and print to stdout. See interactive help (\\h) also. WARNING: option deprecated; use --disable-pager instead.",
-   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
 #endif
   {"password", 'p',
    "Password to use when connecting to server. If password is not given it's asked from the tty.",
@@ -1525,8 +1516,6 @@ static struct my_option my_long_options[
   {"tee", OPT_TEE,
    "Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default.",
    0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-  {"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING: option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG,
-   NO_ARG, 0, 0, 0, 0, 0, 0},
 #ifndef DONT_ALLOW_USER_CHANGE
   {"user", 'u', "User for login if not current user.", (uchar**) &current_user,
    (uchar**) &current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1665,11 +1654,6 @@ get_one_option(int optid, const struct m
     else
       init_tee(argument);
     break;
-  case OPT_NOTEE:
-    printf("WARNING: option deprecated; use --disable-tee instead.\n");
-    if (opt_outfile)
-      end_tee();
-    break;
   case OPT_PAGER:
     if (argument == disabled_my_option)
       opt_nopager= 1;
@@ -1688,10 +1672,6 @@ get_one_option(int optid, const struct m
 	opt_nopager= 1;
     }
     break;
-  case OPT_NOPAGER:
-    printf("WARNING: option deprecated; use --disable-pager instead.\n");
-    opt_nopager= 1;
-    break;
   case OPT_MYSQL_PROTOCOL:
 #ifndef EMBEDDED_LIBRARY
     opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,

=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc	2010-02-10 21:11:06 +0000
+++ b/client/mysqlbinlog.cc	2010-02-20 09:48:54 +0000
@@ -1073,11 +1073,6 @@ static struct my_option my_long_options[
    "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
    (uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG,
    0, 0, 0, 0, 0, 0},
-  {"position", 'j', "Deprecated. Use --start-position instead.",
-   (uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
-   REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
-   /* COM_BINLOG_DUMP accepts only 4 bytes for the position */
-   (ulonglong)(~(uint32)0), 0, 0, 0},
   {"protocol", OPT_MYSQL_PROTOCOL,
    "The protocol of connection (tcp,socket,pipe,memory).",
    0, 0, 0, GET_STR,  REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1116,7 +1111,7 @@ static struct my_option my_long_options[
    "(you should probably use quotes for your shell to set it properly).",
    (uchar**) &start_datetime_str, (uchar**) &start_datetime_str,
    0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-  {"start-position", OPT_START_POSITION,
+  {"start-position", 'j',
    "Start reading the binlog at position N. Applies to the first binlog "
    "passed on the command line.",
    (uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,

=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c	2010-02-10 21:11:06 +0000
+++ b/client/mysqldump.c	2010-02-20 09:48:54 +0000
@@ -184,9 +184,6 @@ HASH ignore_table;
 
 static struct my_option my_long_options[] =
 {
-  {"all", 'a', "Deprecated. Use --create-options instead.",
-   (uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
-   0, 0, 0, 0, 0},
   {"all-databases", 'A',
    "Dump all the databases. This will be same as --databases with all databases selected.",
    (uchar**) &opt_alldbs, (uchar**) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
@@ -239,7 +236,7 @@ static struct my_option my_long_options[
   {"compress", 'C', "Use compression in server/client protocol.",
    (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
    0, 0, 0},
-  {"create-options", OPT_CREATE_OPTIONS,
+  {"create-options", 'a',
    "Include all MySQL specific create options.",
    (uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
    0, 0, 0, 0, 0},
@@ -304,9 +301,6 @@ static struct my_option my_long_options[
    (uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
   {"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
    (uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-  {"first-slave", 'x', "Deprecated, renamed to --lock-all-tables.",
-   (uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
-   0, 0, 0, 0, 0, 0},
   {"flush-logs", 'F', "Flush logs file in server before starting dump. "
    "Note that if you dump many databases at once (using the option "
    "--databases= or --all-databases), the logs will be flushed for "
@@ -394,8 +388,7 @@ static struct my_option my_long_options[
    NO_ARG, 0, 0, 0, 0, 0, 0},
   {"no-data", 'd', "No row information.", (uchar**) &opt_no_data,
    (uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-  {"no-set-names", 'N',
-   "Deprecated. Use --skip-set-charset instead.",
+  {"no-set-names", 'N',  "Same as--skip-set-charset.",
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"opt", OPT_OPTIMIZE,
    "Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.",
@@ -433,9 +426,6 @@ static struct my_option my_long_options[
    "Add 'SET NAMES default_character_set' to the output.",
    (uchar**) &opt_set_charset, (uchar**) &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
    0, 0, 0, 0, 0},
-  {"set-variable", 'O',
-   "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
-   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 #ifdef HAVE_SMEM
   {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
    "Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,

=== modified file 'cmake/Makefile.am'
--- a/cmake/Makefile.am	2010-01-29 02:07:00 +0000
+++ b/cmake/Makefile.am	2010-02-24 19:07:05 +0000
@@ -1,5 +1,6 @@
 EXTRA_DIST = \
 	cmake_parse_arguments.cmake \
+	cpack_source_ignore_files.cmake \
 	package_name.cmake \
 	configurable_file_content.in \
 	check_minimal_version.cmake \
@@ -25,7 +26,7 @@ EXTRA_DIST = \
 	mysql_add_executable.cmake  \
 	install_layout.cmake \
 	build_configurations/mysql_release.cmake \
-	os/Windows.cmake \ 
+	os/Windows.cmake \
 	os/WindowsCache.cmake \
 	os/Linux.cmake \
 	os/SunOS.cmake \

=== modified file 'cmake/build_configurations/mysql_release.cmake'
--- a/cmake/build_configurations/mysql_release.cmake	2010-02-02 20:32:38 +0000
+++ b/cmake/build_configurations/mysql_release.cmake	2010-02-24 19:19:24 +0000
@@ -80,6 +80,8 @@ IF(FEATURE_SET)
   ENDFOREACH()
 ENDIF()
 
+SET(WITHOUT_AUDIT_NULL ON CACHE BOOL "")
+SET(WITHOUT_DAEMON_EXAMPLE ON CACHE BOOL "")
 
 OPTION(ENABLE_LOCAL_INFILE "" ON)
 SET(WITH_SSL bundled CACHE STRING "")

=== modified file 'cmake/configure.pl'
--- a/cmake/configure.pl	2010-02-20 13:17:55 +0000
+++ b/cmake/configure.pl	2010-02-24 18:51:45 +0000
@@ -38,12 +38,55 @@ sub set_installdir 
    }
 }
 
+# CMake understands CC and CXX env.variables correctly, if they  contain 1 or 2 tokens
+# e.g CXX=gcc and CXX="ccache gcc" are ok. However it could have a problem if there
+# (recognizing gcc) with more tokens ,e.g CXX="ccache gcc --pipe".
+# The problem is simply fixed by splitting compiler and flags, e.g
+# CXX="ccache gcc --pipe" => CXX=ccache gcc CXXFLAGS=--pipe
+
+sub check_compiler
+{
+  my ($varname, $flagsvarname) = @_;
+  my @tokens = split(/ /,$ENV{$varname});
+  if($#tokens >= 2)  
+  {
+    $ENV{$varname} = $tokens[0]." ".$tokens[1];
+    my $flags;
+
+    for(my $i=2; $i<=$#tokens; $i++)
+    {
+      $flags= $flags." ".$tokens[$i];  
+    }
+    if(defined $ENV{$flagsvarname})
+    {
+      $flags = $flags." ".$ENV{$flagsvarname};
+    }
+    $ENV{$flagsvarname}=$flags;
+    print("$varname=$ENV{$varname}\n");
+    print("$flagsvarname=$ENV{$flagsvarname}\n");
+  }  
+}
+
+check_compiler("CC", "CFLAGS");
+check_compiler("CXX", "CXXFLAGS");
+
 foreach my $option (@ARGV)
 {
-  if (substr ($option, 0, 2) == "--")
+  if (substr ($option, 0, 2) eq "--")
   {
     $option = substr($option, 2);
   }
+  else
+  {
+    # This must be environment variable
+    my @v  = split('=', $option);
+    my $name = shift(@v);
+    if(@v)
+    {
+      $ENV{$name} = join('=', @v);  
+    }	
+    next;
+  }
   if($option =~ /srcdir/)
   {
     $srcdir = substr($option,7);
@@ -87,12 +130,12 @@ foreach my $option (@ARGV)
   }
   if($option =~ /with-ssl=/)
   {
-    $cmakeargs = $cmakeargs." -DWITH_SSL=bundled";
+    $cmakeargs = $cmakeargs." -DWITH_SSL=yes";
     next;
   }
   if($option =~ /with-ssl/)
   {
-    $cmakeargs = $cmakeargs." -DWITH_SSL=yes";
+    $cmakeargs = $cmakeargs." -DWITH_SSL=bundled";
     next;
   }
   if($option =~ /prefix=/)

=== added file 'cmake/cpack_source_ignore_files.cmake'
--- a/cmake/cpack_source_ignore_files.cmake	1970-01-01 00:00:00 +0000
+++ b/cmake/cpack_source_ignore_files.cmake	2010-02-24 19:07:05 +0000
@@ -0,0 +1,40 @@
+SET(CPACK_SOURCE_IGNORE_FILES
+\\\\.bzr/
+\\\\.bzr-mysql
+\\\\.bzrignore
+CMakeCache\\\\.txt
+cmake_dist\\\\.cmake
+CPackSourceConfig\\\\.cmake
+CPackConfig.cmake
+/cmake_install\\\\.cmake
+/CTestTestfile\\\\.cmake
+/CMakeFiles/
+/version_resources/
+/_CPack_Packages/
+$\\\\.gz
+$\\\\.zip
+/CMakeFiles/
+/version_resources/
+/_CPack_Packages/
+scripts/make_binary_distribution$
+scripts/msql2mysql$
+scripts/mysql_config$
+scripts/mysql_convert_table_format$
+scripts/mysql_find_rows$
+scripts/mysql_fix_extensions$
+scripts/mysql_install_db$
+scripts/mysql_secure_installation$
+scripts/mysql_setpermission$
+scripts/mysql_zap$
+scripts/mysqlaccess$
+scripts/mysqld_multi$
+scripts/mysqld_safe$
+scripts/mysqldumpslow$
+scripts/mysqlhotcopy$
+Makefile$
+include/config\\\\.h$
+include/my_config\\\\.h$
+/autom4te\\\\.cache/
+errmsg\\\\.sys$
+#
+)

=== modified file 'cmake/dtrace.cmake'
--- a/cmake/dtrace.cmake	2009-12-24 06:21:05 +0000
+++ b/cmake/dtrace.cmake	2010-02-25 16:31:31 +0000
@@ -72,8 +72,29 @@ IF(ENABLE_DTRACE)
   ) 
 ENDIF()
 
+IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCXX
+  AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+  IF(NOT DEFINED BUGGY_GCC_NO_DTRACE_MODULES)
+    EXECUTE_PROCESS(
+      COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}  --version
+      OUTPUT_VARIABLE out)
+    IF(out MATCHES "3.4.6")
+     # This gcc causes crashes in dlopen() for dtraced shared libs,
+     # while standard shipped with Solaris10 3.4.3 is ok
+     SET(BUGGY_GCC_NO_DTRACE_MODULES 1 CACHE INTERNAL "")
+    ELSE()
+     SET(BUGGY_GCC_NO_DTRACE_MODULES 0 CACHE INTERNAL "")
+    ENDIF()
+  ENDIF()
+ENDIF()
 
-MACRO(DTRACE_INSTRUMENT target)
+FUNCTION(DTRACE_INSTRUMENT target)
+  IF(BUGGY_GCC_NO_DTRACE_MODULES)
+    GET_TARGET_PROPERTY(target_type ${target} TYPE)
+    IF(target_type MATCHES "MODULE_LIBRARY")
+      RETURN()
+    ENDIF()
+  ENDIF()
   IF(ENABLE_DTRACE)
     ADD_DEPENDENCIES(${target} gen_dtrace_header)
 
@@ -119,7 +140,7 @@ MACRO(DTRACE_INSTRUMENT target)
       ENDIF()
     ENDIF()
   ENDIF()
-ENDMACRO()
+ENDFUNCTION()
 
 
 # Ugly workaround for Solaris' DTrace inability to use probes

=== modified file 'cmake/install_layout.cmake'
--- a/cmake/install_layout.cmake	2010-01-25 12:12:29 +0000
+++ b/cmake/install_layout.cmake	2010-02-24 19:19:24 +0000
@@ -80,7 +80,7 @@ ENDIF()
  SET(INSTALL_LIBDIR_STANDALONE "lib")
  SET(INSTALL_INCLUDEDIR_STANDALONE "include")
  SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
- SET(INSTALL_DOCDIR_STANDALONE "doc")
+ SET(INSTALL_DOCDIR_STANDALONE "docs")
  SET(INSTALL_MANDIR_STANDALONE "man")
  SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
  SET(INSTALL_SHAREDIR_STANDALONE "share")

=== modified file 'cmake/mysql_version.cmake'
--- a/cmake/mysql_version.cmake	2010-02-06 17:09:51 +0000
+++ b/cmake/mysql_version.cmake	2010-02-24 19:21:43 +0000
@@ -108,17 +108,7 @@ IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
 ENDIF()
 SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc")
 SET(CPACK_SOURCE_GENERATOR "TGZ")
-SET(CPACK_SOURCE_IGNORE_FILES 
-  \\\\.bzr/
-  \\\\.bzr-mysql
-  .bzrignore
-  CMakeCache.txt
-  /CMakeFiles/
-  /version_resources/
-  /_CPack_Packages/
-  $.gz
-  $.zip
-)
+INCLUDE(cpack_source_ignore_files)
 
 # Defintions for windows version resources
 SET(PRODUCTNAME "MySQL Server")

=== modified file 'cmake/os/SunOS.cmake'
--- a/cmake/os/SunOS.cmake	2010-01-27 00:50:19 +0000
+++ b/cmake/os/SunOS.cmake	2010-02-25 09:57:23 +0000
@@ -30,7 +30,7 @@ SET(LIBM m)
 
 # CMake defined -lthread as thread flag. This crashes in dlopen 
 # when trying to load plugins workaround with -lpthread
-SET(CMAKE_THREADS_LIBS_INIT -lpthread CACHE INTERNAL "")
+SET(CMAKE_THREADS_LIBS_INIT -lpthread CACHE INTERNAL "" FORCE)
 
 # Solaris specific large page support
 CHECK_SYMBOL_EXISTS(MHA_MAPSIZE_VA sys/mman.h  HAVE_DECL_MHA_MAPSIZE_VA)

=== modified file 'configure.in'
--- a/configure.in	2010-02-21 20:44:44 +0000
+++ b/configure.in	2010-02-22 13:28:44 +0000
@@ -844,7 +844,7 @@ AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h fpu_control.h ieeefp.h \
- limits.h memory.h pwd.h select.h \
+ limits.h memory.h pwd.h select.h poll.h \
  stdlib.h stddef.h sys/fpu.h sys/stat.h fnmatch.h \
  strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
  sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \

=== modified file 'include/atomic/x86-gcc.h'
--- a/include/atomic/x86-gcc.h	2009-12-21 13:10:38 +0000
+++ b/include/atomic/x86-gcc.h	2010-02-23 15:56:07 +0000
@@ -88,7 +88,7 @@
 */
 #define make_atomic_add_body64                                  \
   int64 tmp=*a;                                                 \
-  while (!my_atomic_cas64(a, &tmp, tmp+v));                     \
+  while (!my_atomic_cas64(a, &tmp, tmp+v)) ;                    \
   v=tmp;
 
 /*

=== modified file 'include/my_atomic.h'
--- a/include/my_atomic.h	2010-02-04 20:16:40 +0000
+++ b/include/my_atomic.h	2010-02-23 15:56:07 +0000
@@ -77,13 +77,13 @@
 #ifndef make_atomic_add_body
 #define make_atomic_add_body(S)                                 \
   int ## S tmp=*a;                                              \
-  while (!my_atomic_cas ## S(a, &tmp, tmp+v));                  \
+  while (!my_atomic_cas ## S(a, &tmp, tmp+v)) ;                 \
   v=tmp;
 #endif
 #ifndef make_atomic_fas_body
 #define make_atomic_fas_body(S)                                 \
   int ## S tmp=*a;                                              \
-  while (!my_atomic_cas ## S(a, &tmp, v));                      \
+  while (!my_atomic_cas ## S(a, &tmp, v)) ;                     \
   v=tmp;
 #endif
 #ifndef make_atomic_load_body

=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc	2010-02-06 17:09:51 +0000
+++ b/libmysqld/lib_sql.cc	2010-02-23 20:03:54 +0000
@@ -118,6 +118,7 @@ emb_advanced_command(MYSQL *mysql, enum 
   net_clear_error(net);
   thd->current_stmt= stmt;
 
+  thd->thread_stack= (char*) &thd;
   thd->store_globals();				// Fix if more than one connect
   /* 
      We have to call free_old_query before we start to fill mysql->fields 

=== modified file 'mysql-test/CMakeLists.txt'
--- a/mysql-test/CMakeLists.txt	2010-01-24 15:23:16 +0000
+++ b/mysql-test/CMakeLists.txt	2010-02-24 19:19:24 +0000
@@ -23,6 +23,7 @@ INSTALL(
  PATTERN "mtr.out*" EXCLUDE
  PATTERN ".cvsignore" EXCLUDE
  PATTERN "*.am" EXCLUDE
+ PATTERN "*.in" EXCLUDE
 )
 
 

=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2010-02-22 11:44:59 +0000
+++ b/mysql-test/collections/default.experimental	2010-02-23 14:49:52 +0000
@@ -9,7 +9,6 @@ funcs_1.myisam_views @solaris           
 innodb.innodb_information_schema         # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
 
 main.archive                             # Bug#47660 2009-09-27 alik main.archive fails sporadically
-main.bug46760 @windows                   # Bug#51384 2010-02-22 alik Test bug46760 fails on embedded/Windows. The patch will come from -bugfixing.
 main.ctype_gbk_binlog  @solaris          # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
 main.information_schema                  # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
 main.innodb-autoinc*                     # Bug#47809 2009-10-04 joro innodb-autoinc.test fails with valgrind errors with the innodb plugin
@@ -22,7 +21,6 @@ main.plugin*  @solaris                  
 main.plugin_notembedded                  # Bug#47662 2009-09-27 alik main.plugin_notembedded fails sporadically in pb2
 main.signal_demo3 @solaris               # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
 main.sp @solaris                         # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
-main.sp-error @windows                   # Bug#43201 2010-02-22 alik sp-error.test fails on Windows debug build in embedded mode. The patch will come from -bugfixing.
 main.truncate_coverage                   # Bug#46785 2009-08-18 alik main.truncate_coverage fails sporadically
 
 main.subselect_sj2 @solaris              # Bug#47791 2010-02-16 alik Several test cases fail on Solaris with error Thread stack overrun

=== modified file 'mysql-test/include/cleanup_fake_relay_log.inc'
--- a/mysql-test/include/cleanup_fake_relay_log.inc	2008-12-29 16:04:10 +0000
+++ b/mysql-test/include/cleanup_fake_relay_log.inc	2010-02-19 19:37:23 +0000
@@ -8,9 +8,10 @@
 
 --echo Cleaning up after setup_fake_relay_log.inc
 
-# Remove files.
-remove_file $_fake_relay_log;
-remove_file $_fake_relay_index;
 --disable_query_log
+--disable_warnings
+STOP SLAVE SQL_THREAD;
+RESET SLAVE;
 eval SET @@global.relay_log_purge= $_fake_relay_log_purge;
+--enable_warnings
 --enable_query_log

=== modified file 'mysql-test/include/default_mysqld.cnf'
--- a/mysql-test/include/default_mysqld.cnf	2010-02-05 15:19:43 +0000
+++ b/mysql-test/include/default_mysqld.cnf	2010-02-17 10:00:21 +0000
@@ -17,7 +17,7 @@
 [mysqld]
 open-files-limit=           1024
 local-infile
-default-character-set=      latin1
+character-set-server=      latin1
 
 # Increase default connect_timeout to avoid intermittent
 # disconnects when test servers are put under load see BUG#28359

=== added file 'mysql-test/include/icp_tests.inc'
--- a/mysql-test/include/icp_tests.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/icp_tests.inc	2010-02-25 12:55:31 +0000
@@ -0,0 +1,57 @@
+--echo #
+--echo # Bug#36981 - "innodb crash when selecting for update"
+--echo #
+
+#
+# Test 1: Test based on the reproduction test case for this bug.
+#         This query resulted in a crash in InnoDB due to
+#         InnoDB changing from using the index which the push condition
+#         where for to use the clustered index due to "SELECT ... FOR UPDATE".
+#
+
+CREATE TABLE t1 (
+  c1 CHAR(1),
+  c2 CHAR(10),
+  KEY (c1)
+);
+
+INSERT INTO t1 VALUES ('3', null);
+
+SELECT * FROM t1 WHERE c1='3' FOR UPDATE;
+
+DROP TABLE t1;
+
+#
+# Test 2: Extended test case to test that the correct rows are returned.
+#         This test is for ensuring that if InnoDB refuses to accept
+#         the pushed index condition it is still evaluated.
+#         
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+CREATE TABLE t2 (a INT);
+INSERT INTO t2 SELECT A.a + 10*(B.a + 10*C.a) FROM t1 A, t1 B, t1 C;
+
+CREATE TABLE t3 (
+  c1 CHAR(10) NOT NULL,
+  c2 CHAR(10) NOT NULL,
+  c3 CHAR(200) NOT NULL,
+  KEY (c1)
+);
+
+INSERT INTO t3 
+  SELECT CONCAT('c-',1000+t2.a,'=w'), CONCAT('c-',1000+ t2.a,'=w'), 'filler'
+  FROM t2;
+
+INSERT INTO t3 
+  SELECT CONCAT('c-',1000+t2.a,'=w'), CONCAT('c-',2000+t2.a,'=w'), 'filler-1'
+  FROM t2;
+ 
+INSERT INTO t3
+  SELECT CONCAT('c-',1000+t2.a,'=w'), CONCAT('c-',3000+t2.a,'=w'), 'filler-2'
+  FROM t2;
+
+SELECT c1,c3 FROM t3 WHERE c1 >= 'c-1994=w' and c1 != 'c-1996=w' FOR UPDATE;
+
+DROP TABLE t1,t2,t3;

=== modified file 'mysql-test/include/mtr_warnings.sql'
--- a/mysql-test/include/mtr_warnings.sql	2010-02-16 20:18:16 +0000
+++ b/mysql-test/include/mtr_warnings.sql	2010-02-23 13:19:26 +0000
@@ -202,6 +202,8 @@ INSERT INTO global_suppressions VALUES
  ("==[0-9]*== For more details"),
  /* This comes with innodb plugin tests */
  ("==[0-9]*== Warning: set address range perms: large range"),
+ /* valgrind-3.5.0 dumps this */
+ ("==[0-9]*== Command: "),
 
  /* valgrind warnings: invalid file descriptor -1 in syscall
     write()/read(). Bug #50414 */

=== modified file 'mysql-test/include/setup_fake_relay_log.inc'
--- a/mysql-test/include/setup_fake_relay_log.inc	2010-02-04 10:55:39 +0000
+++ b/mysql-test/include/setup_fake_relay_log.inc	2010-02-16 19:44:13 +0000
@@ -66,8 +66,16 @@ let $_fake_relay_index= $MYSQLD_DATADIR/
 # CHANGE MASTER modifies it (see the manual for CHANGE MASTER).
 let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`;
 
+# Reset slave and remove relay log and index files if they exist
+RESET SLAVE;
+error 0,1;
+remove_file $MYSQLD_DATADIR/$_fake_filename.000001;
+error 0,1;
+remove_file $MYSQLD_DATADIR/$_fake_filename.index;
+
 # Create relay log file.
 copy_file $fake_relay_log $_fake_relay_log;
+
 # Create relay log index.
 
 # After patch for BUG#12190, the filename used in CHANGE MASTER
@@ -77,28 +85,12 @@ copy_file $fake_relay_log $_fake_relay_l
 
 if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`)
 {
-  -- let $_index_entry= ./$_fake_filename-fake.000001
+  eval select './$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index';
 }
 
 if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`)
 {
-  -- let $_index_entry= .\\\\$_fake_filename-fake.000001
-}
-
-if (`SELECT LENGTH(@@secure_file_priv) > 0`)
-{
-  -- let $_file_priv_dir= `SELECT @@secure_file_priv`;
-  -- let $_suffix= `SELECT UUID()`
-  -- let $_tmp_file= $_file_priv_dir/fake-index.$_suffix
-
-  -- eval select '$_index_entry\n' into dumpfile '$_tmp_file'
-  -- copy_file $_tmp_file $_fake_relay_index
-  -- remove_file $_tmp_file
-}
-
-if (`SELECT LENGTH(@@secure_file_priv) = 0`)
-{
-  -- eval select '$_index_entry\n' into dumpfile '$_fake_relay_index'
+  eval select '.\\\\$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index';
 }
 
 # Setup replication from existing relay log.

=== modified file 'mysql-test/lib/v1/mysql-test-run.pl'
--- a/mysql-test/lib/v1/mysql-test-run.pl	2010-02-07 14:15:26 +0000
+++ b/mysql-test/lib/v1/mysql-test-run.pl	2010-02-23 13:21:49 +0000
@@ -805,7 +805,7 @@ sub command_line_setup () {
                                     "$glob_basedir/sql/share",
                                     "$glob_basedir/share");
 
-  $path_language=      mtr_path_exists("$path_share/english");
+  $path_language=      mtr_path_exists("$path_share");
   $path_charsetsdir=   mtr_path_exists("$path_share/charsets");
 
 
@@ -1468,7 +1468,7 @@ sub collect_mysqld_features () {
   #
   # --datadir must exist, mysqld will chdir into it
   #
-  my $list= `$exe_mysqld --no-defaults --datadir=$tmpdir --language=$path_language --skip-grant-tables --verbose --help`;
+  my $list= `$exe_mysqld --no-defaults --datadir=$tmpdir --lc-messages-dir=$path_language --skip-grant-tables --verbose --help`;
 
   foreach my $line (split('\n', $list))
   {
@@ -1810,7 +1810,7 @@ sub mysql_client_test_arguments()
   if ( $glob_use_embedded_server )
   {
     mtr_add_arg($args,
-      " -A --language=$path_language");
+      " -A --lc-messages-dir=$path_language");
     mtr_add_arg($args,

       " -A --datadir=$slave->[0]->{'path_myddir'}");
     mtr_add_arg($args,
@@ -3147,7 +3147,7 @@ sub install_db ($$) {
 
   if ( ! $glob_netware )
   {
-    mtr_add_arg($args, "--language=%s", $path_language);
+    mtr_add_arg($args, "--lc-messages-dir=%s", $path_language);
     mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
   }
 
@@ -3272,10 +3272,10 @@ socket              = $instance->{path_s
 pid-file            = $instance->{path_pid}
 port                = $instance->{port}
 datadir             = $instance->{path_datadir}
+lc-messages-dir     = $path_language
 log                 = $instance->{path_datadir}/mysqld$server_id.log
 log-error           = $instance->{path_datadir}/mysqld$server_id.err.log
 log-slow-queries    = $instance->{path_datadir}/mysqld$server_id.slow.log
-language            = $path_language
 character-sets-dir  = $path_charsetsdir
 basedir             = $path_my_basedir
 server_id           = $server_id
@@ -3592,7 +3592,7 @@ sub run_testcase ($) {
   {
     mtr_timer_stop_all($glob_timers);
     mtr_report("\nServers started, exiting");
-    if ($glob_win32_perl)
+    if ($glob_win32_perl)
     {
       #ActiveState perl hangs  when using normal exit, use  POSIX::_exit instead
       use POSIX qw[ _exit ]; 
@@ -3882,8 +3882,8 @@ sub mysqld_arguments ($$$$) {
     mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
   }
 
-  mtr_add_arg($args, "%s--default-character-set=latin1", $prefix);
-  mtr_add_arg($args, "%s--language=%s", $prefix, $path_language);
+  mtr_add_arg($args, "%s--character-set-server=latin1", $prefix);
+  mtr_add_arg($args, "%s--lc-messages-dir=%s", $prefix, $path_language);
   mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix);
 
   # Increase default connect_timeout to avoid intermittent

=== modified file 'mysql-test/r/func_time.result'
--- a/mysql-test/r/func_time.result	2010-02-04 10:55:39 +0000
+++ b/mysql-test/r/func_time.result	2010-02-17 10:00:21 +0000
@@ -1265,12 +1265,6 @@ DATE_ADD(20071108,         INTERVAL 1 DA
 select LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND;
 LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND
 2007-12-30 23:59:59
-SELECT TIMESTAMPADD(MICROSECOND, 1, '2008-02-18');
-TIMESTAMPADD(MICROSECOND, 1, '2008-02-18')
-2008-02-18 00:00:00.000001
-SELECT TIMESTAMPDIFF(MICROSECOND, '2008-02-17', '2008-02-18');
-TIMESTAMPDIFF(MICROSECOND, '2008-02-17', '2008-02-18')
-86400000000
 select date_add('1000-01-01 00:00:00', interval '1.03:02:01.05' day_microsecond);
 date_add('1000-01-01 00:00:00', interval '1.03:02:01.05' day_microsecond)
 1000-01-02 03:02:01.050000

=== added file 'mysql-test/r/innodb_icp.result'
--- a/mysql-test/r/innodb_icp.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/innodb_icp.result	2010-02-25 12:55:31 +0000
@@ -0,0 +1,54 @@
+set session debug="+d,optimizer_innodb_icp";
+set @save_storage_engine= @@storage_engine;
+set storage_engine=InnoDB;
+#
+# Bug#36981 - "innodb crash when selecting for update"
+#
+CREATE TABLE t1 (
+c1 CHAR(1),
+c2 CHAR(10),

+KEY (c1)
+);
+INSERT INTO t1 VALUES ('3', null);
+SELECT * FROM t1 WHERE c1='3' FOR UPDATE;
+c1	c2
+3	NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+CREATE TABLE t2 (a INT);
+INSERT INTO t2 SELECT A.a + 10*(B.a + 10*C.a) FROM t1 A, t1 B, t1 C;
+CREATE TABLE t3 (
+c1 CHAR(10) NOT NULL,
+c2 CHAR(10) NOT NULL,
+c3 CHAR(200) NOT NULL,
+KEY (c1)
+);
+INSERT INTO t3 
+SELECT CONCAT('c-',1000+t2.a,'=w'), CONCAT('c-',1000+ t2.a,'=w'), 'filler'
+  FROM t2;
+INSERT INTO t3 
+SELECT CONCAT('c-',1000+t2.a,'=w'), CONCAT('c-',2000+t2.a,'=w'), 'filler-1'
+  FROM t2;
+INSERT INTO t3
+SELECT CONCAT('c-',1000+t2.a,'=w'), CONCAT('c-',3000+t2.a,'=w'), 'filler-2'
+  FROM t2;
+SELECT c1,c3 FROM t3 WHERE c1 >= 'c-1994=w' and c1 != 'c-1996=w' FOR UPDATE;
+c1	c3
+c-1994=w	filler
+c-1994=w	filler-1
+c-1994=w	filler-2
+c-1995=w	filler
+c-1995=w	filler-1
+c-1995=w	filler-2
+c-1997=w	filler
+c-1997=w	filler-1
+c-1997=w	filler-2
+c-1998=w	filler
+c-1998=w	filler-1
+c-1998=w	filler-2
+c-1999=w	filler
+c-1999=w	filler-1
+c-1999=w	filler-2
+DROP TABLE t1,t2,t3;
+set storage_engine= @save_storage_engine;

=== modified file 'mysql-test/r/innodb_mysql.result'
--- a/mysql-test/r/innodb_mysql.result	2010-02-15 11:50:06 +0000
+++ b/mysql-test/r/innodb_mysql.result	2010-02-23 15:56:07 +0000
@@ -2400,4 +2400,61 @@ WHERE t2.v IN ('a') AND t2.pk IS NULL  
 ORDER BY t2.pk;
 pk
 DROP TABLE t1,t2;
+#
+# Bug#49604 "6.0 processing compound WHERE clause incorrectly 
+#            with Innodb - extra rows"
+#
+CREATE TABLE t1 (
+c1 INT NOT NULL,
+c2 INT,
+PRIMARY KEY (c1),
+KEY k1 (c2)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (12,1);
+INSERT INTO t1 VALUES (15,1);
+INSERT INTO t1 VALUES (16,1);
+INSERT INTO t1 VALUES (22,1);
+INSERT INTO t1 VALUES (20,2);
+CREATE TABLE t2 (
+c1 INT NOT NULL,
+c2 INT,
+PRIMARY KEY (c1)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1,2);
+INSERT INTO t2 VALUES (2,9);
+SELECT STRAIGHT_JOIN t2.c2, t1.c2, t2.c1
+FROM t1 JOIN t2 ON t1.c2 = t2.c1  
+WHERE t2.c1 IN (2, 1, 6) OR t2.c1 NOT IN (1);
+c2	c2	c1
+2	1	1
+2	1	1
+2	1	1
+2	1	1
+9	2	2
+DROP TABLE t1, t2;
+#
+# Bug#44613 SELECT statement inside FUNCTION takes a shared lock
+#
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+CREATE TABLE t1(x INT PRIMARY KEY, y INT) ENGINE=innodb;
+INSERT INTO t1 VALUES (1, 0), (2, 0);
+CREATE FUNCTION f1(z INT) RETURNS INT READS SQL DATA
+RETURN (SELECT x FROM t1 WHERE x = z);
+# Connection default
+START TRANSACTION;
+SELECT f1(1);
+f1(1)
+1
+# Connection con2
+START TRANSACTION;
+SELECT f1(1);
+f1(1)
+1
+UPDATE t1 SET y = 1 WHERE x = 1;
+COMMIT;
+# Connection default
+COMMIT;
+DROP TABLE t1;
+DROP FUNCTION f1;
 End of 6.0 tests

=== modified file 'mysql-test/r/locale.result'
--- a/mysql-test/r/locale.result	2009-11-09 10:27:46 +0000
+++ b/mysql-test/r/locale.result	2010-02-17 10:00:21 +0000
@@ -79,7 +79,7 @@ DROP TABLE t1;
 #
 SET lc_messages=sr_YU;
 Warnings:
-Warning	1287	'sr_YU' is deprecated; use 'sr_RS' instead
+Warning	1287	'sr_YU' is deprecated and will be removed in a future release. Please use sr_RS instead
 SHOW VARIABLES LIKE 'lc_messages';
 Variable_name	Value
 lc_messages	sr_RS

=== added file 'mysql-test/r/myisam_icp.result'
--- a/mysql-test/r/myisam_icp.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/myisam_icp.result	2010-02-25 12:55:31 +0000
@@ -0,0 +1,50 @@
+#
+# Bug#36981 - "innodb crash when selecting for update"
+#
+CREATE TABLE t1 (
+c1 CHAR(1),
+c2 CHAR(10),
+KEY (c1)
+);
+INSERT INTO t1 VALUES ('3', null);
+SELECT * FROM t1 WHERE c1='3' FOR UPDATE;
+c1	c2
+3	NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+CREATE TABLE t2 (a INT);
+INSERT INTO t2 SELECT A.a + 10*(B.a + 10*C.a) FROM t1 A, t1 B, t1 C;
+CREATE TABLE t3 (
+c1 CHAR(10) NOT NULL,
+c2 CHAR(10) NOT NULL,
+c3 CHAR(200) NOT NULL,
+KEY (c1)
+);
+INSERT INTO t3 
+SELECT CONCAT('c-',1000+t2.a,'=w'), CONCAT('c-',1000+ t2.a,'=w'), 'filler'
+  FROM t2;
+INSERT INTO t3 
+SELECT CONCAT('c-',1000+t2.a,'=w'), CONCAT('c-',2000+t2.a,'=w'), 'filler-1'
+  FROM t2;
+INSERT INTO t3
+SELECT CONCAT('c-',1000+t2.a,'=w'), CONCAT('c-',3000+t2.a,'=w'), 'filler-2'
+  FROM t2;
+SELECT c1,c3 FROM t3 WHERE c1 >= 'c-1994=w' and c1 != 'c-1996=w' FOR UPDATE;
+c1	c3
+c-1994=w	filler
+c-1995=w	filler
+c-1997=w	filler
+c-1998=w	filler
+c-1999=w	filler
+c-1994=w	filler-1
+c-1995=w	filler-1
+c-1997=w	filler-1
+c-1998=w	filler-1
+c-1999=w	filler-1
+c-1994=w	filler-2
+c-1995=w	filler-2
+c-1997=w	filler-2
+c-1998=w	filler-2
+c-1999=w	filler-2
+DROP TABLE t1,t2,t3;

=== modified file 'mysql-test/r/mysqlbinlog.result'
--- a/mysql-test/r/mysqlbinlog.result	2010-02-04 10:55:39 +0000
+++ b/mysql-test/r/mysqlbinlog.result	2010-02-17 10:00:21 +0000
@@ -187,7 +187,7 @@ DELIMITER ;
 ROLLBACK /* added by mysqlbinlog */;
 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
---- --position --
+--- --start-position --
 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 DELIMITER /*!*/;
@@ -388,7 +388,7 @@ DELIMITER ;
 ROLLBACK /* added by mysqlbinlog */;
 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
---- --position --
+--- --start-position --
 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 DELIMITER /*!*/;

=== modified file 'mysql-test/r/mysqld--help-notwin.result'
--- a/mysql-test/r/mysqld--help-notwin.result	2010-02-20 11:08:15 +0000
+++ b/mysql-test/r/mysqld--help-notwin.result	2010-02-22 13:28:44 +0000
@@ -113,9 +113,6 @@ The following options may be given as th
  --date-format=name  The DATE format (ignored)
  --datetime-format=name 
  The DATETIME format (ignored)
- -C, --default-character-set=name 
- Set the default character set (deprecated option, use
- --character-set-server instead).
  --default-storage-engine=name 
  The default storage engine for new tables
  --default-time-zone=name 
@@ -252,10 +249,6 @@ The following options may be given as th
  can safely set this to TRUE
  --log-error[=name]  Error log file
  --log-isam[=name]   Log all MyISAM changes to file.
- -0, --log-long-format 
- Log some extra information to update log. Please note
- that this option is deprecated; see --log-short-format
- option.
  --log-output=name   Syntax: log-output=value[,value...], where "value" could
  be TABLE, FILE or NONE
  --log-queries-not-using-indexes 
@@ -791,7 +784,6 @@ connect-timeout 10
 console FALSE
 date-format %Y-%m-%d
 datetime-format %Y-%m-%d %H:%i:%s
-default-character-set latin1
 default-storage-engine MyISAM
 default-time-zone (No default value)
 default-week-format 0

=== modified file 'mysql-test/r/mysqld--help-win.result'
--- a/mysql-test/r/mysqld--help-win.result	2010-02-20 11:08:15 +0000
+++ b/mysql-test/r/mysqld--help-win.result	2010-02-22 13:28:44 +0000
@@ -113,9 +113,6 @@ The following options may be given as th
  --date-format=name  The DATE format (ignored)
  --datetime-format=name 
  The DATETIME format (ignored)
- -C, --default-character-set=name 
- Set the default character set (deprecated option, use
- --character-set-server instead).
  --default-storage-engine=name 
  The default storage engine for new tables
  --default-time-zone=name 
@@ -251,10 +248,6 @@ The following options may be given as th
  can safely set this to TRUE
  --log-error[=name]  Error log file
  --log-isam[=name]   Log all MyISAM changes to file.
- -0, --log-long-format 
- Log some extra information to update log. Please note
- that this option is deprecated; see --log-short-format
- option.
  --log-output=name   Syntax: log-output=value[,value...], where "value" could
  be TABLE, FILE or NONE
  --log-queries-not-using-indexes 
@@ -795,7 +788,6 @@ connect-timeout 10
 console FALSE
 date-format %Y-%m-%d
 datetime-format %Y-%m-%d %H:%i:%s
-default-character-set latin1
 default-storage-engine MyISAM
 default-time-zone (No default value)
 default-week-format 0

=== modified file 'mysql-test/r/view.result'
--- a/mysql-test/r/view.result	2010-02-21 18:25:29 +0000
+++ b/mysql-test/r/view.result	2010-02-23 18:47:51 +0000
@@ -4034,3 +4034,36 @@ CREATE VIEW t2 AS SELECT * FROM t1;
 ERROR HY000: Can't execute the query because you have a conflicting read lock
 UNLOCK TABLES;
 DROP TABLE t1, t2;
+#
+# Bug#48315 Metadata lock is not taken for merged views that
+#           use an INFORMATION_SCHEMA table
+#
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP PROCEDURE IF EXISTS p1;
+# Connection default
+CREATE VIEW v1 AS SELECT schema_name FROM information_schema.schemata;
+CREATE TABLE t1 (str VARCHAR(50));
+CREATE PROCEDURE p1() INSERT INTO t1 SELECT * FROM v1;
+# CALL p1() so the view is merged.
+CALL p1();
+# Connection 3
+LOCK TABLE t1 READ;
+# Connection default
+# Try to CALL p1() again, this time it should block for t1.
+# Sending:
+CALL p1();
+# Connection 2
+# ... then try to drop the view. This should block.
+# Sending:
+DROP VIEW v1;
+# Connection 3
+# Now allow CALL p1() to complete
+UNLOCK TABLES;
+# Connection default
+# Reaping: CALL p1()
+# Connection 2
+# Reaping: DROP VIEW v1
+# Connection default
+DROP PROCEDURE p1;
+DROP TABLE t1;

=== removed file 'mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result'
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result	2009-10-09 19:45:32 +0000
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result	1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-create table `t1` (`c1` char(1) default null,`c2` char(10) default null,
-key (`c1`))
-engine=innodb default charset=latin1;
-insert into `t1` values ('3',null);
-select * from `t1` where `c1`='3' for update;
-c1	c2
-3	NULL
-drop table `t1`;

=== removed file 'mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test'
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test	2009-10-09 19:45:32 +0000
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test	1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-# test for BUG#36981 "innodb crash when selecting for update"
-
---source include/have_debug.inc
---source include/have_innodb.inc
-
-# crash requires this
-set session debug="+d,optimizer_innodb_icp";
-
-create table `t1` (`c1` char(1) default null,`c2` char(10) default null,
-key (`c1`))
-engine=innodb default charset=latin1;
-insert into `t1` values ('3',null);
-select * from `t1` where `c1`='3' for update;
-drop table `t1`;

=== renamed file 'mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result' => 'mysql-test/suite/rpl/r/rpl_binlog_auto_inc_bug33029.result'
--- a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result	2009-03-06 18:19:29 +0000
+++ b/mysql-test/suite/rpl/r/rpl_binlog_auto_inc_bug33029.result	2010-02-16 19:34:34 +0000
@@ -1,8 +1,4 @@
-SET @old_relay_log_purge= @@global.relay_log_purge;
-change master to
-MASTER_HOST='dummy.localdomain',
-RELAY_LOG_FILE='slave-relay-bin.000001',
-RELAY_LOG_POS=4;
+Setting up fake replication from MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001
 start slave sql_thread;
 select MASTER_POS_WAIT('master-bin.000001', 3776);
 # Result on slave
@@ -38,5 +34,4 @@ DROP PROCEDURE IF EXISTS p2;
 DROP FUNCTION IF EXISTS f1;
 DROP TRIGGER IF EXISTS tr1;
 stop slave sql_thread;
-reset slave;
-SET @@global.relay_log_purge= @old_relay_log_purge;
+Cleaning up after setup_fake_relay_log.inc

=== renamed file 'mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt' => 'mysql-test/suite/rpl/t/rpl_binlog_auto_inc_bug33029-master.opt'
=== renamed file 'mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test' => 'mysql-test/suite/rpl/t/rpl_binlog_auto_inc_bug33029.test'
--- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test	2009-10-26 14:02:26 +0000
+++ b/mysql-test/suite/rpl/t/rpl_binlog_auto_inc_bug33029.test	2010-02-16 19:44:13 +0000
@@ -17,35 +17,8 @@
 
 source include/have_log_bin.inc;
 
-# Need to restore this at the end; CHANGE MASTER modifies it (see the
-# manual for CHANGE MASTER).
-SET @old_relay_log_purge= @@global.relay_log_purge;
-
-let $MYSQLD_DATADIR= `select @@datadir`;
-
-copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLD_DATADIR/slave-relay-bin.000001;
-
-
-# After patch for BUG#12190, the filename used in CHANGE MASTER
-# RELAY_LOG_FILE will be automatically added the directory of the
-# relay log before comparison, thus we need to added the directory
-# part (./ on unix .\ on windows) when faking the relay-log-bin.index.
-disable_query_log;
-if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`)
-{
-  eval select './slave-relay-bin.000001\n' into dumpfile '$MYSQLD_DATADIR/slave-relay-bin.index';
-}
-
-if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`)
-{
-  eval select '.\\\\slave-relay-bin.000001\n' into dumpfile '$MYSQLD_DATADIR/slave-relay-bin.index';
-}
-enable_query_log;
-
-change master to
-  MASTER_HOST='dummy.localdomain',
-  RELAY_LOG_FILE='slave-relay-bin.000001',
-  RELAY_LOG_POS=4;
+let $fake_relay_log= $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001;
+source include/setup_fake_relay_log.inc;
 
 start slave sql_thread;
 disable_result_log;
@@ -66,9 +39,4 @@ DROP TRIGGER IF EXISTS tr1;
 enable_warnings;
 
 stop slave sql_thread;
-reset slave;
-source include/wait_for_slave_sql_to_stop.inc;
-remove_file $MYSQLD_DATADIR/slave-relay-bin.000001;
-remove_file $MYSQLD_DATADIR/slave-relay-bin.index;
-
-SET @@global.relay_log_purge= @old_relay_log_purge;
+source include/cleanup_fake_relay_log.inc;

=== modified file 'mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test'
--- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test	2009-12-02 14:52:07 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test	2010-02-17 10:00:21 +0000
@@ -161,14 +161,14 @@ connection master;
 remove_file $MYSQLTEST_VARDIR/tmp/master.sql;
 
 
-# this test for position option
+# this test for start-position option
 # By setting this position to 416, we should only get the create of t3
 --disable_query_log
 select "--- Test 2 position test --" as "";
 --enable_query_log
 let $MYSQLD_DATADIR= `select @@datadir;`;
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=417 --stop-position=570 $MYSQLD_DATADIR/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --start-position=417 --stop-position=570 $MYSQLD_DATADIR/master-bin.000001
 
 # These are tests for remote binlog.
 # They should return the same as previous test.
@@ -266,7 +266,7 @@ let $MYSQLD_DATADIR= `select @@datadir;`
 select "--- Test 7 reading stdin w/position --" as "";
 --enable_query_log
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL_BINLOG --short-form --position=417 --stop-position=570 - < $MYSQLD_DATADIR/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --start-position=417 --stop-position=570 - < $MYSQLD_DATADIR/master-bin.000001
        
 # Bug#16217 (mysql client did not know how not switch its internal charset)
 --disable_query_log

=== modified file 'mysql-test/suite/sys_vars/r/lc_time_names_basic.result'
--- a/mysql-test/suite/sys_vars/r/lc_time_names_basic.result	2009-12-22 09:35:56 +0000
+++ b/mysql-test/suite/sys_vars/r/lc_time_names_basic.result	2010-02-18 17:10:39 +0000
@@ -460,7 +460,7 @@ SELECT @@session.lc_time_names;
 sq_AL
 SET @@session.lc_time_names=sr_YU;
 Warnings:
-Warning	1287	'sr_YU' is deprecated; use 'sr_RS' instead
+Warning	1287	'sr_YU' is deprecated and will be removed in a future release. Please use sr_RS instead
 SELECT @@session.lc_time_names;
 @@session.lc_time_names
 sr_RS
@@ -907,7 +907,7 @@ SELECT @@global.lc_time_names;
 sq_AL
 SET @@global.lc_time_names=sr_YU;
 Warnings:
-Warning	1287	'sr_YU' is deprecated; use 'sr_RS' instead
+Warning	1287	'sr_YU' is deprecated and will be removed in a future release. Please use sr_RS instead
 SELECT @@global.lc_time_names;
 @@global.lc_time_names
 sr_RS

=== modified file 'mysql-test/t/bug47671-master.opt'
--- a/mysql-test/t/bug47671-master.opt	2009-11-25 06:55:49 +0000
+++ b/mysql-test/t/bug47671-master.opt	2010-02-17 09:18:17 +0000
@@ -1 +1 @@
---default-character-set=utf8 --skip-character-set-client-handshake
+--character-set-server=utf8 --skip-character-set-client-handshake

=== modified file 'mysql-test/t/func_time.test'
--- a/mysql-test/t/func_time.test	2010-01-21 18:00:52 +0000
+++ b/mysql-test/t/func_time.test	2010-02-17 10:00:21 +0000
@@ -345,12 +345,6 @@ select date_add(date,INTERVAL "1" QUARTE
 select timestampadd(MINUTE, 1, date) from t1;
 select timestampadd(WEEK, 1, date) from t1;
 select timestampadd(SQL_TSI_SECOND, 1, date) from t1;
-# mysqltest.c discards an expected 'deprecated' warning on prepare stage
---disable_ps_protocol
-# disabled while waiting for #36633
-#select timestampadd(SQL_TSI_MICROSECOND, 1, date) from t1;
---enable_ps_protocol
-
 select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a;
 select timestampdiff(YEAR, '2002-05-01', '2001-01-01') as a;
 select timestampdiff(QUARTER, '2002-05-01', '2001-01-01') as a;
@@ -361,11 +355,6 @@ select timestampdiff(SQL_TSI_HOUR, '2001
 select timestampdiff(SQL_TSI_DAY, '2001-02-01', '2001-05-01') as a;
 select timestampdiff(SQL_TSI_MINUTE, '2001-02-01 12:59:59', '2001-05-01 12:58:59') as a;
 select timestampdiff(SQL_TSI_SECOND, '2001-02-01 12:59:59', '2001-05-01 12:58:58') as a;
-# mysqltest.c discards an expected 'deprecated' warning on prepare stage
---disable_ps_protocol
-# Disabled while waiting for #36633
-#select timestampdiff(SQL_TSI_MICROSECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a;
---enable_ps_protocol
 
 select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1,
        timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2,
@@ -800,18 +789,11 @@ select DATE_ADD(20071108,         INTERV
 
 select LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND;
 
-#
 # Bug#33834: FRAC_SECOND: Applicability not clear in documentation
-
-# Show that he use of FRAC_SECOND, for anything other than
-# TIMESTAMPADD / TIMESTAMPDIFF, is a server error.
-
-# mysqltest.c discards an expected 'deprecated' warning on prepare stage
---disable_ps_protocol
-SELECT TIMESTAMPADD(MICROSECOND, 1, '2008-02-18');
-SELECT TIMESTAMPDIFF(MICROSECOND, '2008-02-17', '2008-02-18');
---enable_ps_protocol
-
+#
+# Test case removed since FRAC_SECOND was deprecated and
+# removed as part of WL#5154
+#
 
 #
 # Bug #36466:

=== added file 'mysql-test/t/innodb_icp.test'
--- a/mysql-test/t/innodb_icp.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/innodb_icp.test	2010-02-25 12:55:31 +0000
@@ -0,0 +1,22 @@
+#
+# ICP/InnoDB tests (Index Condition Pushdown)
+#
+
+--source include/have_innodb.inc
+
+# Index condition pushdown (ICP) is by default disabled in InnoDB. Support
+# for ICP can be enabled in InnoDB by using the optimizer_innodb_icp
+# debug flag. This will only be available in debug builds. 
+# When/if ICP get enabled by default the following two lines should
+# be removed.
+
+--source include/have_debug.inc
+set session debug="+d,optimizer_innodb_icp";
+
+
+set @save_storage_engine= @@storage_engine;
+set storage_engine=InnoDB;
+
+--source include/icp_tests.inc
+
+set storage_engine= @save_storage_engine;

=== modified file 'mysql-test/t/innodb_mysql.test'
--- a/mysql-test/t/innodb_mysql.test	2010-01-27 06:29:25 +0000
+++ b/mysql-test/t/innodb_mysql.test	2010-02-23 15:56:07 +0000
@@ -639,4 +639,76 @@ ORDER BY t2.pk;
 
 DROP TABLE t1,t2;
 
+--echo #
+--echo # Bug#49604 "6.0 processing compound WHERE clause incorrectly 
+--echo #            with Innodb - extra rows"
+--echo #
+
+CREATE TABLE t1 (
+  c1 INT NOT NULL,
+  c2 INT,
+  PRIMARY KEY (c1),
+  KEY k1 (c2)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES (12,1);
+INSERT INTO t1 VALUES (15,1);
+INSERT INTO t1 VALUES (16,1);
+INSERT INTO t1 VALUES (22,1);
+INSERT INTO t1 VALUES (20,2);
+
+CREATE TABLE t2 (
+  c1 INT NOT NULL,
+  c2 INT,
+  PRIMARY KEY (c1)
+) ENGINE=InnoDB;
+
+INSERT INTO t2 VALUES (1,2);
+INSERT INTO t2 VALUES (2,9);
+
+SELECT STRAIGHT_JOIN t2.c2, t1.c2, t2.c1
+FROM t1 JOIN t2 ON t1.c2 = t2.c1  
+WHERE t2.c1 IN (2, 1, 6) OR t2.c1 NOT IN (1);
+
+DROP TABLE t1, t2;
+
+
+--echo #
+--echo # Bug#44613 SELECT statement inside FUNCTION takes a shared lock
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+CREATE TABLE t1(x INT PRIMARY KEY, y INT) ENGINE=innodb;
+INSERT INTO t1 VALUES (1, 0), (2, 0);
+
+CREATE FUNCTION f1(z INT) RETURNS INT READS SQL DATA
+  RETURN (SELECT x FROM t1 WHERE x = z);
+
+--echo # Connection default
+START TRANSACTION;
+SELECT f1(1);
+
+--echo # Connection con2
+--disable_query_log
+connect (con2, localhost, root);
+--enable_query_log
+START TRANSACTION;
+SELECT f1(1);
+# This next statement used to block.
+UPDATE t1 SET y = 1 WHERE x = 1;
+
+COMMIT;
+
+disconnect con2;
+--source include/wait_until_disconnected.inc
+--echo # Connection default
+connection default;
+COMMIT;
+DROP TABLE t1;
+DROP FUNCTION f1;
+
 --echo End of 6.0 tests

=== added file 'mysql-test/t/myisam_icp.test'
--- a/mysql-test/t/myisam_icp.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/myisam_icp.test	2010-02-25 12:55:31 +0000
@@ -0,0 +1,6 @@
+#
+# ICP/MyISAM tests (Index Condition Pushdown)
+#
+
+--source include/icp_tests.inc
+

=== modified file 'mysql-test/t/mysqlbinlog.test'
--- a/mysql-test/t/mysqlbinlog.test	2010-02-04 10:55:39 +0000
+++ b/mysql-test/t/mysqlbinlog.test	2010-02-17 10:00:21 +0000
@@ -65,13 +65,13 @@ select "--- --database --" as "";
 --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
 --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --database=nottest $MYSQLD_DATADIR/master-bin.000001 2> /dev/null
 
-# this test for position option
+# this test for start-position option
 --disable_query_log
-select "--- --position --" as "";
+select "--- --start-position --" as "";
 --enable_query_log
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=1074 $MYSQLD_DATADIR/master-bin.000002
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --start-position=1074 $MYSQLD_DATADIR/master-bin.000002
 
 # These are tests for remote binlog.
 # They should return the same as previous test.
@@ -103,11 +103,11 @@ select "--- --database --" as "";
 
 # Strangely but this works
 --disable_query_log
-select "--- --position --" as "";
+select "--- --start-position --" as "";
 --enable_query_log
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=1074 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --start-position=1074 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
 
 
 # Bug#7853 mysqlbinlog does not accept input from stdin
@@ -120,7 +120,7 @@ select "--- reading stdin --" as "";
 
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
---exec $MYSQL_BINLOG --short-form --position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001
+--exec $MYSQL_BINLOG --short-form --start-position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001
 drop table t1,t2;
 
 #

=== modified file 'mysql-test/t/ps-master.opt'
--- a/mysql-test/t/ps-master.opt	2009-08-27 20:55:31 +0000
+++ b/mysql-test/t/ps-master.opt	2010-02-17 10:00:21 +0000
@@ -1 +1 @@
---log-output=table,file --slow-query-log --log-long-format --log-queries-not-using-indexes --general-log
+--log-output=table,file --slow-query-log --log-queries-not-using-indexes --general-log

=== modified file 'mysql-test/t/show_check-master.opt'
--- a/mysql-test/t/show_check-master.opt	2009-08-27 20:55:31 +0000
+++ b/mysql-test/t/show_check-master.opt	2010-02-17 10:00:21 +0000
@@ -1 +1,2 @@
---log-output=table --slow-query-log --log-long-format --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="" --slow-query-log-file=""
+--log-output=table --slow-query-log --log-queries-not-using-indexes --myisam-recover="" --general-log --general-log-file="" --slow-query-log-file=""
+

=== modified file 'mysql-test/t/union-master.opt'
--- a/mysql-test/t/union-master.opt	2008-12-09 10:29:33 +0000
+++ b/mysql-test/t/union-master.opt	2010-02-17 10:00:21 +0000
@@ -1 +1 @@
---slow-query-log --log-long-format --log-queries-not-using-indexes
+--log-slow-queries --log-queries-not-using-indexes

=== modified file 'mysql-test/t/view.test'
--- a/mysql-test/t/view.test	2009-12-16 09:42:11 +0000
+++ b/mysql-test/t/view.test	2010-02-23 15:56:07 +0000
@@ -6,6 +6,9 @@ drop database if exists mysqltest;
 --enable_warnings
 use test;
 
+# Save the initial number of concurrent sessions.
+--source include/count_sessions.inc
+
 #
 # some basic test of views and its functionality
 #
@@ -4011,3 +4014,79 @@ CREATE VIEW t2 AS SELECT * FROM t1;
 
 UNLOCK TABLES;
 DROP TABLE t1, t2;
+
+
+--echo #
+--echo # Bug#48315 Metadata lock is not taken for merged views that
+--echo #           use an INFORMATION_SCHEMA table
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+connect (con2, localhost, root);
+connect (con3, localhost, root);
+
+--echo # Connection default
+connection default;
+
+CREATE VIEW v1 AS SELECT schema_name FROM information_schema.schemata;
+CREATE TABLE t1 (str VARCHAR(50));
+CREATE PROCEDURE p1() INSERT INTO t1 SELECT * FROM v1;
+
+--echo # CALL p1() so the view is merged.
+CALL p1();
+
+--echo # Connection 3
+connection con3;
+LOCK TABLE t1 READ;
+
+--echo # Connection default
+connection default;
+--echo # Try to CALL p1() again, this time it should block for t1.
+--echo # Sending:
+--send CALL p1()
+
+--echo # Connection 2
+connection con2;
+let $wait_condition=
+  SELECT COUNT(*) = 1 from information_schema.processlist
+  WHERE state = "Table lock" AND info = "INSERT INTO t1 SELECT * FROM v1";
+--source include/wait_condition.inc
+--echo # ... then try to drop the view. This should block.
+--echo # Sending:
+--send DROP VIEW v1
+
+--echo # Connection 3
+connection con3;
+let $wait_condition=
+  SELECT COUNT(*) = 1 from information_schema.processlist
+  WHERE state = "Waiting for table" AND info = "DROP VIEW v1";
+--source include/wait_condition.inc
+--echo # Now allow CALL p1() to complete
+UNLOCK TABLES;
+
+--echo # Connection default
+connection default;
+--echo # Reaping: CALL p1()
+--reap
+
+--echo # Connection 2
+connection con2;
+--echo # Reaping: DROP VIEW v1
+--reap
+
+--echo # Connection default
+connection default;
+DROP PROCEDURE p1;
+DROP TABLE t1;
+disconnect con2;
+disconnect con3;
+
+
+# Check that all connections opened by test cases in this file are really
+# gone so execution of other tests won't be affected by their presence.
+--source include/wait_until_count_sessions.inc

=== modified file 'mysys/CMakeLists.txt'
--- a/mysys/CMakeLists.txt	2010-01-28 00:38:13 +0000
+++ b/mysys/CMakeLists.txt	2010-02-23 13:21:49 +0000
@@ -43,7 +43,7 @@ IF (WIN32)
  SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_winthread.c my_wincond.c my_winerr.c my_winfile.c my_windac.c my_conio.c)
 ENDIF()
 
-IF(CMAKE_COMPILER_IS_GNUCC AND  NOT HAVE_CXX_NEW)
+IF(NOT HAVE_CXX_NEW)
  # gcc as C++ compiler  does not have new/delete
  SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_new.cc)
  ADD_DEFINITIONS( -DUSE_MYSYS_NEW)

=== modified file 'scripts/CMakeLists.txt'
--- a/scripts/CMakeLists.txt	2010-02-20 01:26:07 +0000
+++ b/scripts/CMakeLists.txt	2010-02-23 13:21:49 +0000
@@ -66,6 +66,7 @@ INSTALL(FILES 
   ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_data.sql
   ${CMAKE_CURRENT_SOURCE_DIR}/fill_help_tables.sql
   ${CMAKE_CURRENT_SOURCE_DIR}/mysql_test_data_timezone.sql
+  ${FIX_PRIVILEGES_SQL}
   DESTINATION ${INSTALL_MYSQLSHAREDIR}
 )
 

=== modified file 'scripts/mysqld_multi.sh'
--- a/scripts/mysqld_multi.sh	2010-01-30 18:58:23 +0000
+++ b/scripts/mysqld_multi.sh	2010-02-17 09:18:17 +0000
@@ -59,18 +59,6 @@ sub main
     push @defaults_options, (shift @ARGV);
   }
 
-  # Handle deprecated --config-file option: convert to --defaults-extra-file
-  foreach my $arg (@ARGV)
-  {
-    if ($arg =~ m/^--config-file=(.*)/)
-    {
-      # Put it at the beginning of the list, so it has lower precedence
-      # than a correct --defaults-extra-file option
-
-      unshift @defaults_options, "--defaults-extra-file=$1";
-    }
-  }
-
   foreach (@defaults_options)
   {
     $_ = quote_shell_word($_);
@@ -79,11 +67,6 @@ sub main
   # Add [mysqld_multi] options to front of @ARGV, ready for GetOptions()
   unshift @ARGV, defaults_for_group('mysqld_multi');
 
-  # The --config-file option can be ignored; if passed on the command
-  # line, it's already handled; if specified in the configuration file,
-  # it's redundant and not useful
-  @ARGV= grep { not /^--config-file=/ } @ARGV;
-
   # We've already handled --no-defaults, --defaults-file, etc.
   if (!GetOptions("help", "example", "version", "mysqld=s", "mysqladmin=s",
                   "user=s", "password=s", "log=s", "no-log",
@@ -740,8 +723,8 @@ from both [mysqld_multi] and [mysqld#], 
 used, $my_progname will abort with an error.
 
 $my_progname will search for groups named [mysqld#] from my.cnf (or
-the given --config-file=...), where '#' can be any positive integer
-starting from 1. These groups should be the same as the regular
+the given --defaults-extra-file=...), where '#' can be any positive 
+integer starting from 1. These groups should be the same as the regular
 [mysqld] group, but with those port, socket and any other options
 that are to be used with each separate mysqld process. The number
 in the group name has another function; it can be used for starting,
@@ -767,7 +750,6 @@ These options must be given before any o
                    standard system-wide and user-specific files
 Using:  @{[join ' ', @defaults_options]}
 
---config-file=...  Deprecated, please use --defaults-extra-file instead
 --example          Give an example of a config file with extra information.
 --help             Print this help and exit.
 --log=...          Log file. Full path to and the name for the log file. NOTE:

=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	2010-02-21 20:44:44 +0000
+++ b/sql/CMakeLists.txt	2010-02-24 19:27:59 +0000
@@ -192,7 +192,14 @@ ADD_CUSTOM_COMMAND(
   COMMAND ${CMAKE_COMMAND} -E remove -f lex_hash.h.tmp
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gen_lex_hash.cc)
-        
+
+MYSQL_ADD_EXECUTABLE(mysql_tzinfo_to_sql tztime.cc)
+SET_TARGET_PROPERTIES(mysql_tzinfo_to_sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL")
+TARGET_LINK_LIBRARIES(mysql_tzinfo_to_sql ${MYSQLD_STATIC_PLUGIN_LIBS} 
+  mysys dbug strings vio regex   
+  ${LIBWRAP} ${LIBCRYPT} ${LIBDL}
+  ${SSL_LIBRARIES})
+
 ADD_CUSTOM_TARGET( 
         GenServerSource
         DEPENDS ${GEN_SOURCES}

=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc	2010-02-04 10:55:39 +0000
+++ b/sql/item_cmpfunc.cc	2010-02-23 13:21:49 +0000
@@ -2929,9 +2929,7 @@ bool Item_func_case::fix_fields(THD *thd
     buff should match stack usage from
     Item_func_case::val_int() -> Item_func_case::find_item()
   */
-#ifndef EMBEDDED_LIBRARY
   uchar buff[MAX_FIELD_WIDTH*2+sizeof(String)*2+sizeof(String*)*2+sizeof(double)*2+sizeof(longlong)*2];
-#endif
   bool res= Item_func::fix_fields(thd, ref);
   /*
     Call check_stack_overrun after fix_fields to be sure that stack variable
@@ -4146,9 +4144,7 @@ Item_cond::fix_fields(THD *thd, Item **r
   List_iterator<Item> li(list);
   Item *item;
   TABLE_LIST *save_emb_on_expr_nest= thd->thd_marker.emb_on_expr_nest;
-#ifndef EMBEDDED_LIBRARY
   uchar buff[sizeof(char*)];			// Max local vars in function
-#endif
   not_null_tables_cache= used_tables_cache= 0;
   const_item_cache= 1;
 

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2010-02-10 21:11:06 +0000
+++ b/sql/item_func.cc	2010-02-23 13:21:49 +0000
@@ -153,9 +153,7 @@ Item_func::fix_fields(THD *thd, Item **r
   DBUG_ASSERT(fixed == 0);
   Item **arg,**arg_end;
   TABLE_LIST *save_emb_on_expr_nest= thd->thd_marker.emb_on_expr_nest;
-#ifndef EMBEDDED_LIBRARY			// Avoid compiler warning
   uchar buff[STACK_BUFF_ALLOC];			// Max argument in function
-#endif
   thd->thd_marker.emb_on_expr_nest= NULL;
   used_tables_cache= not_null_tables_cache= 0;
   const_item_cache=1;
@@ -2858,9 +2856,7 @@ bool
 udf_handler::fix_fields(THD *thd, Item_result_field *func,
 			uint arg_count, Item **arguments)
 {
-#ifndef EMBEDDED_LIBRARY			// Avoid compiler warning
   uchar buff[STACK_BUFF_ALLOC];			// Max argument in function
-#endif
   DBUG_ENTER("Item_udf_func::fix_fields");
 
   if (check_stack_overrun(thd, STACK_MIN_SIZE, buff))

=== modified file 'sql/lex.h'
--- a/sql/lex.h	2010-02-10 21:11:06 +0000
+++ b/sql/lex.h	2010-02-20 09:48:54 +0000
@@ -230,7 +230,6 @@ static SYMBOL symbols[] = {
   { "FORCE",		SYM(FORCE_SYM)},
   { "FOREIGN",		SYM(FOREIGN)},
   { "FOUND",            SYM(FOUND_SYM)},
-  { "FRAC_SECOND",      SYM(FRAC_SECOND_SYM)},
   { "FROM",		SYM(FROM)},
   { "FULL",		SYM(FULL)},
   { "FULLTEXT",		SYM(FULLTEXT_SYM)},
@@ -527,7 +526,6 @@ static SYMBOL symbols[] = {
   { "SQL_NO_CACHE",	SYM(SQL_NO_CACHE_SYM)},
   { "SQL_SMALL_RESULT", SYM(SQL_SMALL_RESULT)},
   { "SQL_THREAD",	SYM(SQL_THREAD)},
-  { "SQL_TSI_FRAC_SECOND", SYM(FRAC_SECOND_SYM)},
   { "SQL_TSI_SECOND",   SYM(SECOND_SYM)},
   { "SQL_TSI_MINUTE",   SYM(MINUTE_SYM)},
   { "SQL_TSI_HOUR",     SYM(HOUR_SYM)},

=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2010-02-21 18:25:29 +0000
+++ b/sql/mysql_priv.h	2010-02-23 13:21:49 +0000
@@ -197,8 +197,8 @@ bool net_request_file(NET* net, const ch
     if (((THD *) Thd) != NULL)                                              \
       push_warning_printf((Thd), MYSQL_ERROR::WARN_LEVEL_WARN,              \
                         ER_WARN_DEPRECATED_SYNTAX,                          \
-                        ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER),             \
-                        (Old), #VerHi "." #VerLo, (New));                   \
+                        ER(ER_WARN_DEPRECATED_SYNTAX),                      \
+                        (Old), (New));                                      \
     else                                                                    \
       sql_print_warning("The syntax '%s' is deprecated and will be removed " \
                         "in a future release. Please use %s instead.",      \
@@ -2071,7 +2071,7 @@ extern uint volatile thread_count, globa
 extern ulong thread_created;
 extern uint connection_count;
 extern my_bool opt_sql_bin_update, opt_safe_user_create, opt_no_mix_types;
-extern my_bool opt_safe_show_db, opt_local_infile, opt_myisam_use_mmap;
+extern my_bool opt_local_infile, opt_myisam_use_mmap;
 extern my_bool opt_slave_compressed_protocol, use_temp_pool;
 extern uint slave_exec_mode_options;
 extern ulonglong slave_type_conversions_options;
@@ -2607,14 +2607,14 @@ inline double log2(double x)
 #ifndef EMBEDDED_LIBRARY
 extern "C" void unireg_abort(int exit_code) __attribute__((noreturn));
 void kill_delayed_threads(void);
-bool check_stack_overrun(THD *thd, long margin, uchar *dummy);
 #else
 extern "C" void unireg_clear(int exit_code);
 #define unireg_abort(exit_code) do { unireg_clear(exit_code); DBUG_RETURN(exit_code); } while(0)
 inline void kill_delayed_threads(void) {}
-#define check_stack_overrun(A, B, C) 0
 #endif
 
+bool check_stack_overrun(THD *thd, long margin, uchar *dummy);
+
 /* This must match the path length limit in the ER_NOT_RW_DIR error msg. */
 #define ER_NOT_RW_DIR_PATHSIZE 200
 bool is_usable_directory(THD *thd, const char *varname,
@@ -2712,7 +2712,6 @@ enum options_mysqld
   OPT_BOOTSTRAP,
   OPT_CONSOLE,
   OPT_DEBUG_SYNC_TIMEOUT,
-  OPT_DELAY_KEY_WRITE_ALL,
   OPT_ISAM_LOG,
   OPT_KEY_BUFFER_SIZE,
   OPT_KEY_CACHE_AGE_THRESHOLD,
@@ -2731,19 +2730,16 @@ enum options_mysqld
   OPT_SAFE,
   OPT_SERVER_ID,
   OPT_SKIP_HOST_CACHE,
-  OPT_SKIP_LOCK,
   OPT_SKIP_NEW,
   OPT_SKIP_PRIOR,
   OPT_SKIP_RESOLVE,
   OPT_SKIP_STACK_TRACE,
-  OPT_SKIP_SYMLINKS,
   OPT_SLOW_QUERY_LOG,
   OPT_SSL_CA,
   OPT_SSL_CAPATH,
   OPT_SSL_CERT,
   OPT_SSL_CIPHER,
   OPT_SSL_KEY,
-  OPT_UPDATE_LOG,
   OPT_WANT_CORE,
   OPT_ENGINE_CONDITION_PUSHDOWN
 };

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2010-02-20 10:56:42 +0000
+++ b/sql/mysqld.cc	2010-02-22 13:28:44 +0000
@@ -54,6 +54,10 @@
 #include "sp_rcontext.h"
 #include "sp_cache.h"
 
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
+
 #define mysqld_charset &my_charset_latin1
 
 /* stack traces are only supported on linux intel */
@@ -4176,21 +4180,13 @@ static int init_server_components()
       Implementation of the above :
       - If mysqld is started with --log-update and --log-bin,
       ignore --log-update (print a warning), push a warning when SQL_LOG_UPDATE
-      is used, and turn off --sql-bin-update-same.
+      is used,
       This will completely ignore SQL_LOG_UPDATE
       - If mysqld is started with --log-update only,
       change it to --log-bin (with the filename passed to log-update,
       plus '-bin') (print a warning), push a warning when SQL_LOG_UPDATE is
-      used, and turn on --sql-bin-update-same.
+      used.
       This will translate SQL_LOG_UPDATE to SQL_LOG_BIN.
-
-      Note that we tell the user that --sql-bin-update-same is deprecated and
-      does nothing, and we don't take into account if he used this option or
-      not; but internally we give this variable a value to have the behaviour
-      we want (i.e. have SQL_LOG_UPDATE influence SQL_LOG_BIN or not).
-      As sql-bin-update-same, log-update and log-bin cannot be changed by the
-      user after starting the server (they are not variables), the user will
-      not later interfere with the settings we do here.
     */
     if (opt_bin_log)
     {
@@ -5551,26 +5547,47 @@ void handle_connections_sockets()
 {
   my_socket sock,new_sock;
   uint error_count=0;
-  uint max_used_connection= (uint) (max(ip_sock,unix_sock)+1);
-  fd_set readFDs,clientFDs;
   THD *thd;
   struct sockaddr_storage cAddr;
-  int ip_flags=0,socket_flags=0,flags;
+  int ip_flags=0,socket_flags=0,flags,retval;
   st_vio *vio_tmp;
+#ifdef HAVE_POLL
+  int socket_count= 0;
+  struct pollfd fds[2]; // for ip_sock and unix_sock
+#else
+  fd_set readFDs,clientFDs;
+  uint max_used_connection= (uint) (max(ip_sock,unix_sock)+1);
+#endif
+
   DBUG_ENTER("handle_connections_sockets");
 
   LINT_INIT(new_sock);
 
+#ifndef HAVE_POLL
   FD_ZERO(&clientFDs);
+#endif
+
   if (ip_sock != INVALID_SOCKET)
   {
+#ifdef HAVE_POLL
+    fds[socket_count].fd= ip_sock;
+    fds[socket_count].events= POLLIN;
+    socket_count++;
+#else
     FD_SET(ip_sock,&clientFDs);
+#endif    
 #ifdef HAVE_FCNTL
     ip_flags = fcntl(ip_sock, F_GETFL, 0);
 #endif
   }
 #ifdef HAVE_SYS_UN_H
+#ifdef HAVE_POLL
+  fds[socket_count].fd= unix_sock;
+  fds[socket_count].events= POLLIN;
+  socket_count++;
+#else
   FD_SET(unix_sock,&clientFDs);
+#endif
 #ifdef HAVE_FCNTL
   socket_flags=fcntl(unix_sock, F_GETFL, 0);
 #endif
@@ -5580,12 +5597,15 @@ void handle_connections_sockets()
   MAYBE_BROKEN_SYSCALL;
   while (!abort_loop)
   {
-    readFDs=clientFDs;
-#ifdef HPUX10
-    if (select(max_used_connection,(int*) &readFDs,0,0,0) < 0)
-      continue;
+#ifdef HAVE_POLL
+    retval= poll(fds, socket_count, -1);
 #else
-    if (select((int) max_used_connection,&readFDs,0,0,0) < 0)
+    readFDs=clientFDs;
+
+    retval= select((int) max_used_connection,&readFDs,0,0,0);
+#endif
+
+    if (retval < 0)
     {
       if (socket_errno != SOCKET_EINTR)
       {
@@ -5595,7 +5615,7 @@ void handle_connections_sockets()
       MAYBE_BROKEN_SYSCALL
       continue;
     }
-#endif	/* HPUX10 */
+
     if (abort_loop)
     {
       MAYBE_BROKEN_SYSCALL;
@@ -5603,6 +5623,21 @@ void handle_connections_sockets()
     }
 
     /* Is this a new connection request ? */
+#ifdef HAVE_POLL
+    for (int i= 0; i < socket_count; ++i) 
+    {
+      if (fds[i].revents & POLLIN)
+      {
+        sock= fds[i].fd;
+#ifdef HAVE_FCNTL
+        flags= fcntl(sock, F_GETFL, 0);
+#else
+        flags= 0;
+#endif // HAVE_FCNTL
+        break;
+      }
+    }
+#else  // HAVE_POLL
 #ifdef HAVE_SYS_UN_H
     if (FD_ISSET(unix_sock,&readFDs))
     {
@@ -5610,11 +5645,12 @@ void handle_connections_sockets()
       flags= socket_flags;
     }
     else
-#endif
+#endif // HAVE_SYS_UN_H
     {
       sock = ip_sock;
       flags= ip_flags;
     }
+#endif // HAVE_POLL
 
 #if !defined(NO_FCNTL_NONBLOCK)
     if (!(test_flags & TEST_BLOCKING))
@@ -6185,9 +6221,6 @@ struct my_option my_long_options[]=
    (uchar**) &opt_my_crc_dbug_check, (uchar**) &opt_my_crc_dbug_check,
    0, GET_ULONG, REQUIRED_ARG, 0, 0, ~(ulong) 0L, 0, 0, 0},
 #endif
-  {"default-character-set", 'C', "Set the default character set (deprecated option, use --character-set-server instead).",
-   (uchar**) &default_character_set_name, (uchar**) &default_character_set_name,
-   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
   /* default-storage-engine should have "MyISAM" as def_value. Instead
      of initializing it here it is done in init_common_variables() due
      to a compiler bug in Sun Studio compiler. */
@@ -6262,9 +6295,6 @@ struct my_option my_long_options[]=
   {"log-isam", OPT_ISAM_LOG, "Log all MyISAM changes to file.",
    (uchar**) &myisam_logical_log_filename, (uchar**)
    &myisam_logical_log_filename, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
-  {"log-long-format", '0',
-   "Log some extra information to update log. Please note that this option is deprecated; see --log-short-format option.",
-   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"log-short-format", 0,
    "Don't log extra information to update and slow-query logs.",
    (uchar**) &opt_short_log_format, (uchar**) &opt_short_log_format,
@@ -6380,8 +6410,6 @@ Can't be set to 1 if --log-slave-updates
    0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {"safe-mode", OPT_SAFE, "Skip some optimize stages (for testing).",
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
-#ifndef TO_BE_DELETED
-#endif
   {"safe-user-create", 0,
    "Don't allow new user creation by the user who has no write privileges to the mysql.user table.",
    (uchar**) &opt_safe_user_create, (uchar**) &opt_safe_user_create, 0, GET_BOOL,

=== modified file 'sql/share/CMakeLists.txt'
--- a/sql/share/CMakeLists.txt	2010-01-24 15:23:16 +0000
+++ b/sql/share/CMakeLists.txt	2010-02-24 19:19:24 +0000
@@ -47,6 +47,8 @@ FOREACH (dir ${dirs})
  INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir} 
   DESTINATION  ${INSTALL_MYSQLSHAREDIR})
 ENDFOREACH()
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/charsets DESTINATION ${INSTALL_MYSQLSHAREDIR})
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/charsets DESTINATION ${INSTALL_MYSQLSHAREDIR}
+  PATTERN "languages.html" EXCLUDE
+)
 
 INSTALL(FILES ${files} DESTINATION ${INSTALL_MYSQLSHAREDIR})

=== modified file 'sql/share/errmsg-utf8.txt'
--- a/sql/share/errmsg-utf8.txt	2010-02-21 18:35:39 +0000
+++ b/sql/share/errmsg-utf8.txt	2010-02-22 13:23:45 +0000
@@ -5018,10 +5018,8 @@ ER_UNKNOWN_STORAGE_ENGINE 42000 
         ger "Unbekannte Speicher-Engine '%s'"
         por "Motor de tabela desconhecido '%s'"
         spa "Desconocido motor de tabla '%s'"
-# When using this error code, use ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER)
-# for the message string.  See, for example, code in mysql_priv.h.
 ER_WARN_DEPRECATED_SYNTAX  
-        eng "'%s' is deprecated; use '%s' instead"
+        eng "'%s' is deprecated and will be removed in a future release. Please use %s instead"
         ger "'%s' ist veraltet. Bitte benutzen Sie '%s'"
         por "'%s' é desatualizado. Use '%s' em seu lugar"
         spa "'%s' está desaprobado, use '%s' en su lugar"

=== modified file 'sql/spatial.cc'
--- a/sql/spatial.cc	2009-12-23 10:53:54 +0000
+++ b/sql/spatial.cc	2010-02-17 10:28:57 +0000
@@ -1610,9 +1610,8 @@ int Gis_multi_polygon::area(double *ar, 
 int Gis_multi_polygon::centroid(String *result) const
 {
   uint32 n_polygons;
-  bool first_loop= 1;
   Gis_polygon p;
-  double UNINIT_VAR(res_area), UNINIT_VAR(res_cx), UNINIT_VAR(res_cy);
+  double res_area= 0.0, res_cx= 0.0, res_cy= 0.0;
   double cur_area, cur_cx, cur_cy;
   const char *data= m_data;
 
@@ -1629,20 +1628,13 @@ int Gis_multi_polygon::centroid(String *
 	p.centroid_xy(&cur_cx, &cur_cy))
       return 1;
 
-    if (!first_loop)
-    {
-      double sum_area= res_area + cur_area;
-      res_cx= (res_area * res_cx + cur_area * cur_cx) / sum_area;
-      res_cy= (res_area * res_cy + cur_area * cur_cy) / sum_area;
-    }
-    else
-    {
-      first_loop= 0;
-      res_area= cur_area;
-      res_cx= cur_cx;
-      res_cy= cur_cy;
-    }
+    res_area+= cur_area;
+    res_cx+= cur_area * cur_cx;
+    res_cy+= cur_area * cur_cy;
   }
+   
+  res_cx/= res_area;
+  res_cy/= res_area;
 
   return create_point(result, res_cx, res_cy);
 }

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2010-02-17 21:07:50 +0000
+++ b/sql/sql_base.cc	2010-02-23 15:56:07 +0000
@@ -4218,9 +4218,18 @@ open_and_process_table(THD *thd, LEX *le
       TABLE_LIST is processed. This code works only during re-execution.
     */
     if (tables->view)
-      goto process_view_routines;
-    if (!mysql_schema_table(thd, lex, tables) &&
-        !check_and_update_table_version(thd, tables, tables->table->s))
+    {
+      /*
+        We still need to take a MDL lock on the merged view to protect
+        it from concurrent changes.
+      */
+      if (!open_table_get_mdl_lock(thd, tables, &tables->mdl_request,
+                                   ot_ctx, flags))
+        goto process_view_routines;
+      /* Fall-through to return error. */
+    }
+    else if (!mysql_schema_table(thd, lex, tables) &&
+             !check_and_update_table_version(thd, tables, tables->table->s))
     {
       goto end;
     }

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2010-02-17 21:07:50 +0000
+++ b/sql/sql_parse.cc	2010-02-23 18:47:51 +0000
@@ -5508,7 +5508,6 @@ bool check_global_access(THD *thd, ulong
 	Check stack size; Send error if there isn't enough stack to continue
 ****************************************************************************/
 
-#ifndef EMBEDDED_LIBRARY
 
 #if STACK_DIRECTION < 0
 #define used_stack(A,B) (long) (A - B)
@@ -5546,7 +5545,7 @@ bool check_stack_overrun(THD *thd, long 
 #endif
   return 0;
 }
-#endif /* EMBEDDED_LIBRARY */
+
 
 #define MY_YACC_INIT 1000			// Start with big alloc
 #define MY_YACC_MAX  32000			// Because of 'short'

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2010-02-21 18:25:29 +0000
+++ b/sql/sql_yacc.yy	2010-02-21 19:39:23 +0000
@@ -983,7 +983,6 @@ bool my_yyoverflow(short **a, YYSTYPE **
 %token  FOREIGN                       /* SQL-2003-R */
 %token  FOR_SYM                       /* SQL-2003-R */
 %token  FOUND_SYM                     /* SQL-2003-R */
-%token  FRAC_SECOND_SYM
 %token  FROM
 %token  FULL                          /* SQL-2003-R */
 %token  FULLTEXT_SYM
@@ -1527,8 +1526,6 @@ bool my_yyoverflow(short **a, YYSTYPE **
 %type <date_time_type> date_time_type;
 %type <interval> interval
 
-%type <interval_time_st> interval_time_st
-
 %type <interval_time_st> interval_time_stamp
 
 %type <db_type> storage_engines known_storage_engines
@@ -9852,7 +9849,7 @@ using_list:
         ;
 
 interval:
-          interval_time_st {}
+          interval_time_stamp    {}
         | DAY_HOUR_SYM           { $$=INTERVAL_DAY_HOUR; }
         | DAY_MICROSECOND_SYM    { $$=INTERVAL_DAY_MICROSECOND; }
         | DAY_MINUTE_SYM         { $$=INTERVAL_DAY_MINUTE; }
@@ -9867,26 +9864,6 @@ interval:
         ;
 
 interval_time_stamp:
-	interval_time_st	{}
-	| FRAC_SECOND_SYM	{ 
-                                  $$=INTERVAL_MICROSECOND; 
-                                  /*
-                                    FRAC_SECOND was mistakenly implemented with
-                                    a wrong resolution. According to the ODBC
-                                    standard it should be nanoseconds, not
-                                    microseconds. Changing it to nanoseconds
-                                    in MySQL would mean making TIMESTAMPDIFF
-                                    and TIMESTAMPADD to return DECIMAL, since
-                                    the return value would be too big for BIGINT
-                                    Hence we just deprecate the incorrect
-                                    implementation without changing its
-                                    resolution.
-                                  */
-                                  WARN_DEPRECATED(YYTHD, 6, 2, "FRAC_SECOND", "MICROSECOND");
-                                }
-	;
-
-interval_time_st:
           DAY_SYM         { $$=INTERVAL_DAY; }
         | WEEK_SYM        { $$=INTERVAL_WEEK; }
         | HOUR_SYM        { $$=INTERVAL_HOUR; }
@@ -12664,7 +12641,6 @@ keyword_sp:
         | FILE_SYM                 {}
         | FIRST_SYM                {}
         | FIXED_SYM                {}
-        | FRAC_SECOND_SYM          {}
         | GEOMETRY_SYM             {}
         | GEOMETRYCOLLECTION       {}
         | GET_FORMAT               {}

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2010-02-17 21:07:50 +0000
+++ b/sql/sys_vars.cc	2010-02-20 09:48:54 +0000
@@ -2261,25 +2261,6 @@ static Sys_var_bit Sys_log_binlog(
        DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_has_super),
        ON_UPDATE(fix_sql_log_bin));
 
-static bool deprecated_log_update(sys_var *self, THD *thd, set_var *var)
-{
-  /*
-    The update log is not supported anymore since 5.0.
-    See sql/mysqld.cc/, comments in function init_server_components() for an
-    explaination of the different warnings we send below
-  */
-
-  if (opt_sql_bin_update)
-    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
-                 ER_UPDATE_LOG_DEPRECATED_TRANSLATED,
-                 ER(ER_UPDATE_LOG_DEPRECATED_TRANSLATED));
-  else
-    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
-                 ER_UPDATE_LOG_DEPRECATED_IGNORED,
-                 ER(ER_UPDATE_LOG_DEPRECATED_IGNORED));
-  return check_has_super(self, thd, var);
-}
-
 static Sys_var_bit Sys_sql_warnings(
        "sql_warnings", "sql_warnings",
        SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_WARNINGS,

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	2010-02-06 16:22:27 +0000
+++ b/storage/innobase/handler/ha_innodb.cc	2010-02-25 12:55:31 +0000
@@ -5296,6 +5296,7 @@ ha_innobase::create(
 	table. Currently InnoDB does not support symbolic link on Windows. */
 
 	if (srv_file_per_table
+	    && !mysqld_embedded
 	    && (!create_info->options & HA_LEX_CREATE_TMP_TABLE)) {
 
 		if ((name[1] == ':')
@@ -8669,7 +8670,14 @@ C_MODE_END
 
 Item *ha_innobase::idx_cond_push(uint keyno_arg, Item* idx_cond_arg)
 {
-  if (keyno_arg != primary_key)
+  /* Accept to handle the pushed index condition when the following
+     conditions are true:
+     1. The index is not the primary key
+     2. The lock mode is not LOCK_X (since we in build_template
+        will change from using the index to using the clustered index
+        when the lock mode is LOCK_X). */
+  
+  if (keyno_arg != primary_key && prebuilt->select_lock_type != LOCK_X)
   {
     pushed_idx_cond_keyno= keyno_arg;
     pushed_idx_cond= idx_cond_arg;

=== modified file 'storage/innobase/row/row0sel.c'
--- a/storage/innobase/row/row0sel.c	2009-11-30 11:00:37 +0000
+++ b/storage/innobase/row/row0sel.c	2010-02-25 12:55:31 +0000
@@ -4149,7 +4149,18 @@ idx_cond_check:
         if (prebuilt->idx_cond_func)
         {
           int res;
-          ut_ad(prebuilt->template_type != ROW_MYSQL_DUMMY_TEMPLATE);
+
+          /*
+            The current ICP code does not support the case where InnoDB
+            has decided to change from just reading the index entry
+            to reading the entire record. In this situation the
+            mysql_template array is set up to compare fields from
+            record not just the index entry's fields. ICP should not
+            be in use in this case but to detect if this anyway
+            happens the following assert is added.
+          */
+          ut_ad(prebuilt->template_type == ROW_MYSQL_REC_FIELDS);
+
           offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap);
           row_sel_store_mysql_rec(buf, prebuilt, rec,
                                   offsets, 0, prebuilt->n_index_fields);

Attachment: [text/bzr-bundle] bzr/alik@sun.com-20100225194420-p60r4u90tszj8q2x.bundle
Thread
bzr push into mysql-6.0-codebase branch (alik:2943 to 2965)Alexander Nozdrin25 Feb