List:Commits« Previous MessageNext Message »
From:Martin Zaun Date:September 27 2010 5:31am
Subject:bzr commit into mysql-5.1-telco-7.1 branch (martin.zaun:3813)
View as plain text  
#At file:///Users/mz/mysql/ndb-7.1-opt32/ based on revid:jonas@stripped

 3813 Martin Zaun	2010-09-26
      crund - minor code and scripts improvements

    removed:
      storage/ndb/test/crund/ndblog/
      storage/ndb/test/crund/src/tables_mysql.innodb.sql
      storage/ndb/test/crund/src/tables_mysql.memory.sql
      storage/ndb/test/crund/src/tables_mysql.myisam.sql
    added:
      storage/ndb/test/crund/scripts/
      storage/ndb/test/crund/scripts/slay.sh
    renamed:
      storage/ndb/test/crund/config.ini.solaris => storage/ndb/test/crund/config_samples/config.ini.solaris
      storage/ndb/test/crund/config.ini_commented => storage/ndb/test/crund/config_samples/config.ini_commented
      storage/ndb/test/crund/config.ini_minimal => storage/ndb/test/crund/config_samples/config.ini_minimal
      storage/ndb/test/crund/load_shema.sh => storage/ndb/test/crund/scripts/load_shema.sh
      storage/ndb/test/crund/mytest.sh => storage/ndb/test/crund/scripts/mytest.sh
      storage/ndb/test/crund/mytestcxx.sh => storage/ndb/test/crund/scripts/mytestcxx.sh
      storage/ndb/test/crund/mytests.sh => storage/ndb/test/crund/scripts/mytests.sh
      storage/ndb/test/crund/restart_cluster.sh => storage/ndb/test/crund/scripts/restart_cluster.sh
      storage/ndb/test/crund/restart_mysqld.sh => storage/ndb/test/crund/scripts/restart_mysqld.sh
      storage/ndb/test/crund/restart_ndb.sh => storage/ndb/test/crund/scripts/restart_ndb.sh
      storage/ndb/test/crund/start_cluster.sh => storage/ndb/test/crund/scripts/start_cluster.sh
      storage/ndb/test/crund/start_mysqld.sh => storage/ndb/test/crund/scripts/start_mysqld.sh
      storage/ndb/test/crund/start_ndb.sh => storage/ndb/test/crund/scripts/start_ndb.sh
      storage/ndb/test/crund/stop_cluster.sh => storage/ndb/test/crund/scripts/stop_cluster.sh
      storage/ndb/test/crund/stop_mysqld.sh => storage/ndb/test/crund/scripts/stop_mysqld.sh
      storage/ndb/test/crund/stop_ndb.sh => storage/ndb/test/crund/scripts/stop_ndb.sh
    modified:
      .bzrignore
      storage/ndb/test/crund/Makefile
      storage/ndb/test/crund/Makefile.defaults
      storage/ndb/test/crund/config_samples/config.ini
      storage/ndb/test/crund/martins_little_helpers/src/utils/Makefile
      storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java
      storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java
      storage/ndb/test/crund/src/tables_mysql.sql
      storage/ndb/test/crund/scripts/load_shema.sh
      storage/ndb/test/crund/scripts/mytest.sh
      storage/ndb/test/crund/scripts/mytestcxx.sh
      storage/ndb/test/crund/scripts/mytests.sh
      storage/ndb/test/crund/scripts/restart_cluster.sh
      storage/ndb/test/crund/scripts/restart_mysqld.sh
      storage/ndb/test/crund/scripts/restart_ndb.sh
      storage/ndb/test/crund/scripts/start_cluster.sh
      storage/ndb/test/crund/scripts/start_mysqld.sh
      storage/ndb/test/crund/scripts/start_ndb.sh
      storage/ndb/test/crund/scripts/stop_cluster.sh
      storage/ndb/test/crund/scripts/stop_mysqld.sh
      storage/ndb/test/crund/scripts/stop_ndb.sh
=== modified file '.bzrignore'
--- a/.bzrignore	2010-04-06 02:55:42 +0000
+++ b/.bzrignore	2010-09-27 05:31:17 +0000
@@ -3118,10 +3118,17 @@ storage/ndb/src/ndbjtie/**/*.log
 storage/ndb/src/ndbjtie/jtie/test/myapi/myapi_test
 storage/ndb/clusterj/**/*MANIFEST.MF
 storage/ndb/clusterj/**/*manifest.mf
-storage/ndb/test/crund/*.properties
 storage/ndb/test/crund/*.cnf
 storage/ndb/test/crund/*.ini
+storage/ndb/test/crund/*.properties
 storage/ndb/test/crund/lib
-storage/ndb/test/crund/results
+storage/ndb/test/crund/martins_little_helpers/src/utils/Properties_test
+storage/ndb/test/crund/martins_little_helpers/src/utils/hrt_stopwatch_test
+storage/ndb/test/crund/martins_little_helpers/src/utils/hrt_utils_test
+storage/ndb/test/crund/martins_little_helpers/src/utils/utils_HrtStopwatch.h
+storage/ndb/test/crund/martins_little_helpers/src/utils/utils_JniInstrumentationTest.h
+storage/ndb/test/crund/scripts/ndblog
+storage/ndb/test/crund/scripts/results
+storage/ndb/test/crund/src/crundndb/Driver
 libmysqld/examples/mysqltest.cc
 libmysqld/debug_sync.cc

=== modified file 'storage/ndb/test/crund/Makefile'
--- a/storage/ndb/test/crund/Makefile	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/Makefile	2010-09-27 05:31:17 +0000
@@ -21,10 +21,7 @@ dep dbg opt prf clean mostlyclean check:
 	@cd $(SRC)/crundndb && $(MAKE) $(MFLAGS) $@
 
 distclean:
-	rm -rf ndblog
-	mkdir ndblog
-	touch mysqld.log.err
-	rm mysqld.log.err
+	rm -rf scripts/ndblog
 	rm -f *~
 	ant $@
 	rm -f ./.ant-targets-build.xml

=== modified file 'storage/ndb/test/crund/Makefile.defaults'
--- a/storage/ndb/test/crund/Makefile.defaults	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/Makefile.defaults	2010-09-27 05:31:17 +0000
@@ -28,7 +28,7 @@
 # plain cc, debug:
 #  CFLAGS	= -g -DDEBUG
 # gnu gcc, general: -pedantic -ansi -std=c89 -std=c99 -std=gnu89 -std=gnu99
-  CFLAGS.gen	= -Wall
+  CFLAGS.gen	= -Wall -m64
 # gnu gcc, default:
   CFLAGS	= $(CFLAGS.gen) -g -O
 # gnu gcc, debug:
@@ -58,7 +58,7 @@
 #   -Woverloaded-virtual
 #      Unfortunately, too many warnings from NDB includes
   CXXFLAGS.gen	= -ansi -Wall -Wstrict-null-sentinel \
-		  -Wsign-promo
+		  -Wsign-promo -m64
 # gnu g++, default:
   CXXFLAGS	= $(CXXFLAGS.gen) -g -O
   CXXFLAGS.dbg	= $(CXXFLAGS.gen) -g -DDEBUG

=== modified file 'storage/ndb/test/crund/config_samples/config.ini'
--- a/storage/ndb/test/crund/config_samples/config.ini	2010-02-25 15:00:17 +0000
+++ b/storage/ndb/test/crund/config_samples/config.ini	2010-09-27 05:31:17 +0000
@@ -70,6 +70,7 @@ HostName=127.0.0.1		# hostname or IP add
 HostName=127.0.0.1		# hostname or IP address
 #DataDir=/Users/mz/mysql/crund/ndblog	# directory for data files (default is cwd)
 
-[mysqld]
-
-[mysqld]
+[api]
+[api]
+[api]
+[api]

=== renamed file 'storage/ndb/test/crund/config.ini.solaris' => 'storage/ndb/test/crund/config_samples/config.ini.solaris'
=== renamed file 'storage/ndb/test/crund/config.ini_commented' => 'storage/ndb/test/crund/config_samples/config.ini_commented'
=== renamed file 'storage/ndb/test/crund/config.ini_minimal' => 'storage/ndb/test/crund/config_samples/config.ini_minimal'
=== modified file 'storage/ndb/test/crund/martins_little_helpers/src/utils/Makefile'
--- a/storage/ndb/test/crund/martins_little_helpers/src/utils/Makefile	2010-09-04 01:34:54 +0000
+++ b/storage/ndb/test/crund/martins_little_helpers/src/utils/Makefile	2010-09-27 05:31:17 +0000
@@ -39,8 +39,8 @@ include	../../../env.properties
 # _POSIX_C_SOURCE
 # _UNIX_STD
 
-#  DELIVERABLES	= libutils.a libutils.$(DLL_SUFFIX) utils.jar
-  DELIVERABLES	= libutils.a libutils.$(DLL_SUFFIX) $(TESTS) $(TESTS1)
+  DELIVERABLES	= libutils.a libutils.$(DLL_SUFFIX) utils.jar \
+		$(TESTS) $(TESTS1)
 
   TESTS		= hrt_utils_test hrt_stopwatch_test Properties_test \
 		$(API_PKG_PATH)/HrtStopwatch.class \
@@ -81,10 +81,9 @@ dep depend:	$(GENERATED_H)
 
 #------------------------------------------------------------------------------
 
-# not correct, only adds first file
-#utils.jar:	$(API_PKG_PATH)/HrtStopwatch.class \
-#		$(API_PKG_PATH)/HrtProfiler.class
-#	$(JAR) cvf $@ $<
+utils.jar:	$(API_PKG_PATH)/HrtStopwatch.class \
+		$(API_PKG_PATH)/HrtProfiler.class
+	$(JAR) cvf $@ $?
 
 utils_HrtStopwatch.h:	$(API_PKG_PATH)/HrtStopwatch.class
 	$(COMPILE.javah) utils.HrtStopwatch

=== removed directory 'storage/ndb/test/crund/ndblog'
=== added directory 'storage/ndb/test/crund/scripts'
=== renamed file 'storage/ndb/test/crund/load_shema.sh' => 'storage/ndb/test/crund/scripts/load_shema.sh'
--- a/storage/ndb/test/crund/load_shema.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/load_shema.sh	2010-09-27 05:31:17 +0000
@@ -1,5 +1,5 @@
 #!/bin/bash
-source env.properties
+source ../env.properties
 echo MYSQL_HOME=$MYSQL_HOME
 
 echo
@@ -10,32 +10,68 @@ echo
 # - the data nodes haven't fully come up yet
 # - ndb and mysqld have gotten out of sync (e.g., may happen when ndb was
 #   (re)started with option "--initial", see bug.php?id=42107)
-for ((i=5; i>=0; i--)) ; do
+for ((i=3; i>=0; i--)) ; do
 
+  user="`whoami`"
   echo
-  echo reload schema...
-  "$MYSQL_BIN/mysql" -v -u root < src/tables_mysql.sql
-#  "$MYSQL_HOME/bin/mysql" -v < src/tables_mysql0.sql
+  echo "grant privileges to users..."
+  # MySQL does not support wildcards in user names, only anonymous users
+  # specified by the empty user name ''; any user who connects from the
+  # local host with the correct password for the anonymous user will be
+  # allowed access then. 
+  echo "GRANT ALL ON *.* TO ''@localhost;" \
+       "GRANT ALL ON *.* TO $user@localhost;" \
+       | "$MYSQL_BIN/mysql" -v -u root
   s=$?
-  echo mysql exit status: $s
+  echo "mysql exit status: $s"
 
   if [[ $s == 0 ]]; then
-    echo "successfully (re)loaded schema"
-    break
+    echo "successfully granted privileges"
   else
     echo
-    echo "failed (re)loading schema"
-    echo "retrying up to $i times (please be patient)..."
-    for ((j=0; j<5; j++)) ; do echo "." ; sleep 1; done
-    "$MYSQL_BIN/mysql" -e "USE crunddb; SHOW TABLES;" > /dev/null
-    for ((j=0; j<5; j++)) ; do echo "." ; sleep 1; done
+    echo "failed granting privileges; retrying up to $i times..."
+    for ((j=0; j<3; j++)) ; do echo "." ; sleep 1; done
+    continue
   fi
 
+  echo
+  echo "load crund schema..."
+  "$MYSQL_BIN/mysql" -v < ../src/tables_mysql.sql
+  s=$?
+  echo "mysql exit status: $s"
+
+  if [[ $s == 0 ]]; then
+    echo "successfully loaded crunddb schema"
+  else
+    echo
+    echo "failed loading schema; retrying up to $i times..."
+    for ((j=0; j<3; j++)) ; do echo "." ; sleep 1; done
+    continue
+  fi
+
+  echo
+  echo "load tws schema..."
+  "$MYSQL_BIN/mysql" -v < ../tws_benchmark/schema.sql
+  s=$?
+  echo "mysql exit status: $s"
+
+  if [[ $s == 0 ]]; then
+    echo "successfully loaded testdb schema"
+  else
+    echo
+    echo "failed loading schema; retrying up to $i times..."
+    for ((j=0; j<3; j++)) ; do echo "." ; sleep 1; done
+    continue
+  fi
+
+  break
+
 done
 
 echo
 echo "show tables..."
 "$MYSQL_BIN/mysql" -e "USE crunddb; SHOW TABLES;"
+"$MYSQL_BIN/mysql" -e "USE testdb; SHOW TABLES;"
 
 echo
 echo done.

=== renamed file 'storage/ndb/test/crund/mytest.sh' => 'storage/ndb/test/crund/scripts/mytest.sh'
--- a/storage/ndb/test/crund/mytest.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/mytest.sh	2010-09-27 05:31:17 +0000
@@ -13,11 +13,12 @@ iostat 5 > iostat5.txt 2>&1 &
 #vmstat 5 > vmstat5.txt 2>&1 &
 pid=$!
 echo "" >> out.txt 2>&1
-$1 $2 >> out.txt 2>&1
+( cd .. ; $1 $2 ) >> out.txt 2>&1
 mkdir -p results/xxx
 mv -v [a-z]*.txt results/xxx
-cp -v *.properties results/xxx
-cp -v build.xml results/xxx
-cp -v config.ini my.cnf results/xxx
+cp -v ../*.properties results/xxx
+cp -v ../build.xml results/xxx
+cp -v ../config.ini results/xxx
+cp -v ../my.cnf results/xxx
 sleep 6
 kill -9 $pid

=== renamed file 'storage/ndb/test/crund/mytestcxx.sh' => 'storage/ndb/test/crund/scripts/mytestcxx.sh'
--- a/storage/ndb/test/crund/mytestcxx.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/mytestcxx.sh	2010-09-27 05:31:17 +0000
@@ -8,12 +8,13 @@ echo "" >> out.txt 2>&1
 vmstat 5 > vmstat5.txt 2>&1 &
 pid=$!
 echo "" >> out.txt 2>&1
-make run.driver >> out.txt 2>&1
+( cd .. ; make run.driver ) >> out.txt 2>&1
 mkdir -p results/xxx
 mv -v [a-z]*.txt results/xxx
-cp -v *.properties results/xxx
-cp -v build.xml results/xxx
-cp -v config.ini my.cnf results/xxx
+cp -v ../*.properties results/xxx
+cp -v ../build.xml results/xxx
+cp -v ../config.ini results/xxx
+cp -v ../my.cnf results/xxx
 sleep 6
 kill -9 $pid
 mv results/xxx results/xxx_cxxdriver

=== renamed file 'storage/ndb/test/crund/mytests.sh' => 'storage/ndb/test/crund/scripts/mytests.sh'
--- a/storage/ndb/test/crund/mytests.sh	2010-09-04 01:20:28 +0000
+++ b/storage/ndb/test/crund/scripts/mytests.sh	2010-09-27 05:31:17 +0000
@@ -1,7 +1,8 @@
 #!/bin/bash
 
 #for f in run.ndbapi.opt run.ndbjtie.opt run.clusterj.opt run.mysql.opt run.openjpa.mysql.opt run.openjpa.clusterj.opt ; do
-for f in run.ndbapi.opt run.ndbjtie.opt run.clusterj.opt run.mysql.opt ; do
+#for f in run.ndbapi.opt run.ndbjtie.opt run.clusterj.opt run.mysql.opt ; do
+for f in run.ndbapi.opt ; do
   echo testing $f
   ./mytest.sh ant $f
   mv -v results/xxx  results/xxx_$f

=== renamed file 'storage/ndb/test/crund/restart_cluster.sh' => 'storage/ndb/test/crund/scripts/restart_cluster.sh'
--- a/storage/ndb/test/crund/restart_cluster.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/restart_cluster.sh	2010-09-27 05:31:17 +0000
@@ -2,6 +2,6 @@
 
 ./stop_cluster.sh
 
-for ((i=0; i<2; i++)) ; do echo "." ; sleep 1; done
+#for ((i=0; i<2; i++)) ; do echo "." ; sleep 1; done
 
 ./start_cluster.sh

=== renamed file 'storage/ndb/test/crund/restart_mysqld.sh' => 'storage/ndb/test/crund/scripts/restart_mysqld.sh'
--- a/storage/ndb/test/crund/restart_mysqld.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/restart_mysqld.sh	2010-09-27 05:31:17 +0000
@@ -2,6 +2,6 @@
 
 ./stop_mysqld.sh
 
-for ((i=0; i<2; i++)) ; do echo "." ; sleep 1; done
+#for ((i=0; i<2; i++)) ; do echo "." ; sleep 1; done
 
 ./start_mysqld.sh

=== renamed file 'storage/ndb/test/crund/restart_ndb.sh' => 'storage/ndb/test/crund/scripts/restart_ndb.sh'
--- a/storage/ndb/test/crund/restart_ndb.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/restart_ndb.sh	2010-09-27 05:31:17 +0000
@@ -2,6 +2,6 @@
 
 ./stop_ndb.sh
 
-for ((i=0; i<2; i++)) ; do echo "." ; sleep 1; done
+#for ((i=0; i<2; i++)) ; do echo "." ; sleep 1; done
 
 ./start_ndb.sh

=== added file 'storage/ndb/test/crund/scripts/slay.sh'
--- a/storage/ndb/test/crund/scripts/slay.sh	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/crund/scripts/slay.sh	2010-09-27 05:31:17 +0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+for X in `ps -efa | grep -i $1 | awk {'print $2'}`; do
+  kill $X;
+done
+
+sleep 1
+
+for X in `ps -efa | grep -i $1 | awk {'print $2'}`; do
+  kill -9 $X;
+done

=== renamed file 'storage/ndb/test/crund/start_cluster.sh' => 'storage/ndb/test/crund/scripts/start_cluster.sh'
--- a/storage/ndb/test/crund/start_cluster.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/start_cluster.sh	2010-09-27 05:31:17 +0000
@@ -2,7 +2,7 @@
 
 ./start_ndb.sh
 
-# the ndb nodes seem to require some time to start
-for ((i=0; i<30; i++)) ; do echo "." ; sleep 1; done
+# need some extra time
+#for ((i=0; i<1; i++)) ; do echo "." ; sleep 1; done
 
 ./start_mysqld.sh

=== renamed file 'storage/ndb/test/crund/start_mysqld.sh' => 'storage/ndb/test/crund/scripts/start_mysqld.sh'
--- a/storage/ndb/test/crund/start_mysqld.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/start_mysqld.sh	2010-09-27 05:31:17 +0000
@@ -1,16 +1,21 @@
 #!/bin/bash
-source env.properties
+source ../env.properties
 echo MYSQL_HOME=$MYSQL_HOME
 
 echo
 echo start mysqld...
 
+mylogdir="ndblog"
+mkdir -p "$mylogdir"
+
+user="`whoami`"
 cwd="`pwd`"
-mycnf="$cwd/my.cnf"
-myerr="$cwd/mysqld.log.err"
+mycnf="$cwd/../my.cnf"
+myerr="$cwd/$mylogdir/mysqld.log.err"
 echo defaults-file=$mycnf
-( cd $MYSQL_HOME ; "$MYSQL_BIN/mysqld_safe" --defaults-file="$mycnf" --user=mz --log-error="$myerr" & )
+( cd $MYSQL_HOME ; "$MYSQL_BIN/mysqld_safe" --defaults-file="$mycnf" --user="$user" --log-error="$myerr" & )
 
+# need some extra time
 for ((i=0; i<3; i++)) ; do echo "." ; sleep 1; done
 
 echo

=== renamed file 'storage/ndb/test/crund/start_ndb.sh' => 'storage/ndb/test/crund/scripts/start_ndb.sh'
--- a/storage/ndb/test/crund/start_ndb.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/start_ndb.sh	2010-09-27 05:31:17 +0000
@@ -1,19 +1,34 @@
 #!/bin/bash
-source env.properties
+source ../env.properties
 echo MYSQL_HOME=$MYSQL_HOME
 
+#set -x
+
+mylogdir="ndblog"
+mkdir -p "$mylogdir"
+
+myini="../../config.ini"
 echo
 echo start mgmd...
-( cd ndblog ; "$MYSQL_LIBEXEC/ndb_mgmd" -f ../config.ini )
+( cd "$mylogdir" ; "$MYSQL_LIBEXEC/ndb_mgmd" --initial -f "$myini" )
 
-for ((i=0; i<2; i++)) ; do echo "." ; sleep 1; done
+# need some extra time
+for ((i=0; i<3; i++)) ; do echo "." ; sleep 1; done
 
 echo
 echo start ndbd...
-( cd ndblog ; "$MYSQL_LIBEXEC/ndbd" --initial )
+( cd "$mylogdir" ; "$MYSQL_LIBEXEC/ndbd" --initial )
 
-for ((i=0; i<3; i++)) ; do echo "." ; sleep 1; done
+# need some extra time
+for ((i=0; i<1; i++)) ; do echo "." ; sleep 1; done
+
+timeout=60
+echo
+echo waiting up to $timeout s for ndbd to start up...
+"$MYSQL_BIN/ndb_waiter" -t $timeout
 
 echo
 echo show cluster...
-"$MYSQL_BIN/ndb_mgm" -e show
+"$MYSQL_BIN/ndb_mgm" -e show -t 1
+
+#set +x

=== renamed file 'storage/ndb/test/crund/stop_cluster.sh' => 'storage/ndb/test/crund/scripts/stop_cluster.sh'
--- a/storage/ndb/test/crund/stop_cluster.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/stop_cluster.sh	2010-09-27 05:31:17 +0000
@@ -2,6 +2,7 @@
 
 ./stop_mysqld.sh
 
-for ((i=0; i<2; i++)) ; do echo "." ; sleep 1; done
+# need some extra time
+#for ((i=0; i<1; i++)) ; do echo "." ; sleep 1; done
 
 ./stop_ndb.sh

=== renamed file 'storage/ndb/test/crund/stop_mysqld.sh' => 'storage/ndb/test/crund/scripts/stop_mysqld.sh'
--- a/storage/ndb/test/crund/stop_mysqld.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/stop_mysqld.sh	2010-09-27 05:31:17 +0000
@@ -1,8 +1,9 @@
 #!/bin/bash
-source env.properties
+source ../env.properties
 echo MYSQL_HOME=$MYSQL_HOME
 
-echo shutdown mysqld...
+echo shut down mysqld...
 "$MYSQL_BIN/mysqladmin" shutdown
 
+# need some extra time
 for ((i=0; i<3; i++)) ; do echo "." ; sleep 1; done

=== renamed file 'storage/ndb/test/crund/stop_ndb.sh' => 'storage/ndb/test/crund/scripts/stop_ndb.sh'
--- a/storage/ndb/test/crund/stop_ndb.sh	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/scripts/stop_ndb.sh	2010-09-27 05:31:17 +0000
@@ -1,8 +1,15 @@
 #!/bin/bash
-source env.properties
+source ../env.properties
 echo MYSQL_HOME=$MYSQL_HOME
 
-echo shutdown NDB...
-"$MYSQL_BIN/ndb_mgm" -e shutdown
+echo shut down NDB...
+"$MYSQL_BIN/ndb_mgm" -e shutdown -t 1
 
-for ((i=0; i<10; i++)) ; do echo "." ; sleep 1; done
+timeout=60
+echo
+echo waiting up to $timeout s for ndb_mgmd to shut down...
+#"$MYSQL_BIN/ndb_waiter" -t $timeout -c "localhost:1186" --no-contact
+"$MYSQL_BIN/ndb_waiter" -t $timeout --no-contact
+
+# need some extra time
+for ((i=0; i<6; i++)) ; do echo "." ; sleep 1; done

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java	2010-09-04 01:20:28 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java	2010-09-27 05:31:17 +0000
@@ -181,11 +181,10 @@ public class ClusterjLoad extends Driver
             new ClusterjOp("setAByPK") {
                 public void run(int countA, int countB) {
                     for (int i = 0; i < countA; i++) {
-                        // XXX blind update not working
-                        final IA o = session.find(IA.class, i);
-                        //final IA o = session.newInstance(IA.class);
-                        assert o != null;
+                        // blind update
+                        final IA o = session.newInstance(IA.class);
                         o.setId(i);
+                        assert o != null;
                         o.setCint(i);
                         o.setClong((long)i);
                         o.setCfloat((float)i);
@@ -199,11 +198,10 @@ public class ClusterjLoad extends Driver
             new ClusterjOp("setB0ByPK") {
                 public void run(int countA, int countB) {
                     for (int i = 0; i < countB; i++) {
-                        // XXX blind update not working
-                        final IB0 o = session.find(IB0.class, i);
-                        //final IB0 o = session.newInstance(IB0.class);
-                        assert o != null;
+                        // blind update
+                        final IB0 o = session.newInstance(IB0.class);
                         o.setId(i);
+                        assert o != null;
                         o.setCint(i);
                         o.setClong((long)i);
                         o.setCfloat((float)i);
@@ -249,9 +247,9 @@ public class ClusterjLoad extends Driver
                 new ClusterjOp("setVarbinary" + l) {
                     public void run(int countA, int countB) {
                         for (int i = 0; i < countB; i++) {
-                            // XXX blind update not working
-                            final IB0 o = session.find(IB0.class, i);
-                            //final IB0 o = session.newInstance(IB0.class);
+                            // blind update
+                            final IB0 o = session.newInstance(IB0.class);
+                            o.setId(i);
                             assert o != null;
                             o.setCvarbinary_def(b);
                             session.updatePersistent(o);
@@ -274,9 +272,9 @@ public class ClusterjLoad extends Driver
                 new ClusterjOp("clearVarbinary" + l) {
                     public void run(int countA, int countB) {
                         for (int i = 0; i < countB; i++) {
-                            // XXX blind update not working
-                            final IB0 o = session.find(IB0.class, i);
-                            //final IB0 o = session.newInstance(IB0.class);
+                            // blind update
+                            final IB0 o = session.newInstance(IB0.class);
+                            o.setId(i);
                             assert o != null;
                             o.setCvarbinary_def(null);
                             session.updatePersistent(o);
@@ -293,9 +291,9 @@ public class ClusterjLoad extends Driver
                 new ClusterjOp("setVarchar" + l) {
                     public void run(int countA, int countB) {
                         for (int i = 0; i < countB; i++) {
-                            // XXX blind update not working
-                            final IB0 o = session.find(IB0.class, i);
-                            //final IB0 o = session.newInstance(IB0.class);
+                            // blind update
+                            final IB0 o = session.newInstance(IB0.class);
+                            o.setId(i);
                             assert o != null;
                             o.setCvarchar_def(s);
                             session.updatePersistent(o);
@@ -318,9 +316,9 @@ public class ClusterjLoad extends Driver
                 new ClusterjOp("clearVarchar" + l) {
                     public void run(int countA, int countB) {
                         for (int i = 0; i < countB; i++) {
-                            // XXX blind update not working
-                            final IB0 o = session.find(IB0.class, i);
-                            //final IB0 o = session.newInstance(IB0.class);
+                            // blind update
+                            final IB0 o = session.newInstance(IB0.class);
+                            o.setId(i);
                             assert o != null;
                             o.setCvarchar_def(null);
                             session.updatePersistent(o);
@@ -333,9 +331,9 @@ public class ClusterjLoad extends Driver
             new ClusterjOp("setB0->A") {
                 public void run(int countA, int countB) {
                     for (int i = 0; i < countB; i++) {
-                        // XXX blind update not working
-                        final IB0 b0 = session.find(IB0.class, i);
-                        //final IB0 b0 = session.newInstance(IB0.class);
+                        // blind update
+                        final IB0 b0 = session.newInstance(IB0.class);
+                        b0.setId(i);
                         assert b0 != null;
                         final int aId = i % countA;
                         b0.setAid(aId);
@@ -408,9 +406,9 @@ public class ClusterjLoad extends Driver
             new ClusterjOp("nullB0->A") {
                 public void run(int countA, int countB) {
                     for (int i = 0; i < countB; i++) {
-                        // XXX blind update not working
-                        final IB0 b0 = session.find(IB0.class, i);
-                        //final IB0 b0 = session.newInstance(IB0.class);
+                        // blind update
+                        final IB0 b0 = session.newInstance(IB0.class);
+                        b0.setId(i);
                         assert b0 != null;
                         b0.setAid(0);
                     }

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java	2010-09-04 01:20:28 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java	2010-09-27 05:31:17 +0000
@@ -691,7 +691,7 @@ public class NdbJTieLoad extends NdbBase
                            boolean batch) {
         beginTransaction1();
         for (int i = from; i <= to; i++) {
-            // get an insert operation for the table
+            // get an update operation for the table
             NdbOperation op = tx.getNdbOperation(table);
             if (op == null)
                 throw new RuntimeException(toStr(tx.getNdbError()));

=== removed file 'storage/ndb/test/crund/src/tables_mysql.innodb.sql'
--- a/storage/ndb/test/crund/src/tables_mysql.innodb.sql	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/src/tables_mysql.innodb.sql	1970-01-01 00:00:00 +0000
@@ -1,217 +0,0 @@
--- SET storage_engine=NDB;
-SET storage_engine=INNODB;
--- SET storage_engine=MYISAM;
-
-DROP DATABASE IF EXISTS crunddb;
-CREATE DATABASE crunddb;
-
-USE crunddb;
-
--- DROP TABLE IF EXISTS B1;
--- DROP TABLE IF EXISTS B0;
--- DROP TABLE IF EXISTS A;
-
-CREATE TABLE A (
-        id              INT             NOT NULL,
-        cint            INT,
-        clong           BIGINT,
-        cfloat          FLOAT,
-        cdouble         DOUBLE,
-        CONSTRAINT PK_A_0 PRIMARY KEY (id)
-);
-
-CREATE TABLE B0 (
-        id              INT             NOT NULL,
-        cint            INT,
-        clong           BIGINT,
-        cfloat          FLOAT,
-        cdouble         DOUBLE,
-        a_id            INT,
-        cvarbinary_def  VARBINARY(202),
-        cvarchar_def    VARCHAR(202),
-        cblob_def       BLOB(202),
-        ctext_def       TEXT(202),
-        CONSTRAINT PK_B0_0 PRIMARY KEY (id),
-        CONSTRAINT FK_B0_1 FOREIGN KEY (a_id) REFERENCES A (id)
-);
---        cvarchar_ascii  VARCHAR(202) CHARACTER SET ASCII,
---        ctext_ascii     TEXT(202) CHARACTER SET ASCII,
---        cvarchar_ucs2   VARCHAR(202) CHARACTER SET UCS2,
---        ctext_ucs2      TEXT(202) CHARACTER SET UCS2,
---        cvarchar_utf8   VARCHAR(202) CHARACTER SET UTF8,
---        ctext_utf8      TEXT(202) CHARACTER SET UTF8,
-
-CREATE TABLE B1 (
-        id              INT NOT NULL,
-        CONSTRAINT PK_B1_0 PRIMARY KEY (id)
-);
-
-CREATE INDEX I_B0_FK ON B0 (
-        a_id
-);
-
-
--- TEXT stores first 256 in primary table, rest in parts table at
--- different chunk sizes; VARCHAR always stores in primary tables and
--- thus is subject to 8k limit
-
-
-
--- 5.1 Reference Manual, Data Types (10)
--- Numeric Types:
--- * BIT[(M)] (1 <= M <= 64, default= 1, approximately (M+7)/8 bytes)
--- * BOOL, BOOLEAN (synonyms for TINYINT(1))
--- * INT[(M)], INTEGER[(M)] [UNSIGNED] (4 bytes)
---   TINYINT[(M)] (1 byte), SMALLINT[(M)] (2 bytes),
---   MEDIUMINT[(M)] (3 bytes), BIGINT[(M)] (8 bytes)
--- * FLOAT[(M,D)] [UNSIGNED] (4 bytes if 0 <= p <= 24, 8 bytes if 25 <= p <= 53)
--- * DOUBLE[(M,D)], DOUBLE[(M,D)], REAL[(M,D)] [UNSIGNED] (8 bytes)
--- * DECIMAL[(M[,D])],DEC[(M[,D])],NUMERIC[(M[,D])],FIXED[(M[,D])] [UNSIGNED]
---   (M*4/9 bytes plus extra)
--- Date Types:
--- * DATETIME (8 bytes)
--- * DATE, TIME (3 bytes)
--- * TIMESTAMP (4 bytes)
--- * YEAR[(2|4)] (1 byte)
--- String Types:
--- * BINARY(M), [NATIONAL] CHAR[(M)] [CHARACTER SET name] [COLLATE name]
---   (fixed-length, 0 <= M <= 2^8-1, default=1, right-padded)
--- * VARBINARY(M), [NATIONAL] VARCHAR[(M)] [CHARACTER SET name] [COLLATE name]
---   (variable-length, 0 <= M <= 2^16-1, 1..2-byte length prefix)
--- * BLOB[(M)], TEXT[(M)] [CHARACTER SET name] [COLLATE name]
---   (max length = 2^16-1 bytes, 2-byte length prefix, no default values)
--- * TINYBLOB, TINYTEXT (1-byte length prefix),
--- * MEDIUMBLOB, MEDIUMTEXT (3-byte length prefix),
--- * LONGBLOB, LONGTEXT (4-byte length prefix)
--- * ENUM (max 2^16-1 elements, 1..2 bytes)
--- * SET (max 64 elements, 1,2,3,4, or 8 bytes)
--- varying size types subject to the maximum row size
--- character sizes subject to the character set (utf8 = 1..3 bytes/character)
-
--- The largest values of a BLOB or TEXT object that can be transmitted
--- between the client and server is determined by the amount of available
--- memory and the size of the communications buffers. You can change the
--- message buffer size by changing the value of the max_allowed_packet
--- variable, but you must do so for both the server and the client program.
-
--- Each BLOB or TEXT value is represented internally by a separately
--- allocated object. This is in contrast to all other data types, for which
--- storage is allocated once per column when the table is opened.
-
--- TEXT and BLOB columns are implemented differently in the NDB Cluster
--- storage engine, wherein each row in a TEXT column is made up of two
--- separate parts. One of these is of fixed size (256 bytes), and is
--- actually stored in the original table. The other consists of any data
--- in excess of 256 bytes, which is stored in a hidden table. The rows
--- in this second table are always 2,000 bytes long. This means that the
--- size of a TEXT column is 256 if size <= 256 (where size represents
--- the size of the row); otherwise, the size is 256 + size + (2000 –
--- (size – 256) % 2000).
-
--- For tables using the NDBCLUSTER storage engine, there is the factor of
--- 4-byte alignment to be taken into account when calculating storage
--- requirements. This means that all NDB data storage is done in multiples
--- of 4 bytes.  For example, in NDBCLUSTER tables, the TINYINT, SMALLINT,
--- MEDIUMINT, and INTEGER (INT) column types each require 4 bytes storage
--- per record due to the alignment factor.
-
--- When calculating storage requirements for MySQL Cluster tables, you must
--- also remember that every table using the NDBCLUSTER storage engine
--- requires a primary key; if no primary key is defined by the user, then a
--- “hidden” primary key will be created by NDB.  This hidden primary key
--- consumes 31-35 bytes per table record.
-
--- The NDBCLUSTER storage engine in MySQL 5.1 supports variable-width
--- columns. This means that a VARCHAR column in a MySQL Cluster table
--- requires the same amount of storage as it would using any other
--- storage engine, with the exception that such values are 4-byte
--- aligned. Thus, the string 'abcd' stored in a VARCHAR(50) column using
--- the latin1 character set requires 8 bytes (rather than 6 bytes for
--- the same column value in a MyISAM table). This represents a change in
--- behavior from earlier versions of NDB-CLUSTER, where a VARCHAR(50)
--- column would require 52 bytes storage per record regardless of the
--- length of the string being stored.
-
--- You may find the ndb_size.pl utility to be useful for estimating NDB
--- storage requirements. This Perl script connects to a current MySQL
--- (non-Cluster) database and creates a report on how much space that
--- database would require if it used the NDBCLUSTER storage engine. See
--- Section 16.10.15, "ndb_size.pl — NDBCLUSTER Size Requirement Estimator",
--- for more information.
-
--- 9.2. The Character Set Used for Data and Sorting
--- default: latin1 (cp1252 West European) character set and the
--- latin1_swedish_ci collation
--- CHARSET may be one of binary, armscii8, ascii, big5, cp1250, cp1251,
--- cp1256, cp1257, cp850, cp852, cp866, cp932, dec8, eucjpms, euckr,
--- gb2312, gbk, geostd8, greek, hebrew, hp8, keybcs2, koi8r, koi8u,
--- latin1, latin2, latin5, latin7, macce, macroman, sjis, swe7, tis620,
--- ucs2, ujis, utf8.
-
--- java.nio.charset.Charset:
--- The native character encoding of the Java programming language is UTF-16.
--- [not sure: 
---      out.println("default charset: " + java.nio.charset.Charset.defaultCharset().displayName());
---  shows: UTF-8
--- ]
-
--- http://unicode.org/faq/basic_q.html#14
--- Q: What is the difference between UCS-2 and UTF-16?
--- A: UCS-2 is what a Unicode implementation was up to Unicode 1.1,
--- before surrogate code points and UTF-16 were added as concepts to
--- Version 2.0 of the standard. This term should be now be avoided.
---
--- When interpreting what people have meant by "UCS-2" in past usage, it
--- is best thought of as not a data format, but as an indication that an
--- implementation does not interpret any supplementary characters. In
--- particular, for the purposes of data exchange, UCS-2 and UTF-16 are
--- identical formats. Both are 16-bit, and have exactly the same code
--- unit representation.
---
--- The effective difference between UCS-2 and UTF-16 lies at a different
--- level, when one is interpreting a sequence code units as code points
--- or as characters. In that case, a UCS-2 implementation would not
--- handle processing like character properties, codepoint boundaries,
--- collation, etc. for supplementary characters. [MD] & [KW]
-
-
--- 5.1 Reference Manual, NDB Limitations (16.14)
--- * no indexes on TEXT and BLOB colums; but VARCHAR allowed
--- * attribute names are truncated to 31 characters (errors if not unique)
--- * database names and table names can total a maximum of 122 characters
--- * past issues with table names having special characters
--- * the maximum number of NDB tables is limited to 20320
--- * the maximum number of attributes (columns and indexes) per table is
---   limited to 128
--- * the maximum number of attributes per key is 32
--- * the maximum permitted size of any one row is 8K; each BLOB or TEXT
---   column contributes 256 + 8 = 264 bytes towards this total
--- * the foreign key construct is ignored (just as it is in MyISAM tables)
---
--- * There are no durable commits on disk. Commits are replicated, but there
---   is no guarantee that logs are flushed to disk on commit.
--- * Range scans. There are query performance issues due to sequential access
---   to the NDB storage engine; it is also relatively more expensive to do
---   many range scans than it is with either MyISAM or InnoDB.
--- * Reliability of Records in range. The Records in range statistic is
---   available but is not completely tested or officially supported. This may
---   result in non-optimal query plans in some cases. If necessary, you can
---   employ USE INDEX or FORCE INDEX to alter the execution plan
--- * Unique hash indexes created with USING HASH cannot be used for accessing
---   a table if NULL is given as part of the key.
---
--- * No distributed table locks. A LOCK TABLES works only for the SQL node on
---   which the lock is issued; no other SQL node in the cluster “sees” this
---   lock.  For example, ALTER TABLE is not fully locking when running
---   multiple MySQL servers (SQL nodes).
---
--- * DDL operations. DDL operations (such as CREATE TABLE or ALTER TABLE) are
---   not safe from data node failures. If a data node fails while trying to
---   perform one of these, the data dictionary is locked and no further DDL
---   statements can be executed without restarting the cluster.
---
--- * The result of operations such as ALTER TABLE and CREATE INDEX performed
---   on one SQL node in the cluster are now visible to the cluster's other
---   SQL nodes without any additional action being taken.
-
--- quit;

=== removed file 'storage/ndb/test/crund/src/tables_mysql.memory.sql'
--- a/storage/ndb/test/crund/src/tables_mysql.memory.sql	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/src/tables_mysql.memory.sql	1970-01-01 00:00:00 +0000
@@ -1,221 +0,0 @@
-SET storage_engine=MEMORY;
--- fails with
--- ERROR 1163 (42000) at line 24: The used table type doesn't support BLOB/TEXT columns
-
--- SET storage_engine=NDB;
--- SET storage_engine=INNODB;
--- SET storage_engine=MYISAM;
-
-DROP DATABASE IF EXISTS crunddb;
-CREATE DATABASE crunddb;
-
-USE crunddb;
-
--- DROP TABLE IF EXISTS B1;
--- DROP TABLE IF EXISTS B0;
--- DROP TABLE IF EXISTS A;
-
-CREATE TABLE A (
-        id              INT             NOT NULL,
-        cint            INT,
-        clong           BIGINT,
-        cfloat          FLOAT,
-        cdouble         DOUBLE,
-        CONSTRAINT PK_A_0 PRIMARY KEY (id)
-);
-
-CREATE TABLE B0 (
-        id              INT             NOT NULL,
-        cint            INT,
-        clong           BIGINT,
-        cfloat          FLOAT,
-        cdouble         DOUBLE,
-        a_id            INT,
-        cvarbinary_def  VARBINARY(202),
-        cvarchar_def    VARCHAR(202),
-        cblob_def       BLOB(202),
-        ctext_def       TEXT(202),
-        CONSTRAINT PK_B0_0 PRIMARY KEY (id),
-        CONSTRAINT FK_B0_1 FOREIGN KEY (a_id) REFERENCES A (id)
-);
---        cvarchar_ascii  VARCHAR(202) CHARACTER SET ASCII,
---        ctext_ascii     TEXT(202) CHARACTER SET ASCII,
---        cvarchar_ucs2   VARCHAR(202) CHARACTER SET UCS2,
---        ctext_ucs2      TEXT(202) CHARACTER SET UCS2,
---        cvarchar_utf8   VARCHAR(202) CHARACTER SET UTF8,
---        ctext_utf8      TEXT(202) CHARACTER SET UTF8,
-
-CREATE TABLE B1 (
-        id              INT NOT NULL,
-        CONSTRAINT PK_B1_0 PRIMARY KEY (id)
-);
-
-CREATE INDEX I_B0_FK ON B0 (
-        a_id
-);
-
-
--- TEXT stores first 256 in primary table, rest in parts table at
--- different chunk sizes; VARCHAR always stores in primary tables and
--- thus is subject to 8k limit
-
-
-
--- 5.1 Reference Manual, Data Types (10)
--- Numeric Types:
--- * BIT[(M)] (1 <= M <= 64, default= 1, approximately (M+7)/8 bytes)
--- * BOOL, BOOLEAN (synonyms for TINYINT(1))
--- * INT[(M)], INTEGER[(M)] [UNSIGNED] (4 bytes)
---   TINYINT[(M)] (1 byte), SMALLINT[(M)] (2 bytes),
---   MEDIUMINT[(M)] (3 bytes), BIGINT[(M)] (8 bytes)
--- * FLOAT[(M,D)] [UNSIGNED] (4 bytes if 0 <= p <= 24, 8 bytes if 25 <= p <= 53)
--- * DOUBLE[(M,D)], DOUBLE[(M,D)], REAL[(M,D)] [UNSIGNED] (8 bytes)
--- * DECIMAL[(M[,D])],DEC[(M[,D])],NUMERIC[(M[,D])],FIXED[(M[,D])] [UNSIGNED]
---   (M*4/9 bytes plus extra)
--- Date Types:
--- * DATETIME (8 bytes)
--- * DATE, TIME (3 bytes)
--- * TIMESTAMP (4 bytes)
--- * YEAR[(2|4)] (1 byte)
--- String Types:
--- * BINARY(M), [NATIONAL] CHAR[(M)] [CHARACTER SET name] [COLLATE name]
---   (fixed-length, 0 <= M <= 2^8-1, default=1, right-padded)
--- * VARBINARY(M), [NATIONAL] VARCHAR[(M)] [CHARACTER SET name] [COLLATE name]
---   (variable-length, 0 <= M <= 2^16-1, 1..2-byte length prefix)
--- * BLOB[(M)], TEXT[(M)] [CHARACTER SET name] [COLLATE name]
---   (max length = 2^16-1 bytes, 2-byte length prefix, no default values)
--- * TINYBLOB, TINYTEXT (1-byte length prefix),
--- * MEDIUMBLOB, MEDIUMTEXT (3-byte length prefix),
--- * LONGBLOB, LONGTEXT (4-byte length prefix)
--- * ENUM (max 2^16-1 elements, 1..2 bytes)
--- * SET (max 64 elements, 1,2,3,4, or 8 bytes)
--- varying size types subject to the maximum row size
--- character sizes subject to the character set (utf8 = 1..3 bytes/character)
-
--- The largest values of a BLOB or TEXT object that can be transmitted
--- between the client and server is determined by the amount of available
--- memory and the size of the communications buffers. You can change the
--- message buffer size by changing the value of the max_allowed_packet
--- variable, but you must do so for both the server and the client program.
-
--- Each BLOB or TEXT value is represented internally by a separately
--- allocated object. This is in contrast to all other data types, for which
--- storage is allocated once per column when the table is opened.
-
--- TEXT and BLOB columns are implemented differently in the NDB Cluster
--- storage engine, wherein each row in a TEXT column is made up of two
--- separate parts. One of these is of fixed size (256 bytes), and is
--- actually stored in the original table. The other consists of any data
--- in excess of 256 bytes, which is stored in a hidden table. The rows
--- in this second table are always 2,000 bytes long. This means that the
--- size of a TEXT column is 256 if size <= 256 (where size represents
--- the size of the row); otherwise, the size is 256 + size + (2000 –
--- (size – 256) % 2000).
-
--- For tables using the NDBCLUSTER storage engine, there is the factor of
--- 4-byte alignment to be taken into account when calculating storage
--- requirements. This means that all NDB data storage is done in multiples
--- of 4 bytes.  For example, in NDBCLUSTER tables, the TINYINT, SMALLINT,
--- MEDIUMINT, and INTEGER (INT) column types each require 4 bytes storage
--- per record due to the alignment factor.
-
--- When calculating storage requirements for MySQL Cluster tables, you must
--- also remember that every table using the NDBCLUSTER storage engine
--- requires a primary key; if no primary key is defined by the user, then a
--- “hidden” primary key will be created by NDB.  This hidden primary key
--- consumes 31-35 bytes per table record.
-
--- The NDBCLUSTER storage engine in MySQL 5.1 supports variable-width
--- columns. This means that a VARCHAR column in a MySQL Cluster table
--- requires the same amount of storage as it would using any other
--- storage engine, with the exception that such values are 4-byte
--- aligned. Thus, the string 'abcd' stored in a VARCHAR(50) column using
--- the latin1 character set requires 8 bytes (rather than 6 bytes for
--- the same column value in a MyISAM table). This represents a change in
--- behavior from earlier versions of NDB-CLUSTER, where a VARCHAR(50)
--- column would require 52 bytes storage per record regardless of the
--- length of the string being stored.
-
--- You may find the ndb_size.pl utility to be useful for estimating NDB
--- storage requirements. This Perl script connects to a current MySQL
--- (non-Cluster) database and creates a report on how much space that
--- database would require if it used the NDBCLUSTER storage engine. See
--- Section 16.10.15, "ndb_size.pl — NDBCLUSTER Size Requirement Estimator",
--- for more information.
-
--- 9.2. The Character Set Used for Data and Sorting
--- default: latin1 (cp1252 West European) character set and the
--- latin1_swedish_ci collation
--- CHARSET may be one of binary, armscii8, ascii, big5, cp1250, cp1251,
--- cp1256, cp1257, cp850, cp852, cp866, cp932, dec8, eucjpms, euckr,
--- gb2312, gbk, geostd8, greek, hebrew, hp8, keybcs2, koi8r, koi8u,
--- latin1, latin2, latin5, latin7, macce, macroman, sjis, swe7, tis620,
--- ucs2, ujis, utf8.
-
--- java.nio.charset.Charset:
--- The native character encoding of the Java programming language is UTF-16.
--- [not sure: 
---      out.println("default charset: " + java.nio.charset.Charset.defaultCharset().displayName());
---  shows: UTF-8
--- ]
-
--- http://unicode.org/faq/basic_q.html#14
--- Q: What is the difference between UCS-2 and UTF-16?
--- A: UCS-2 is what a Unicode implementation was up to Unicode 1.1,
--- before surrogate code points and UTF-16 were added as concepts to
--- Version 2.0 of the standard. This term should be now be avoided.
---
--- When interpreting what people have meant by "UCS-2" in past usage, it
--- is best thought of as not a data format, but as an indication that an
--- implementation does not interpret any supplementary characters. In
--- particular, for the purposes of data exchange, UCS-2 and UTF-16 are
--- identical formats. Both are 16-bit, and have exactly the same code
--- unit representation.
---
--- The effective difference between UCS-2 and UTF-16 lies at a different
--- level, when one is interpreting a sequence code units as code points
--- or as characters. In that case, a UCS-2 implementation would not
--- handle processing like character properties, codepoint boundaries,
--- collation, etc. for supplementary characters. [MD] & [KW]
-
-
--- 5.1 Reference Manual, NDB Limitations (16.14)
--- * no indexes on TEXT and BLOB colums; but VARCHAR allowed
--- * attribute names are truncated to 31 characters (errors if not unique)
--- * database names and table names can total a maximum of 122 characters
--- * past issues with table names having special characters
--- * the maximum number of NDB tables is limited to 20320
--- * the maximum number of attributes (columns and indexes) per table is
---   limited to 128
--- * the maximum number of attributes per key is 32
--- * the maximum permitted size of any one row is 8K; each BLOB or TEXT
---   column contributes 256 + 8 = 264 bytes towards this total
--- * the foreign key construct is ignored (just as it is in MyISAM tables)
---
--- * There are no durable commits on disk. Commits are replicated, but there
---   is no guarantee that logs are flushed to disk on commit.
--- * Range scans. There are query performance issues due to sequential access
---   to the NDB storage engine; it is also relatively more expensive to do
---   many range scans than it is with either MyISAM or InnoDB.
--- * Reliability of Records in range. The Records in range statistic is
---   available but is not completely tested or officially supported. This may
---   result in non-optimal query plans in some cases. If necessary, you can
---   employ USE INDEX or FORCE INDEX to alter the execution plan
--- * Unique hash indexes created with USING HASH cannot be used for accessing
---   a table if NULL is given as part of the key.
---
--- * No distributed table locks. A LOCK TABLES works only for the SQL node on
---   which the lock is issued; no other SQL node in the cluster “sees” this
---   lock.  For example, ALTER TABLE is not fully locking when running
---   multiple MySQL servers (SQL nodes).
---
--- * DDL operations. DDL operations (such as CREATE TABLE or ALTER TABLE) are
---   not safe from data node failures. If a data node fails while trying to
---   perform one of these, the data dictionary is locked and no further DDL
---   statements can be executed without restarting the cluster.
---
--- * The result of operations such as ALTER TABLE and CREATE INDEX performed
---   on one SQL node in the cluster are now visible to the cluster's other
---   SQL nodes without any additional action being taken.
-
--- quit;

=== removed file 'storage/ndb/test/crund/src/tables_mysql.myisam.sql'
--- a/storage/ndb/test/crund/src/tables_mysql.myisam.sql	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/src/tables_mysql.myisam.sql	1970-01-01 00:00:00 +0000
@@ -1,217 +0,0 @@
--- SET storage_engine=NDB;
--- SET storage_engine=INNODB;
-SET storage_engine=MYISAM;
-
-DROP DATABASE IF EXISTS crunddb;
-CREATE DATABASE crunddb;
-
-USE crunddb;
-
--- DROP TABLE IF EXISTS B1;
--- DROP TABLE IF EXISTS B0;
--- DROP TABLE IF EXISTS A;
-
-CREATE TABLE A (
-        id              INT             NOT NULL,
-        cint            INT,
-        clong           BIGINT,
-        cfloat          FLOAT,
-        cdouble         DOUBLE,
-        CONSTRAINT PK_A_0 PRIMARY KEY (id)
-);
-
-CREATE TABLE B0 (
-        id              INT             NOT NULL,
-        cint            INT,
-        clong           BIGINT,
-        cfloat          FLOAT,
-        cdouble         DOUBLE,
-        a_id            INT,
-        cvarbinary_def  VARBINARY(202),
-        cvarchar_def    VARCHAR(202),
-        cblob_def       BLOB(202),
-        ctext_def       TEXT(202),
-        CONSTRAINT PK_B0_0 PRIMARY KEY (id),
-        CONSTRAINT FK_B0_1 FOREIGN KEY (a_id) REFERENCES A (id)
-);
---        cvarchar_ascii  VARCHAR(202) CHARACTER SET ASCII,
---        ctext_ascii     TEXT(202) CHARACTER SET ASCII,
---        cvarchar_ucs2   VARCHAR(202) CHARACTER SET UCS2,
---        ctext_ucs2      TEXT(202) CHARACTER SET UCS2,
---        cvarchar_utf8   VARCHAR(202) CHARACTER SET UTF8,
---        ctext_utf8      TEXT(202) CHARACTER SET UTF8,
-
-CREATE TABLE B1 (
-        id              INT NOT NULL,
-        CONSTRAINT PK_B1_0 PRIMARY KEY (id)
-);
-
-CREATE INDEX I_B0_FK ON B0 (
-        a_id
-);
-
-
--- TEXT stores first 256 in primary table, rest in parts table at
--- different chunk sizes; VARCHAR always stores in primary tables and
--- thus is subject to 8k limit
-
-
-
--- 5.1 Reference Manual, Data Types (10)
--- Numeric Types:
--- * BIT[(M)] (1 <= M <= 64, default= 1, approximately (M+7)/8 bytes)
--- * BOOL, BOOLEAN (synonyms for TINYINT(1))
--- * INT[(M)], INTEGER[(M)] [UNSIGNED] (4 bytes)
---   TINYINT[(M)] (1 byte), SMALLINT[(M)] (2 bytes),
---   MEDIUMINT[(M)] (3 bytes), BIGINT[(M)] (8 bytes)
--- * FLOAT[(M,D)] [UNSIGNED] (4 bytes if 0 <= p <= 24, 8 bytes if 25 <= p <= 53)
--- * DOUBLE[(M,D)], DOUBLE[(M,D)], REAL[(M,D)] [UNSIGNED] (8 bytes)
--- * DECIMAL[(M[,D])],DEC[(M[,D])],NUMERIC[(M[,D])],FIXED[(M[,D])] [UNSIGNED]
---   (M*4/9 bytes plus extra)
--- Date Types:
--- * DATETIME (8 bytes)
--- * DATE, TIME (3 bytes)
--- * TIMESTAMP (4 bytes)
--- * YEAR[(2|4)] (1 byte)
--- String Types:
--- * BINARY(M), [NATIONAL] CHAR[(M)] [CHARACTER SET name] [COLLATE name]
---   (fixed-length, 0 <= M <= 2^8-1, default=1, right-padded)
--- * VARBINARY(M), [NATIONAL] VARCHAR[(M)] [CHARACTER SET name] [COLLATE name]
---   (variable-length, 0 <= M <= 2^16-1, 1..2-byte length prefix)
--- * BLOB[(M)], TEXT[(M)] [CHARACTER SET name] [COLLATE name]
---   (max length = 2^16-1 bytes, 2-byte length prefix, no default values)
--- * TINYBLOB, TINYTEXT (1-byte length prefix),
--- * MEDIUMBLOB, MEDIUMTEXT (3-byte length prefix),
--- * LONGBLOB, LONGTEXT (4-byte length prefix)
--- * ENUM (max 2^16-1 elements, 1..2 bytes)
--- * SET (max 64 elements, 1,2,3,4, or 8 bytes)
--- varying size types subject to the maximum row size
--- character sizes subject to the character set (utf8 = 1..3 bytes/character)
-
--- The largest values of a BLOB or TEXT object that can be transmitted
--- between the client and server is determined by the amount of available
--- memory and the size of the communications buffers. You can change the
--- message buffer size by changing the value of the max_allowed_packet
--- variable, but you must do so for both the server and the client program.
-
--- Each BLOB or TEXT value is represented internally by a separately
--- allocated object. This is in contrast to all other data types, for which
--- storage is allocated once per column when the table is opened.
-
--- TEXT and BLOB columns are implemented differently in the NDB Cluster
--- storage engine, wherein each row in a TEXT column is made up of two
--- separate parts. One of these is of fixed size (256 bytes), and is
--- actually stored in the original table. The other consists of any data
--- in excess of 256 bytes, which is stored in a hidden table. The rows
--- in this second table are always 2,000 bytes long. This means that the
--- size of a TEXT column is 256 if size <= 256 (where size represents
--- the size of the row); otherwise, the size is 256 + size + (2000 –
--- (size – 256) % 2000).
-
--- For tables using the NDBCLUSTER storage engine, there is the factor of
--- 4-byte alignment to be taken into account when calculating storage
--- requirements. This means that all NDB data storage is done in multiples
--- of 4 bytes.  For example, in NDBCLUSTER tables, the TINYINT, SMALLINT,
--- MEDIUMINT, and INTEGER (INT) column types each require 4 bytes storage
--- per record due to the alignment factor.
-
--- When calculating storage requirements for MySQL Cluster tables, you must
--- also remember that every table using the NDBCLUSTER storage engine
--- requires a primary key; if no primary key is defined by the user, then a
--- “hidden” primary key will be created by NDB.  This hidden primary key
--- consumes 31-35 bytes per table record.
-
--- The NDBCLUSTER storage engine in MySQL 5.1 supports variable-width
--- columns. This means that a VARCHAR column in a MySQL Cluster table
--- requires the same amount of storage as it would using any other
--- storage engine, with the exception that such values are 4-byte
--- aligned. Thus, the string 'abcd' stored in a VARCHAR(50) column using
--- the latin1 character set requires 8 bytes (rather than 6 bytes for
--- the same column value in a MyISAM table). This represents a change in
--- behavior from earlier versions of NDB-CLUSTER, where a VARCHAR(50)
--- column would require 52 bytes storage per record regardless of the
--- length of the string being stored.
-
--- You may find the ndb_size.pl utility to be useful for estimating NDB
--- storage requirements. This Perl script connects to a current MySQL
--- (non-Cluster) database and creates a report on how much space that
--- database would require if it used the NDBCLUSTER storage engine. See
--- Section 16.10.15, "ndb_size.pl — NDBCLUSTER Size Requirement Estimator",
--- for more information.
-
--- 9.2. The Character Set Used for Data and Sorting
--- default: latin1 (cp1252 West European) character set and the
--- latin1_swedish_ci collation
--- CHARSET may be one of binary, armscii8, ascii, big5, cp1250, cp1251,
--- cp1256, cp1257, cp850, cp852, cp866, cp932, dec8, eucjpms, euckr,
--- gb2312, gbk, geostd8, greek, hebrew, hp8, keybcs2, koi8r, koi8u,
--- latin1, latin2, latin5, latin7, macce, macroman, sjis, swe7, tis620,
--- ucs2, ujis, utf8.
-
--- java.nio.charset.Charset:
--- The native character encoding of the Java programming language is UTF-16.
--- [not sure: 
---      out.println("default charset: " + java.nio.charset.Charset.defaultCharset().displayName());
---  shows: UTF-8
--- ]
-
--- http://unicode.org/faq/basic_q.html#14
--- Q: What is the difference between UCS-2 and UTF-16?
--- A: UCS-2 is what a Unicode implementation was up to Unicode 1.1,
--- before surrogate code points and UTF-16 were added as concepts to
--- Version 2.0 of the standard. This term should be now be avoided.
---
--- When interpreting what people have meant by "UCS-2" in past usage, it
--- is best thought of as not a data format, but as an indication that an
--- implementation does not interpret any supplementary characters. In
--- particular, for the purposes of data exchange, UCS-2 and UTF-16 are
--- identical formats. Both are 16-bit, and have exactly the same code
--- unit representation.
---
--- The effective difference between UCS-2 and UTF-16 lies at a different
--- level, when one is interpreting a sequence code units as code points
--- or as characters. In that case, a UCS-2 implementation would not
--- handle processing like character properties, codepoint boundaries,
--- collation, etc. for supplementary characters. [MD] & [KW]
-
-
--- 5.1 Reference Manual, NDB Limitations (16.14)
--- * no indexes on TEXT and BLOB colums; but VARCHAR allowed
--- * attribute names are truncated to 31 characters (errors if not unique)
--- * database names and table names can total a maximum of 122 characters
--- * past issues with table names having special characters
--- * the maximum number of NDB tables is limited to 20320
--- * the maximum number of attributes (columns and indexes) per table is
---   limited to 128
--- * the maximum number of attributes per key is 32
--- * the maximum permitted size of any one row is 8K; each BLOB or TEXT
---   column contributes 256 + 8 = 264 bytes towards this total
--- * the foreign key construct is ignored (just as it is in MyISAM tables)
---
--- * There are no durable commits on disk. Commits are replicated, but there
---   is no guarantee that logs are flushed to disk on commit.
--- * Range scans. There are query performance issues due to sequential access
---   to the NDB storage engine; it is also relatively more expensive to do
---   many range scans than it is with either MyISAM or InnoDB.
--- * Reliability of Records in range. The Records in range statistic is
---   available but is not completely tested or officially supported. This may
---   result in non-optimal query plans in some cases. If necessary, you can
---   employ USE INDEX or FORCE INDEX to alter the execution plan
--- * Unique hash indexes created with USING HASH cannot be used for accessing
---   a table if NULL is given as part of the key.
---
--- * No distributed table locks. A LOCK TABLES works only for the SQL node on
---   which the lock is issued; no other SQL node in the cluster “sees” this
---   lock.  For example, ALTER TABLE is not fully locking when running
---   multiple MySQL servers (SQL nodes).
---
--- * DDL operations. DDL operations (such as CREATE TABLE or ALTER TABLE) are
---   not safe from data node failures. If a data node fails while trying to
---   perform one of these, the data dictionary is locked and no further DDL
---   statements can be executed without restarting the cluster.
---
--- * The result of operations such as ALTER TABLE and CREATE INDEX performed
---   on one SQL node in the cluster are now visible to the cluster's other
---   SQL nodes without any additional action being taken.
-
--- quit;

=== modified file 'storage/ndb/test/crund/src/tables_mysql.sql'
--- a/storage/ndb/test/crund/src/tables_mysql.sql	2010-02-14 05:05:31 +0000
+++ b/storage/ndb/test/crund/src/tables_mysql.sql	2010-09-27 05:31:17 +0000
@@ -14,17 +14,6 @@ DROP TABLE IF EXISTS b1;
 DROP TABLE IF EXISTS b0;
 DROP TABLE IF EXISTS a;
 
--- SHOW TABLES;
-
--- MySQL does not support wildcards in user names, only anonymous users
--- specified by the empty user name ''; any user who connects from the
--- local host with the correct password for the anonymous user will be
--- allowed access then. 
-GRANT ALL ON *.* TO ''@localhost ;
-GRANT ALL ON *.* TO md@localhost ;
-GRANT ALL ON *.* TO mz@localhost ;
-GRANT ALL ON *.* TO clr@localhost ;
-
 CREATE TABLE a (
         id              INT             NOT NULL,
         cint            INT,

Attachment: [text/bzr-bundle] bzr/martin.zaun@oracle.com-20100927053117-chbs6r79ftx7jk4a.bundle
Thread
bzr commit into mysql-5.1-telco-7.1 branch (martin.zaun:3813) Martin Zaun27 Sep