List:Commits« Previous MessageNext Message »
From:jonas oreland Date:October 14 2011 11:53am
Subject:bzr push into mysql-5.5-cluster branch (jonas.oreland:3586)
View as plain text  
 3586 jonas oreland	2011-10-14 [merge]
      ndb - merge 72-main (memcached)

    removed:
      mysql-test/suite/ndb/t/memcache_basic.test
      storage/ndb/memcache/cache-src/
      storage/ndb/memcache/cache-src/LICENSE
      storage/ndb/memcache/cache-src/assoc.c
      storage/ndb/memcache/cache-src/assoc.h
      storage/ndb/memcache/cache-src/default_engine.c
      storage/ndb/memcache/cache-src/default_engine.h
      storage/ndb/memcache/cache-src/items.c
      storage/ndb/memcache/cache-src/items.h
      storage/ndb/memcache/cache-src/slabs.c
      storage/ndb/memcache/cache-src/slabs.h
      storage/ndb/memcache/cache-src/trace.h
    added:
      mysql-test/suite/ndb_memcache/include/wait_for_reconf.inc
      mysql-test/suite/ndb_memcache/r/type_numeric.result
      mysql-test/suite/ndb_memcache/t/type_numeric.test
      storage/ndb/memcache/extra/
      storage/ndb/memcache/extra/libevent/
      storage/ndb/memcache/extra/libevent/CMakeLists.txt
      storage/ndb/memcache/extra/libevent/Doxyfile
      storage/ndb/memcache/extra/libevent/README
      storage/ndb/memcache/extra/libevent/WIN32-Code/
      storage/ndb/memcache/extra/libevent/WIN32-Code/event-config.h
      storage/ndb/memcache/extra/libevent/WIN32-Code/misc.c
      storage/ndb/memcache/extra/libevent/WIN32-Code/misc.h
      storage/ndb/memcache/extra/libevent/WIN32-Code/tree.h
      storage/ndb/memcache/extra/libevent/WIN32-Code/win32.c
      storage/ndb/memcache/extra/libevent/WIN32-Prj/
      storage/ndb/memcache/extra/libevent/WIN32-Prj/libevent.dsp
      storage/ndb/memcache/extra/libevent/WIN32-Prj/libevent.dsw
      storage/ndb/memcache/extra/libevent/WIN32-Prj/libevent.sln
      storage/ndb/memcache/extra/libevent/buffer.c
      storage/ndb/memcache/extra/libevent/compat/
      storage/ndb/memcache/extra/libevent/compat/sys/
      storage/ndb/memcache/extra/libevent/compat/sys/_time.h
      storage/ndb/memcache/extra/libevent/compat/sys/queue.h
      storage/ndb/memcache/extra/libevent/devpoll.c
      storage/ndb/memcache/extra/libevent/epoll.c
      storage/ndb/memcache/extra/libevent/epoll_sub.c
      storage/ndb/memcache/extra/libevent/evbuffer.c
      storage/ndb/memcache/extra/libevent/evdns.3
      storage/ndb/memcache/extra/libevent/evdns.c
      storage/ndb/memcache/extra/libevent/evdns.h
      storage/ndb/memcache/extra/libevent/event-internal.h
      storage/ndb/memcache/extra/libevent/event.3
      storage/ndb/memcache/extra/libevent/event.c
      storage/ndb/memcache/extra/libevent/event.h
      storage/ndb/memcache/extra/libevent/event_rpcgen.py
      storage/ndb/memcache/extra/libevent/event_tagging.c
      storage/ndb/memcache/extra/libevent/evhttp.h
      storage/ndb/memcache/extra/libevent/evport.c
      storage/ndb/memcache/extra/libevent/evrpc-internal.h
      storage/ndb/memcache/extra/libevent/evrpc.c
      storage/ndb/memcache/extra/libevent/evrpc.h
      storage/ndb/memcache/extra/libevent/evsignal.h
      storage/ndb/memcache/extra/libevent/evutil.c
      storage/ndb/memcache/extra/libevent/evutil.h
      storage/ndb/memcache/extra/libevent/http-internal.h
      storage/ndb/memcache/extra/libevent/http.c
      storage/ndb/memcache/extra/libevent/kqueue.c
      storage/ndb/memcache/extra/libevent/log.c
      storage/ndb/memcache/extra/libevent/log.h
      storage/ndb/memcache/extra/libevent/min_heap.h
      storage/ndb/memcache/extra/libevent/poll.c
      storage/ndb/memcache/extra/libevent/sample/
      storage/ndb/memcache/extra/libevent/sample/Makefile.am
      storage/ndb/memcache/extra/libevent/sample/event-test.c
      storage/ndb/memcache/extra/libevent/sample/signal-test.c
      storage/ndb/memcache/extra/libevent/sample/time-test.c
      storage/ndb/memcache/extra/libevent/select.c
      storage/ndb/memcache/extra/libevent/signal.c
      storage/ndb/memcache/extra/libevent/strlcpy-internal.h
      storage/ndb/memcache/extra/libevent/strlcpy.c
      storage/ndb/memcache/extra/libevent/test/
      storage/ndb/memcache/extra/libevent/test/Makefile.am
      storage/ndb/memcache/extra/libevent/test/bench.c
      storage/ndb/memcache/extra/libevent/test/regress.c
      storage/ndb/memcache/extra/libevent/test/regress.gen.c
      storage/ndb/memcache/extra/libevent/test/regress.gen.h
      storage/ndb/memcache/extra/libevent/test/regress.h
      storage/ndb/memcache/extra/libevent/test/regress.rpc
      storage/ndb/memcache/extra/libevent/test/regress_dns.c
      storage/ndb/memcache/extra/libevent/test/regress_http.c
      storage/ndb/memcache/extra/libevent/test/regress_rpc.c
      storage/ndb/memcache/extra/libevent/test/test-eof.c
      storage/ndb/memcache/extra/libevent/test/test-init.c
      storage/ndb/memcache/extra/libevent/test/test-time.c
      storage/ndb/memcache/extra/libevent/test/test-weof.c
      storage/ndb/memcache/extra/libevent/test/test.sh
      storage/ndb/memcache/extra/memcached/
      storage/ndb/memcache/extra/memcached/AUTHORS
      storage/ndb/memcache/extra/memcached/CMakeLists.txt
      storage/ndb/memcache/extra/memcached/LICENSE
      storage/ndb/memcache/extra/memcached/config_static.h
      storage/ndb/memcache/extra/memcached/config_tests.in
      storage/ndb/memcache/extra/memcached/daemon/
      storage/ndb/memcache/extra/memcached/daemon/cache.c
      storage/ndb/memcache/extra/memcached/daemon/cache.h
      storage/ndb/memcache/extra/memcached/daemon/daemon.c
      storage/ndb/memcache/extra/memcached/daemon/hash.c
      storage/ndb/memcache/extra/memcached/daemon/hash.h
      storage/ndb/memcache/extra/memcached/daemon/isasl.c
      storage/ndb/memcache/extra/memcached/daemon/isasl.h
      storage/ndb/memcache/extra/memcached/daemon/memcached.c
      storage/ndb/memcache/extra/memcached/daemon/memcached.h
      storage/ndb/memcache/extra/memcached/daemon/sasl_defs.c
      storage/ndb/memcache/extra/memcached/daemon/sasl_defs.h
      storage/ndb/memcache/extra/memcached/daemon/solaris_priv.c
      storage/ndb/memcache/extra/memcached/daemon/stats.c
      storage/ndb/memcache/extra/memcached/daemon/stats.h
      storage/ndb/memcache/extra/memcached/daemon/thread.c
      storage/ndb/memcache/extra/memcached/daemon/topkeys.c
      storage/ndb/memcache/extra/memcached/daemon/topkeys.h
      storage/ndb/memcache/extra/memcached/engines/
      storage/ndb/memcache/extra/memcached/engines/default_engine/
      storage/ndb/memcache/extra/memcached/engines/default_engine/assoc.c
      storage/ndb/memcache/extra/memcached/engines/default_engine/assoc.h
      storage/ndb/memcache/extra/memcached/engines/default_engine/default_engine.c
      storage/ndb/memcache/extra/memcached/engines/default_engine/default_engine.h
      storage/ndb/memcache/extra/memcached/engines/default_engine/items.c
      storage/ndb/memcache/extra/memcached/engines/default_engine/items.h
      storage/ndb/memcache/extra/memcached/engines/default_engine/slabs.c
      storage/ndb/memcache/extra/memcached/engines/default_engine/slabs.h
      storage/ndb/memcache/extra/memcached/extensions/
      storage/ndb/memcache/extra/memcached/extensions/daemon/
      storage/ndb/memcache/extra/memcached/extensions/daemon/stdin_check.c
      storage/ndb/memcache/extra/memcached/extensions/loggers/
      storage/ndb/memcache/extra/memcached/extensions/loggers/blackhole_logger.c
      storage/ndb/memcache/extra/memcached/extensions/loggers/eventlog_logger.c
      storage/ndb/memcache/extra/memcached/extensions/loggers/syslog_logger.c
      storage/ndb/memcache/extra/memcached/extensions/protocol/
      storage/ndb/memcache/extra/memcached/extensions/protocol/ascii_scrub.c
      storage/ndb/memcache/extra/memcached/extensions/protocol/example_protocol.c
      storage/ndb/memcache/extra/memcached/extensions/protocol/fragment_rw.c
      storage/ndb/memcache/extra/memcached/extensions/protocol/fragment_rw.h
      storage/ndb/memcache/extra/memcached/extensions/protocol_extension.h
      storage/ndb/memcache/extra/memcached/include/
      storage/ndb/memcache/extra/memcached/include/memcached/
      storage/ndb/memcache/extra/memcached/include/memcached/callback.h
      storage/ndb/memcache/extra/memcached/include/memcached/config_parser.h
      storage/ndb/memcache/extra/memcached/include/memcached/engine.h
      storage/ndb/memcache/extra/memcached/include/memcached/engine_common.h
      storage/ndb/memcache/extra/memcached/include/memcached/engine_testapp.h
      storage/ndb/memcache/extra/memcached/include/memcached/extension.h
      storage/ndb/memcache/extra/memcached/include/memcached/extension_loggers.h
      storage/ndb/memcache/extra/memcached/include/memcached/genhash.h
      storage/ndb/memcache/extra/memcached/include/memcached/protocol_binary.h
      storage/ndb/memcache/extra/memcached/include/memcached/protocol_plugin.h
      storage/ndb/memcache/extra/memcached/include/memcached/server_api.h
      storage/ndb/memcache/extra/memcached/include/memcached/types.h
      storage/ndb/memcache/extra/memcached/include/memcached/util.h
      storage/ndb/memcache/extra/memcached/include/memcached/vbucket.h
      storage/ndb/memcache/extra/memcached/include/memcached/visibility.h
      storage/ndb/memcache/extra/memcached/programs/
      storage/ndb/memcache/extra/memcached/programs/engine_testapp.c
      storage/ndb/memcache/extra/memcached/programs/mcstat.c
      storage/ndb/memcache/extra/memcached/programs/mock_server.c
      storage/ndb/memcache/extra/memcached/programs/mock_server.h
      storage/ndb/memcache/extra/memcached/programs/sizes.c
      storage/ndb/memcache/extra/memcached/programs/testapp.c
      storage/ndb/memcache/extra/memcached/programs/timedrun.c
      storage/ndb/memcache/extra/memcached/t/
      storage/ndb/memcache/extra/memcached/t/00-startup.t
      storage/ndb/memcache/extra/memcached/t/64bit.t
      storage/ndb/memcache/extra/memcached/t/binary-get.t
      storage/ndb/memcache/extra/memcached/t/binary-sasl.t.in
      storage/ndb/memcache/extra/memcached/t/binary.t
      storage/ndb/memcache/extra/memcached/t/bogus-commands.t
      storage/ndb/memcache/extra/memcached/t/cas.t
      storage/ndb/memcache/extra/memcached/t/cmd_extensions.t
      storage/ndb/memcache/extra/memcached/t/daemonize.t
      storage/ndb/memcache/extra/memcached/t/dash-M.t
      storage/ndb/memcache/extra/memcached/t/evictions.t
      storage/ndb/memcache/extra/memcached/t/expirations.t
      storage/ndb/memcache/extra/memcached/t/flags.t
      storage/ndb/memcache/extra/memcached/t/flush-all.t
      storage/ndb/memcache/extra/memcached/t/getset.t
      storage/ndb/memcache/extra/memcached/t/incrdecr.t
      storage/ndb/memcache/extra/memcached/t/issue_104.t
      storage/ndb/memcache/extra/memcached/t/issue_108.t
      storage/ndb/memcache/extra/memcached/t/issue_14.t
      storage/ndb/memcache/extra/memcached/t/issue_140.t
      storage/ndb/memcache/extra/memcached/t/issue_152.t
      storage/ndb/memcache/extra/memcached/t/issue_163.t
      storage/ndb/memcache/extra/memcached/t/issue_183.t
      storage/ndb/memcache/extra/memcached/t/issue_22.t
      storage/ndb/memcache/extra/memcached/t/issue_29.t
      storage/ndb/memcache/extra/memcached/t/issue_3.t
      storage/ndb/memcache/extra/memcached/t/issue_41.t
      storage/ndb/memcache/extra/memcached/t/issue_42.t
      storage/ndb/memcache/extra/memcached/t/issue_50.t
      storage/ndb/memcache/extra/memcached/t/issue_61.t
      storage/ndb/memcache/extra/memcached/t/issue_67.t
      storage/ndb/memcache/extra/memcached/t/issue_68.t
      storage/ndb/memcache/extra/memcached/t/issue_70.t
      storage/ndb/memcache/extra/memcached/t/item_size_max.t
      storage/ndb/memcache/extra/memcached/t/lib/
      storage/ndb/memcache/extra/memcached/t/lib/MemcachedTest.pm
      storage/ndb/memcache/extra/memcached/t/line-lengths.t
      storage/ndb/memcache/extra/memcached/t/lru.t
      storage/ndb/memcache/extra/memcached/t/maxconns.t
      storage/ndb/memcache/extra/memcached/t/multiversioning.t
      storage/ndb/memcache/extra/memcached/t/noreply.t
      storage/ndb/memcache/extra/memcached/t/sasl/
      storage/ndb/memcache/extra/memcached/t/sasl/memcached.conf
      storage/ndb/memcache/extra/memcached/t/scrub.t
      storage/ndb/memcache/extra/memcached/t/stats-detail.t
      storage/ndb/memcache/extra/memcached/t/stats.t
      storage/ndb/memcache/extra/memcached/t/stress-memcached.pl
      storage/ndb/memcache/extra/memcached/t/topkeys.t
      storage/ndb/memcache/extra/memcached/t/udp.t
      storage/ndb/memcache/extra/memcached/t/unixsocket.t
      storage/ndb/memcache/extra/memcached/t/verbosity.t
      storage/ndb/memcache/extra/memcached/t/whitespace.t
      storage/ndb/memcache/extra/memcached/testsuite/
      storage/ndb/memcache/extra/memcached/testsuite/basic_engine_testsuite.c
      storage/ndb/memcache/extra/memcached/testsuite/basic_engine_testsuite.h
      storage/ndb/memcache/extra/memcached/testsuite/breakdancer/
      storage/ndb/memcache/extra/memcached/testsuite/breakdancer/breakdancer.py
      storage/ndb/memcache/extra/memcached/testsuite/breakdancer/engine_test.py
      storage/ndb/memcache/extra/memcached/testsuite/breakdancer/suite_stubs.c
      storage/ndb/memcache/extra/memcached/testsuite/breakdancer/suite_stubs.h
      storage/ndb/memcache/extra/memcached/trace.h
      storage/ndb/memcache/extra/memcached/utilities/
      storage/ndb/memcache/extra/memcached/utilities/config_parser.c
      storage/ndb/memcache/extra/memcached/utilities/engine_loader.c
      storage/ndb/memcache/extra/memcached/utilities/engine_loader.h
      storage/ndb/memcache/extra/memcached/utilities/extension_loggers.c
      storage/ndb/memcache/extra/memcached/utilities/genhash.c
      storage/ndb/memcache/extra/memcached/utilities/genhash_int.h
      storage/ndb/memcache/extra/memcached/utilities/util.c
      storage/ndb/memcache/extra/memcached/win32/
      storage/ndb/memcache/extra/memcached/win32/Makefile.mingw
      storage/ndb/memcache/extra/memcached/win32/config.sh
      storage/ndb/memcache/extra/memcached/win32/defs.c
      storage/ndb/memcache/extra/memcached/win32/dlfcn.c
      storage/ndb/memcache/extra/memcached/win32/dlfcn.h
      storage/ndb/memcache/extra/memcached/win32/sysexits.h
      storage/ndb/memcache/extra/memcached/win32/win32.c
      storage/ndb/memcache/extra/memcached/win32/win32.h
      storage/ndb/memcache/include/ConnQueryPlanSet.h
      storage/ndb/memcache/src/ConnQueryPlanSet.cc
      storage/ndb/memcache/src/stub.cc
    modified:
      .bzrignore
      BUILD/compile-pentium-debug-max-no-ndb
      mysql-test/lib/My/Memcache.pm
      mysql-test/mysql-test-run.pl
      mysql-test/suite/ndb_memcache/include/datatypes_tables.inc
      mysql-test/suite/ndb_memcache/include/memcached_wait_for_ready.inc
      mysql-test/suite/ndb_memcache/t/reconf1.test
      mysql-test/suite/ndb_memcache/t/type_char.test
      mysql-test/suite/ndb_memcache/t/type_signed.test
      mysql-test/suite/ndb_memcache/t/type_unsigned.test
      storage/ndb/memcache/CMakeLists.txt
      storage/ndb/memcache/FindMemcached.cmake
      storage/ndb/memcache/atomics.cmake
      storage/ndb/memcache/include/Config_v1.h
      storage/ndb/memcache/include/Configuration.h
      storage/ndb/memcache/include/DataTypeHandler.h
      storage/ndb/memcache/include/NdbInstance.h
      storage/ndb/memcache/include/Operation.h
      storage/ndb/memcache/include/QueryPlan.h
      storage/ndb/memcache/include/Record.h
      storage/ndb/memcache/include/Scheduler.h
      storage/ndb/memcache/include/TabSeparatedValues.h
      storage/ndb/memcache/include/TableSpec.h
      storage/ndb/memcache/include/atomics.h
      storage/ndb/memcache/include/debug.h
      storage/ndb/memcache/include/ndbmemcache_config.in
      storage/ndb/memcache/include/workitem.h
      storage/ndb/memcache/memcached_path.pl.in
      storage/ndb/memcache/sandbox.sh.in
      storage/ndb/memcache/src/ClusterConnectionPool.cc
      storage/ndb/memcache/src/Config_v1.cc
      storage/ndb/memcache/src/Configuration.cc
      storage/ndb/memcache/src/DataTypeHandler.cc
      storage/ndb/memcache/src/NdbInstance.cc
      storage/ndb/memcache/src/Operation.cc
      storage/ndb/memcache/src/QueryPlan.cc
      storage/ndb/memcache/src/Record.cc
      storage/ndb/memcache/src/TabSeparatedValues.cc
      storage/ndb/memcache/src/TableSpec.cc
      storage/ndb/memcache/src/ndb_configuration.cc
      storage/ndb/memcache/src/ndb_engine.c
      storage/ndb/memcache/src/ndb_engine_private.h
      storage/ndb/memcache/src/ndb_pipeline.cc
      storage/ndb/memcache/src/ndb_worker.cc
      storage/ndb/memcache/src/schedulers/S_sched.cc
      storage/ndb/memcache/src/schedulers/S_sched.h
      storage/ndb/memcache/src/schedulers/Stockholm.cc
      storage/ndb/memcache/src/schedulers/Stockholm.h
      storage/ndb/memcache/src/workitem.c
      storage/ndb/memcache/unit/CMakeLists.txt
      storage/ndb/memcache/unit/all_tests.h
      storage/ndb/memcache/unit/alloc.cc
      storage/ndb/memcache/unit/cas.cc
      storage/ndb/memcache/unit/casbits.cc
      storage/ndb/memcache/unit/connpool.cc
      storage/ndb/memcache/unit/harness.cc
      storage/ndb/memcache/unit/incr.cc
      storage/ndb/memcache/unit/queue.cc
      storage/ndb/memcache/unit/stub_logger.c
      storage/ndb/memcache/unit/test_workqueue.c
      storage/ndb/memcache/unit/tsv.cc
      support-files/compiler_warnings.supp
=== added file 'mysql-test/suite/ndb/include/have_ndb_rqg.inc'
--- a/mysql-test/suite/ndb/include/have_ndb_rqg.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/include/have_ndb_rqg.inc	2011-10-14 10:55:41 +0000
@@ -0,0 +1,80 @@
+--perl
+use strict;
+
+use File::Basename;
+use IO::File;
+use lib "lib/";
+use My::Find;
+
+#
+# Look for
+# - RQG_HOME
+# - binaries needed to run ndb rqg scripts
+#
+
+#
+# Set up paths
+#
+my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR";
+my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
+my $basedir = dirname($mysql_test_dir);
+
+#
+# Check if the needed jars and libs are available
+#
+
+my $runall = my_find_file($basedir,
+                          ["storage/ndb/test/rqg" ],
+                          "load_and_run.sh", NOT_REQUIRED);
+
+my $loadrqg = my_find_file($basedir,
+                          ["storage/ndb/test/rqg" ],
+                          "load_rqg.sh", NOT_REQUIRED);
+
+my $runrqg = my_find_file($basedir,
+                          ["storage/ndb/test/rqg" ],
+                          "run_rqg.sh", NOT_REQUIRED);
+
+my $exe_mysqltest = my_find_bin($basedir,
+		                ["client", "bin"],
+                                "mysqltest", NOT_REQUIRED);
+
+my $F = IO::File->new("$vardir/tmp/have_ndb_rqg.inc", 'w') or die;
+if ($ENV{RQG_HOME}) {
+  print $F "--echo RQG_HOME: $ENV{RQG_HOME}\n"
+} else {
+  print $F "skip Could not find RQG, set environment variable RQG_HOME\n";
+}
+
+my $env_mysqltest="";
+if ($exe_mysqltest) {
+  $env_mysqltest="EXE_MYSQLTEST=$exe_mysqltest"
+}
+else {
+  print $F "skip Could find mysqltest binary\n";
+}
+
+
+if ($runall) {
+  print $F "--let \$RUN_ALL= $env_mysqltest $runall -p \$MASTER_MYPORT\n"
+} else {
+  print $F "skip Could not find load_and_run.sh\n";
+}
+
+if ($loadrqg) {
+  print $F "--let \$LOAD_RQG= $env_mysqltest $loadrqg -p \$MASTER_MYPORT\n"
+} else {
+  print $F "skip Could not find load_rqg.sh\n";
+}
+
+if ($runrqg) {
+  print $F "--let \$RUN_RQG= $env_mysqltest $runrqg -p \$MASTER_MYPORT\n"
+} else {
+  print $F "skip Could not find run_rqg.sh\n";
+}
+
+$F->close();
+
+EOF
+
+--source $MYSQLTEST_VARDIR/tmp/have_ndb_rqg.inc

=== modified file 'mysql-test/suite/ndb_big/my.cnf'
--- a/mysql-test/suite/ndb_big/my.cnf	2010-08-02 11:36:25 +0000
+++ b/mysql-test/suite/ndb_big/my.cnf	2011-10-14 10:46:09 +0000
@@ -70,4 +70,6 @@ ndb-wait-connected=600
 ndb-wait-setup=300
 
 [ENV]
-NDB_CONNECTSTRING=             @mysql_cluster.1.ndb_connectstring
\ No newline at end of file
+NDB_CONNECTSTRING=             @mysql_cluster.1.ndb_connectstring
+MASTER_MYPORT=                 @mysqld.1.1.port
+

=== added file 'mysql-test/suite/ndb_big/rqg_spj-master.opt'
--- a/mysql-test/suite/ndb_big/rqg_spj-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb_big/rqg_spj-master.opt	2011-10-14 11:24:08 +0000
@@ -0,0 +1 @@
+--testcase-timeout=90

=== added file 'mysql-test/suite/ndb_big/rqg_spj.test'
--- a/mysql-test/suite/ndb_big/rqg_spj.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb_big/rqg_spj.test	2011-10-14 11:24:08 +0000
@@ -0,0 +1,51 @@
+#
+# RQG SPJ
+#
+--source include/have_ndb.inc
+--source include/not_windows.inc
+--source include/not_embedded.inc
+--source suite/ndb/include/have_ndb_rqg.inc
+--source suite/ndb/t/ndbinfo_create.inc
+
+# Remember all SPJ conters when test started.
+--disable_query_log
+create temporary table spj_counts_at_startup 
+       select counter_name, sum(val) as val 
+       from ndbinfo.counters 
+       where block_name='DBSPJ' 
+       group by counter_name;
+--enable_query_log
+
+##
+# Load simple.zz
+# -o => with "oj-extensions"
+--echo Calling: $LOAD_RQG -d simple.zz -o
+--exec $LOAD_RQG -d simple.zz -o
+
+##
+# run spj_test.yy for 3600 seconds
+#
+# If you want to reproduce an "run"
+#   add -s <seed value> to command below
+#
+--echo Calling: $RUN_RQG -g spj_test.yy -t 3600
+--exec $RUN_RQG -g spj_test.yy -t 3600
+
+drop database spj_myisam;
+drop database spj_ndb;
+
+--disable_query_log
+create temporary table spj_counts_at_end
+       select counter_name, sum(val) as val
+       from ndbinfo.counters 
+       where block_name='DBSPJ' 
+       group by counter_name;
+
+select spj_counts_at_end.counter_name, 
+       spj_counts_at_end.val - spj_counts_at_startup.val
+from spj_counts_at_startup, spj_counts_at_end
+where spj_counts_at_startup.counter_name = spj_counts_at_end.counter_name;
+--enable_query_log
+--source suite/ndb/t/ndbinfo_drop.inc
+
+exit;

=== added file 'storage/ndb/test/rqg/alter_engine.sproc.sql'
--- a/storage/ndb/test/rqg/alter_engine.sproc.sql	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/rqg/alter_engine.sproc.sql	2011-10-14 10:52:20 +0000
@@ -0,0 +1,24 @@
+delimiter |;
+CREATE PROCEDURE alter_engine (db varchar(64), newengine varchar(64))
+BEGIN
+
+  declare tabname varchar(255);
+  declare done integer default 0;
+  declare c cursor for 
+  SELECT table_name
+  FROM INFORMATION_SCHEMA.TABLES where table_schema = db;
+  declare continue handler for not found set done = 1;
+
+  open c;
+  
+  repeat
+    fetch c into tabname;
+    if not done then
+       set @ddl = CONCAT('ALTER TABLE ', db, '.', tabname, 
+                         ' engine = ', newengine);
+       PREPARE stmt from @ddl;
+       EXECUTE stmt;
+    end if;
+  until done end repeat;
+  close c;
+END

=== added file 'storage/ndb/test/rqg/analyze_db.sproc.sql'
--- a/storage/ndb/test/rqg/analyze_db.sproc.sql	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/rqg/analyze_db.sproc.sql	2011-10-14 10:52:20 +0000
@@ -0,0 +1,24 @@
+delimiter |;
+CREATE PROCEDURE analyze_db (db varchar(64))
+BEGIN
+
+  declare tabname varchar(255);
+  declare done integer default 0;
+  declare c cursor for 
+  SELECT table_name
+  FROM INFORMATION_SCHEMA.TABLES where table_schema = db;
+  declare continue handler for not found set done = 1;
+
+  open c;
+  
+  repeat
+    fetch c into tabname;
+    if not done then
+       set @ddl = CONCAT('ANALYZE TABLE ', db, '.', tabname);
+       PREPARE stmt from @ddl;
+       EXECUTE stmt;
+    end if;
+  until done end repeat;
+  close c;
+END
+

=== added file 'storage/ndb/test/rqg/copydb.sproc.sql'
--- a/storage/ndb/test/rqg/copydb.sproc.sql	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/rqg/copydb.sproc.sql	2011-10-14 10:52:20 +0000
@@ -0,0 +1,31 @@
+delimiter |;
+CREATE PROCEDURE copydb(dstdb varchar(64), srcdb varchar(64))
+BEGIN
+
+  declare tabname varchar(255);
+  declare done integer default 0;
+  declare c cursor for 
+    SELECT table_name
+    FROM INFORMATION_SCHEMA.TABLES where table_schema = srcdb;
+
+  declare continue handler for not found set done = 1;
+
+  open c;
+  
+  repeat
+    fetch c into tabname;
+    if not done then
+       set @ddl = CONCAT('CREATE TABLE ', dstdb, '.', tabname, 
+                         ' LIKE ', srcdb, '.', tabname);
+       PREPARE stmt from @ddl;
+       EXECUTE stmt;
+
+       set @ddl = CONCAT('INSERT INTO ', dstdb, '.', tabname, 
+                         ' SELECT * FROM ', srcdb, '.', tabname);
+       PREPARE stmt from @ddl;
+       EXECUTE stmt;
+    end if;
+  until done end repeat;
+  close c;
+END;
+\G

=== added file 'storage/ndb/test/rqg/load_and_run.sh'
--- a/storage/ndb/test/rqg/load_and_run.sh	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/rqg/load_and_run.sh	2011-10-14 10:52:20 +0000
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+
+set -e
+
+base="`dirname $0`"
+source "$base"/parseargs.sh
+
+ecp="set engine_condition_pushdown=on;"
+
+if [ "$load" ]
+then
+    source "$base"/load.sh
+fi
+
+if [ "$runtime" -o "$loops" ]
+then
+    source "$base"/run.sh
+fi

=== added file 'storage/ndb/test/rqg/load_rqg.sh'
--- a/storage/ndb/test/rqg/load_rqg.sh	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/rqg/load_rqg.sh	2011-10-14 10:52:20 +0000
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+
+set -e
+
+base="`dirname $0`"
+source "$base"/parseargs.sh
+
+# Create database with a case sensitive collation to ensure a deterministic 
+# resultset when 'LIMIT' is specified:
+charset_spec=""
+if [ "$charset" ]
+then
+    charset_spec="character set $charset"
+fi
+
+sprocs="copydb alter_engine analyze_db"
+if [ "$oj" ]
+then
+    sprocs="oj_schema_mod copydb alter_engine oj_schema_mod_ndb analyze_db"
+fi
+
+$mysql_exe -e "drop database if exists ${myisam_db};"
+$mysql_exe -e "drop database if exists ${ndb_db};"
+$mysql_exe -e "create database ${myisam_db} ${charset_spec};"
+$mysql_exe -e "create database ${ndb_db} ${charset_spec}"
+
+# Call RANDGEN
+${gendata} --dsn="$dsn:database=${myisam_db}" --spec ${data}
+
+for i in $sprocs
+do
+    $mysql_exe ${ndb_db} < $base/$i.sproc.sql
+done
+
+for i in $sprocs
+do
+    if [ "$i" = "oj_schema_mod" ]
+    then
+	$mysql_exe ${ndb_db} -e "call $i('${myisam_db}');"
+    elif [ "$i" = "copydb" ]
+    then
+	$mysql_exe ${ndb_db} -e "call copydb('${ndb_db}', '${myisam_db}');"
+    elif [ "$i" = "alter_engine" ]
+    then
+	$mysql_exe ${ndb_db} -e "call $i('${ndb_db}', 'ndb');"
+    else
+	$mysql_exe ${ndb_db} -e "call $i('${ndb_db}');"
+    fi
+done
+
+
+for i in $sprocs
+do
+    $mysql_exe ${ndb_db} -e "drop procedure $i;"
+done

=== added file 'storage/ndb/test/rqg/oj_schema_mod.sproc.sql'
--- a/storage/ndb/test/rqg/oj_schema_mod.sproc.sql	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/rqg/oj_schema_mod.sproc.sql	2011-10-14 10:52:20 +0000
@@ -0,0 +1,157 @@
+delimiter |;
+CREATE PROCEDURE oj_schema_mod(db varchar(64))
+BEGIN
+
+  declare tabname varchar(255);
+  declare indextype varchar(32);
+  declare _unique varchar(16);
+  declare done integer default 0;
+  declare cnt integer default 0;
+  declare c cursor for 
+    SELECT table_name
+    FROM INFORMATION_SCHEMA.TABLES where table_schema = db;
+  declare continue handler for not found set done = 1;
+
+  open c;
+  
+  repeat
+    fetch c into tabname;
+    if not done then
+       ## Drop the original index 'col_int_unique' - recreate a richer set of indexes below
+       set @ddl = CONCAT('DROP INDEX col_int_unique ON ', db, '.', tabname);
+       select @ddl;
+       PREPARE stmt from @ddl;
+       EXECUTE stmt;
+
+       set cnt = cnt+1;
+
+       set _unique = '';
+       set indextype = '';
+       ## Create a mix if 'CREATE INDEX' | 'CREATE UNIQUE INDEX [USING HASH] '
+
+       if ((cnt%3) <> 0) then
+         set _unique = ' UNIQUE';
+
+         if ((cnt%2) = 0) then
+           set indextype = ' USING HASH';
+         else
+           set indextype = '';
+         end if;
+       end if;
+
+       ## Add some composite, possibly unique, indexes
+       if tabname > 'T' then
+          set @ddl = CONCAT('DROP INDEX col_varchar_10_unique ON ', db, '.', tabname);
+          select @ddl;
+          PREPARE stmt from @ddl;
+          EXECUTE stmt;
+
+          set @ddl = CONCAT('CREATE', _unique, ' INDEX ix1 ', indextype,
+                            ' ON ', db, '.', tabname, 
+                            '(col_char_16,col_char_16_unique)');
+          select @ddl;
+          PREPARE stmt from @ddl;
+          EXECUTE stmt;
+          set @ddl = CONCAT('CREATE', _unique, ' INDEX ix2 ', indextype,
+                            ' ON ', db, '.', tabname, 
+                            '(col_varchar_256,col_varchar_10_unique)');
+          select @ddl;
+          PREPARE stmt from @ddl;
+          EXECUTE stmt;
+
+       elseif tabname > 'O' then
+          set @ddl = CONCAT('CREATE', _unique, ' INDEX ix1 ', indextype,
+                            ' ON ', db, '.', tabname, 
+                            '(col_int,col_int_unique)');
+          select @ddl;
+          PREPARE stmt from @ddl;
+          EXECUTE stmt;
+          set @ddl = CONCAT('CREATE', _unique, ' INDEX ix2 ', indextype,
+                            ' ON ', db, '.', tabname, 
+                            '(col_int_key,col_int_unique)');
+          select @ddl;
+          PREPARE stmt from @ddl;
+          EXECUTE stmt;
+
+       elseif tabname > 'H' then
+          set @ddl = CONCAT('CREATE', _unique, ' INDEX ix3 ', indextype,
+                            ' ON ', db, '.', tabname, 
+                            '(col_int,col_int_key,col_int_unique)');
+          select @ddl;
+          PREPARE stmt from @ddl;
+          EXECUTE stmt;
+
+       else
+          set @ddl = CONCAT('CREATE', _unique, ' INDEX ix1', indextype,
+                            ' ON ', db, '.', tabname, 
+                            '(col_int_unique)');
+          select @ddl;
+          PREPARE stmt from @ddl;
+          EXECUTE stmt;
+       end if;
+
+       ## Modify primary key & partition for some tables
+       if ((cnt%3) = 0) then
+           set @ddl = CONCAT('UPDATE ', db, '.', tabname, ' SET col_int=0 WHERE col_int IS NULL');
+	   select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+           set @ddl = CONCAT('ALTER TABLE ', db, '.', tabname,
+                               '  CHANGE COLUMN pk pk INT(11) NOT NULL',
+                               ', DROP PRIMARY KEY',
+                               ', ADD PRIMARY KEY ', '(col_int,pk)');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+        elseif ((cnt%5) = 0) then
+       	   # NOTE DML needs to be run on both new/org db
+           set @ddl = CONCAT('UPDATE ', db, '.', tabname, ' SET col_int=0 WHERE col_int IS NULL');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+           set @ddl = CONCAT('ALTER TABLE ', db, '.', tabname,
+                               '  CHANGE COLUMN pk pk INT(11) NOT NULL',
+                               ', DROP PRIMARY KEY',
+                               ', ADD PRIMARY KEY', indextype, '(col_int,pk)');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+        elseif ((cnt%7) = 0) then
+       	   # NOTE DML needs to be run on both new/org db
+           set @ddl = CONCAT('DELETE FROM ', db, '.', tabname, ' WHERE col_char_16 IS NULL');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+           set @ddl = CONCAT('ALTER TABLE ', db, '.', tabname,
+                               '  CHANGE COLUMN pk pk INT(11) NOT NULL',
+                               ', DROP PRIMARY KEY',
+                               ', ADD PRIMARY KEY', indextype, '(col_char_16,pk)');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+        elseif ((cnt%11) = 0) then
+       	   # NOTE DML needs to be run on both new/org db
+           set @ddl = CONCAT('DELETE FROM ', db, '.', tabname, ' WHERE col_varchar_10 IS NULL');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+           set @ddl = CONCAT('ALTER TABLE ', db, '.', tabname,
+                               '  CHANGE COLUMN pk pk INT(11) NOT NULL',
+                               ', DROP PRIMARY KEY',
+                               ', ADD PRIMARY KEY', indextype, '(pk,col_varchar_256)');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+        end if;
+    end if;
+  until done end repeat;
+  close c;
+END
+\G

=== added file 'storage/ndb/test/rqg/oj_schema_mod_ndb.sproc.sql'
--- a/storage/ndb/test/rqg/oj_schema_mod_ndb.sproc.sql	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/rqg/oj_schema_mod_ndb.sproc.sql	2011-10-14 10:52:20 +0000
@@ -0,0 +1,50 @@
+delimiter |;
+CREATE PROCEDURE oj_schema_mod_ndb(db varchar(64))
+BEGIN
+
+  declare tabname varchar(255);
+  declare indextype varchar(32);
+  declare _unique varchar(16);
+  declare done integer default 0;
+  declare cnt integer default 0;
+  declare c cursor for 
+    SELECT table_name
+    FROM INFORMATION_SCHEMA.TABLES where table_schema = db;
+  declare continue handler for not found set done = 1;
+
+  open c;
+  
+  repeat
+    fetch c into tabname;
+    if not done then
+       set cnt = cnt+1;
+       ## Modify primary key & partition for some tables
+       if ((cnt%3) = 0) then
+           set @ddl = CONCAT('ALTER TABLE ', db, '.', tabname, ' PARTITION BY KEY(col_int)');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+        elseif ((cnt%5) = 0) then
+           set @ddl = CONCAT('ALTER TABLE ', db, '.', tabname, ' PARTITION BY KEY(pk)');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+        elseif ((cnt%7) = 0) then
+           set @ddl = CONCAT('ALTER TABLE ', db, '.', tabname, ' PARTITION BY KEY(col_char_16)');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+
+        elseif ((cnt%11) = 0) then
+           set @ddl = CONCAT('ALTER TABLE ', db, '.', tabname, ' PARTITION BY KEY(col_varchar_256)');
+           select @ddl;
+           PREPARE stmt from @ddl;
+           EXECUTE stmt;
+        end if;
+    end if;
+  until done end repeat;
+  close c;
+END
+\G

=== added file 'storage/ndb/test/rqg/parseargs.sh'
--- a/storage/ndb/test/rqg/parseargs.sh	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/rqg/parseargs.sh	2011-10-14 10:52:20 +0000
@@ -0,0 +1,195 @@
+#!/bin/sh
+
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+
+set -e
+
+: ${load:=1}
+: ${loops:=10}
+: ${queries:=500}
+: ${host:=127.0.0.1}
+: ${port:=3306}
+: ${RQG_HOME:=~/randgen-2.2.0}
+: ${user:=root}
+: ${data:=simple.zz}
+: ${grammar:=spj_test.yy}
+: ${charset:="latin1 collate latin1_bin"}
+: ${EXE_MYSQL:=}
+: ${EXE_MYSQLTEST:=}
+: ${runtime:=}
+: ${seed:=}
+: ${mode:=m,nv,np}
+: ${oj=}
+
+while getopts ":nom:r:l:h:p:q:d:c:g:u:t:M:s:R:" opt; do
+  case $opt in
+    M)
+      MYSQL_BASE_DIR="${OPTARG}"
+      ;;
+    R)
+      RQG_HOME="${OPTARG}"
+      ;;
+    s)
+      seed="${OPTARG}"
+      ;;
+    l)
+      loops="${OPTARG}"
+      ;;
+    q)
+      queries="${OPTARG}"
+      ;;
+    d)
+      data="${OPTARG}"
+      ;;
+    c)
+      charset="${OPTARG}"
+      ;;
+    g)
+      grammar="${OPTARG}"
+      ;;
+    h)
+      host="${OPTARG}"
+      ;;
+    p)
+      port="${OPTARG}"
+      ;;
+    u)
+      user="${OPTARG}"
+      ;;
+    t)
+      runtime="${OPTARG}"
+      ;;
+    n)
+      load="";
+      ;;
+    m)
+      mode="${OPTARG}"
+      ;;
+    o)
+      oj=1
+      ;;
+    \?)
+      echo "Usage: `basename $0` [options]                        " >&2
+      echo "-R <RQH_HOME>         :                               " >&2
+      echo "-M <mysql install>    :                               " >&2
+      echo "-l <no of loops>      :                               " >&2
+      echo "-q <queries per loop> :                               " >&2
+      echo "-t <runtime>          : in seconds, overrides loops   " >&2
+      echo "-h <host>             :                               " >&2
+      echo "-p <port>             :                               " >&2
+      echo "-u <user>             :                               " >&2
+      echo "-d <data-spec>        :                               " >&2
+      echo "-g <grammar-spec>     :                               " >&2
+      echo "-n                    : skip creating/loading database" >&2
+      echo "-c <charsets>         : charsets                      " >&2
+      echo "-m <mode>             :                               " >&2
+      echo "-s <seed>             :                               " >&2
+      echo "-o                    : oj schema extentions          " >&2
+
+      exit 1
+      ;;
+    :)
+      echo "Option -$OPTARG requires an argument." >&2
+      exit 1
+      ;;
+  esac
+done
+
+if [ ! -x "${RQG_HOME}/gensql.pl" ]
+then
+    echo "Failed to locate \"${RQG_HOME}/gensql.pl\", check RQG_HOME"
+    exit 1
+fi
+
+if [ ! -x "${RQG_HOME}/gendata.pl" ]
+then
+    echo "Failed to locate \"${RQG_HOME}/gendata.pl\", check RQG_HOME"
+    exit 1
+fi
+
+if [ -z "$EXE_MYSQL" ]
+then
+    if [ -z "$MYSQL_BASE_DIR" ]
+    then
+	EXE_MYSQL=`which mysql`
+    else
+	EXE_MYSQL="$MYSQL_BASE_DIR/bin/mysql"
+    fi
+fi
+
+if [ -z "$EXE_MYSQLTEST" ]
+then
+    if [ -z "$MYSQL_BASE_DIR" ]
+    then
+	EXE_MYSQLTEST=`which mysqltest`
+    else
+	EXE_MYSQLTEST="$MYSQL_BASE_DIR/bin/mysqltest"
+    fi
+fi
+
+
+if [ ! -x "$EXE_MYSQL" ]
+then
+    echo "Failed to locate mysql binary"
+    exit 1
+fi
+
+if [ ! -x "$EXE_MYSQLTEST" ]
+then
+    echo "Failed to locate mysqltest binary"
+    exit 1
+fi
+
+if [ ! -f "${data}" ]
+then
+    if [ -f "`dirname $0`/${data}" ]
+    then
+	data="`dirname $0`/${data}"
+    fi
+fi
+
+if [ ! -f "${grammar}" ]
+then
+    if [ -f "`dirname $0`/${grammar}" ]
+    then
+	grammar="`dirname $0`/${grammar}"
+    fi
+fi
+
+
+dsn="dbi:mysql:host=${host}:port=${port}:user=root"
+gensql=${RQG_HOME}/gensql.pl
+gendata=${RQG_HOME}/gendata.pl
+mysql_exe="$EXE_MYSQL --show-warnings --user=${user} --host=${host} --port=${port}"
+mysqltest_exe="$EXE_MYSQLTEST --user=${user} --host=${host} --port=${port}"
+export RQG_HOME
+
+md5sum="md5sum"
+getepochtime="date +%s"
+if [ `uname` = "SunOS" ]
+then
+    getepochtime="nawk 'BEGIN{print srand();}'"
+fi
+
+if [ `uname` = "SunOS" ]
+then
+    md5sum="digest -a md5"
+fi
+
+pre="spj"
+opre="$pre.$$"
+myisam_db="${pre}_myisam"
+ndb_db="${pre}_ndb"

=== added file 'storage/ndb/test/rqg/run_rqg.sh'
--- a/storage/ndb/test/rqg/run_rqg.sh	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/rqg/run_rqg.sh	2011-10-14 11:36:51 +0000
@@ -0,0 +1,210 @@
+#!/bin/sh
+
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+
+set -e
+
+base="`dirname $0`"
+source "$base"/parseargs.sh
+
+ecp="set engine_condition_pushdown=on;"
+
+check_query(){
+    file=$1
+    no=$2
+    line=`expr $no \* 3` || true
+    line=`expr $line + 3 + 2 + 1 + 1` || true
+    sql=`head -n $line $file | tail -1`
+
+    tmp=${opre}.$no.sql
+    cat > $tmp <<EOF
+--disable_warnings
+--disable_query_log
+--eval set ndb_join_pushdown='\$NDB_JOIN_PUSHDOWN';
+$ecp
+--echo kalle
+--sorted_result
+--error 0,233,1242,4006
+$sql
+--exit
+EOF
+
+    NDB_JOIN_PUSHDOWN=off
+    export NDB_JOIN_PUSHDOWN
+    for t in 1
+    do
+	$mysqltest_exe ${myisam_db} < $tmp >> ${opre}.$no.myisam.$i.txt
+    done
+
+    for t in 1
+    do
+	$mysqltest_exe ${ndb_db} < $tmp >> ${opre}.$no.ndb.$i.txt
+    done
+
+    NDB_JOIN_PUSHDOWN=on
+    export NDB_JOIN_PUSHDOWN
+    for t in 1
+    do
+	$mysqltest_exe ${ndb_db} < $tmp >> ${opre}.$no.ndbpush.$i.txt
+    done
+
+    cnt=`$md5sum ${opre}.$no.*.txt | awk '{ print $1;}' | sort | uniq | wc -l`
+    if [ $cnt -ne 1 ]
+    then
+	echo -n "$no "
+	echo $sql >> ${opre}.failing.sql
+    fi
+
+    rm $tmp ${opre}.$no.*.txt
+}
+
+locate_query (){
+    file=$1
+    rows=`cat $file | wc -l`
+    queries=`expr $rows - 4`
+    queries=`expr $queries / 3`
+    q=0
+    echo -n "checking queries..."
+    while [ $q -ne $queries ]
+    do
+	check_query $file $q
+	q=`expr $q + 1`
+    done
+    echo
+}
+
+run_all() {
+    file=$1
+
+    tmpfiles=""
+    NDB_JOIN_PUSHDOWN=off
+    export NDB_JOIN_PUSHDOWN
+    if [ `echo $mode | grep -c m` -ne 0 ]
+    then
+	echo "- run myisam"
+	start=`eval $getepochtime`
+	$mysqltest_exe ${myisam_db} < $file > ${opre}_myisam.out
+	stop=`eval $getepochtime`
+	echo "  elapsed: `expr $stop - $start`s"
+	tmpfiles="$tmpfiles ${opre}_myisam.out"
+    fi
+
+    if [ `echo $mode | grep -c nv` -ne 0 ]
+    then
+	echo "- run ndb without push"
+	NDB_JOIN_PUSHDOWN=off
+	export NDB_JOIN_PUSHDOWN
+	start=`eval $getepochtime`
+	$mysqltest_exe ${ndb_db} < $file > ${opre}_ndb.out
+	stop=`eval $getepochtime`
+	echo "  elapsed: `expr $stop - $start`s"
+	tmpfiles="$tmpfiles ${opre}_ndb.out"
+    fi
+
+    if [ `echo $mode | grep -c np` -ne 0 ]
+    then
+	echo "- run ndb with push"
+	NDB_JOIN_PUSHDOWN=on
+	export NDB_JOIN_PUSHDOWN
+	start=`eval $getepochtime`
+	$mysqltest_exe ${ndb_db} < $file > ${opre}_ndbpush.out
+	stop=`eval $getepochtime`
+	echo "  elapsed: `expr $stop - $start`s"
+	tmpfiles="$tmpfiles ${opre}_ndbpush.out"
+    fi
+
+    md5s=""
+    for f in $tmpfiles
+    do
+	md5s="$md5s `$md5sum $f | awk '{ print $1;}'`"
+    done
+
+    ###
+    # Check that they are all equal
+    check=""
+    fail=""
+    for s in $md5s
+    do
+	if [ -z "$check" ]
+	then
+	    check="$s"
+	elif [ "$check" != "$s" ]
+	then
+	    fail="yes"
+	fi
+    done
+
+    if [ "$fail" ]
+    then
+	echo "md5 missmatch: $md5s"
+	echo "locating failing query(s)"
+	locate_query $file
+    fi
+
+    rm -f $tmpfiles
+}
+
+i=0
+stoptime=""
+if [ "$runtime" ]
+then
+    stoptime=`eval $getepochtime`
+    stoptime=`expr $stoptime + $runtime`
+    loops=1000000
+fi
+
+while [ $i -ne $loops ]
+do
+    i=`expr $i + 1`
+
+    echo "** loop $i"
+    us="$seed" || true
+    if [ -z "$us" ]
+    then
+    	us=`eval $getepochtime`
+    fi
+
+    echo "- generating sql seed: $us queries: $queries"
+
+    (
+	echo "--disable_warnings"
+	echo "--disable_query_log"
+	echo "--eval set ndb_join_pushdown='\$NDB_JOIN_PUSHDOWN';"
+	echo "$ecp"
+	${gensql} --seed=$us --queries=$queries --dsn="$dsn:database=${myisam_db}" --grammar=$grammar | grep -v "#" |
+        awk '{ print "--sorted_result"; print "--error 0,233,1242,4006"; print; }'
+	echo "--exit"
+    ) > ${opre}_test.sql
+
+    run_all ${opre}_test.sql
+    rm ${opre}_test.sql
+    echo
+
+    if [ "$stoptime" ]
+    then
+	if [ `eval $getepochtime` -ge $stoptime ]
+	then
+	    break;
+	fi
+    fi
+done
+
+if [ -f "${opre}.failing.sql" ]
+then
+    echo "*** FAILING QUERIES ***"
+    cat "${opre}.failing.sql"
+    exit 1
+fi

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster branch (jonas.oreland:3586) jonas oreland14 Oct