diff --git a/BUILD/compile-pentium b/BUILD/compile-pentium
index 38d1ff42bafe35fd15ba567f47f3a3e193b0a5d9..b8f8d028e1ff81f0e9dcc99fe343b5d4de9f54e4 100755
--- a/BUILD/compile-pentium
+++ b/BUILD/compile-pentium
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 path=`dirname $0`
-. "$path/SETUP.sh" $@
+. "$path/SETUP.sh"
 
 extra_flags="$pentium_cflags $fast_cflags"
 extra_configs="$pentium_configs $static_link"
diff --git a/BUILD/compile-pentium-debug b/BUILD/compile-pentium-debug
index db2bbea02f49cbc173ba0eee2308f2d911c161bf..3f4027c5dd61acabca1dd160b89c3325b911249a 100755
--- a/BUILD/compile-pentium-debug
+++ b/BUILD/compile-pentium-debug
@@ -1,7 +1,8 @@
 #! /bin/sh
 
 path=`dirname $0`
-. "$path/SETUP.sh" $@ --with-debug=full
+set -- "$@" --with-debug=full
+. "$path/SETUP.sh"
 
 extra_flags="$pentium_cflags $debug_cflags"
 extra_configs="$pentium_configs $debug_configs"
diff --git a/BUILD/compile-pentium-debug-max b/BUILD/compile-pentium-debug-max
index b2c8b4d933115c28119e08cd234f933d0a7a7761..941a63a209ff15b8606d9966e82fa1f0f38b580d 100755
--- a/BUILD/compile-pentium-debug-max
+++ b/BUILD/compile-pentium-debug-max
@@ -1,7 +1,8 @@
 #! /bin/sh
 
 path=`dirname $0`
-. "$path/SETUP.sh" "$@" --with-debug=full
+set -- "$@" --with-debug=full
+. "$path/SETUP.sh"
 
 extra_flags="$pentium_cflags $debug_cflags"
 extra_configs="$pentium_configs $debug_configs $max_configs $error_inject --with-experimental-collations"
diff --git a/BUILD/compile-pentium-debug-max-no-ndb b/BUILD/compile-pentium-debug-max-no-ndb
index 3a94e89439adac619ba9cd0b75c2c692c60ad1e9..3f7a7904050ffd83335b3efeb3bec300f928ae9d 100755
--- a/BUILD/compile-pentium-debug-max-no-ndb
+++ b/BUILD/compile-pentium-debug-max-no-ndb
@@ -1,7 +1,8 @@
 #! /bin/sh
 
 path=`dirname $0`
-. "$path/SETUP.sh" $@ --with-debug=full
+set -- "$@" --with-debug=full
+. "$path/SETUP.sh"
 
 extra_flags="$pentium_cflags $debug_cflags"
 extra_configs="$pentium_configs $debug_configs $max_no_ndb_configs"
diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max
index a2715e7c3789492eb452856d0a94901d9ebd20f9..09cc162d2befffa7f7ec1139ef589f06394fade4 100755
--- a/BUILD/compile-pentium-valgrind-max
+++ b/BUILD/compile-pentium-valgrind-max
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 path=`dirname $0`
-. "$path/SETUP.sh" "$@"
+. "$path/SETUP.sh"
 
 extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
 extra_configs="$pentium_configs $debug_configs $max_configs"
diff --git a/BUILD/compile-pentium64 b/BUILD/compile-pentium64
index bc6bbe4d0899c44d9b5579203cda56308437823f..3a8fad51feacf3936e9ed50a005358a8cbfe1545 100755
--- a/BUILD/compile-pentium64
+++ b/BUILD/compile-pentium64
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 path=`dirname $0`
-. "$path/SETUP.sh" $@
+. "$path/SETUP.sh"
 
 extra_flags="$pentium64_cflags $fast_cflags"
 extra_configs="$pentium_configs $static_link"
diff --git a/BUILD/compile-pentium64-debug b/BUILD/compile-pentium64-debug
index 145d5c44f8227861f1cce7693d16cc6d5417f41b..06ee672789c08035c2022a426a20d6fd9ef6dd4e 100755
--- a/BUILD/compile-pentium64-debug
+++ b/BUILD/compile-pentium64-debug
@@ -1,7 +1,8 @@
 #! /bin/sh
 
 path=`dirname $0`
-. "$path/SETUP.sh" $@ --with-debug=full
+set -- "$@" --with-debug=full
+. "$path/SETUP.sh"
 
 extra_flags="$pentium64_cflags $debug_cflags"
 extra_configs="$pentium_configs $debug_configs $static_link"
diff --git a/BUILD/compile-pentium64-debug-max b/BUILD/compile-pentium64-debug-max
index 7b71237cb2f6449416b327e1887f809d45c8ccbc..b8b271688be33d7367e1f895720cdf577ea9b6b7 100755
--- a/BUILD/compile-pentium64-debug-max
+++ b/BUILD/compile-pentium64-debug-max
@@ -1,7 +1,8 @@
 #! /bin/sh
 
 path=`dirname $0`
-. "$path/SETUP.sh" $@ --with-debug=full
+set -- "$@" --with-debug=full
+. "$path/SETUP.sh"
 
 extra_flags="$pentium64_cflags $debug_cflags"
 extra_configs="$pentium_configs $debug_configs $max_configs"
diff --git a/BUILD/compile-pentium64-max b/BUILD/compile-pentium64-max
index 789136a84dc0f8970b44dd76b7a6c642974ffb82..9acd5e7c46026e66b43b63f8826bdca6fbad63ca 100755
--- a/BUILD/compile-pentium64-max
+++ b/BUILD/compile-pentium64-max
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 path=`dirname $0`
-. "$path/SETUP.sh" $@
+. "$path/SETUP.sh" 
 
 extra_flags="$pentium64_cflags $fast_cflags"
 extra_configs="$pentium_configs $max_configs $static_link"
diff --git a/configure.in b/configure.in
index aecbe87ff8f4384462132ed2d321dbdfcdc514e4..1b477ac13ceb2a75ff59ded9acabc2f9d2e97172 100644
--- a/configure.in
+++ b/configure.in
@@ -425,6 +425,22 @@ AC_SUBST(PERL5)
 
 # icheck, used for ABI check
 AC_PATH_PROG(ICHECK, icheck, no)
+# "icheck" is also the name of a file system check program on Tru64.
+# Verify the program found is really the interface checker.
+if test "x$ICHECK" != "xno"
+then
+  AC_MSG_CHECKING(if $ICHECK works as expected)
+  echo "int foo;" > conftest.h
+  $ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
+  if test -f "conftest.ic"
+  then
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+    ICHECK=no
+  fi
+  rm -f conftest.ic conftest.h
+fi
 AC_SUBST(ICHECK)
 
 # Lock for PS
@@ -2301,28 +2317,6 @@ AC_ARG_WITH(man,
     [with_man=yes]
 )
 
-if test X"$with_man" = Xyes
-then
-  man_dirs="man"
-  if test X"$have_ndbcluster" = Xyes
-  then
-    man1_files=`ls $srcdir/man/*.1 | sed -e 's;^.*man/;;'`
-    man8_files=`ls $srcdir/man/*.8 | sed -e 's;^.*man/;;'`
-  else
-    man1_files=`ls $srcdir/man/*.1 | grep -v '/ndb' | sed -e 's;^.*man/;;'`
-    man8_files=`ls $srcdir/man/*.8 | grep -v '/ndb' | sed -e 's;^.*man/;;'`
-  fi
-  man1_files=`echo $man1_files`
-  man8_files=`echo $man8_files`
-else
-  man_dirs=""
-  man1_files=""
-  man8_files=""
-fi
-AC_SUBST(man_dirs)
-AC_SUBST(man1_files)
-AC_SUBST(man8_files)
-
 # Don't build readline, i have it already
 AC_ARG_WITH(readline,
     [  --without-readline      Use system readline instead of bundled copy.],
@@ -2449,6 +2443,61 @@ AC_SUBST(readline_link)
 AC_SUBST(readline_h_ln_cmd)
 
 
+
+# Include man pages, if desired, adapted to the configured parts.
+if test X"$with_man" = Xyes
+then
+  # First, create the list of all man pages present.
+  MANLISTFIL=manlist.$$
+  TMPLISTFIL=`echo $MANLISTFIL | sed -e 's/manlist/tmplist/'`
+  if test -f $MANLISTFIL -o -f $TMPLISTFIL
+  then
+    echo "Temp file '$MANLISTFIL' or '$TMPLISTFIL' already exists in '`pwd`' - aborting"
+    exit 1
+  fi
+  touch $MANLISTFIL $TMPLISTFIL
+
+  ls $srcdir/man/*.[[18]] > $MANLISTFIL
+
+  # Then, remove all those pages from the list which are specific to parts
+  # (table handlers, features, ...) which are not configured in this run.
+  AC_MSG_CHECKING("for man pages to remove")
+  MAN_DROP="dropping"
+  if test X"$with_plugin_ndbcluster" != Xyes
+  then
+    MAN_DROP="$MAN_DROP ndbcluster"
+    grep -v '/ndb' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
+  fi
+  if test X"$with_embedded_server" != Xyes
+  then
+    MAN_DROP="$MAN_DROP embedded"
+    grep -v 'embedded' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
+  fi
+  if test X"$with_plugin_innobase" != Xyes
+  then
+    MAN_DROP="$MAN_DROP innodb"
+    grep -v 'inno' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
+  fi
+  AC_MSG_RESULT([$MAN_DROP])
+
+  # Finally, split the man pages into sections 1 and 8.
+  # Get rid of line breaks.
+  man1_files=`sed -n -e '/\.1$/s/^.*man\///p' <$MANLISTFIL`
+  man8_files=`sed -n -e '/\.8$/s/^.*man\///p' <$MANLISTFIL`
+
+  man_dirs="man"
+  man1_files=`echo $man1_files`
+  man8_files=`echo $man8_files`
+  rm -f $MANLISTFIL $TMPLISTFIL
+else
+  man_dirs=""
+  man1_files=""
+  man8_files=""
+fi
+AC_SUBST(man_dirs)
+AC_SUBST(man1_files)
+AC_SUBST(man8_files)
+
 # If we have threads generate some library functions and test programs
 sql_server_dirs=
 sql_server=
diff --git a/dbug/dbug_analyze.c b/dbug/dbug_analyze.c
index 8cd0af4f7e0bd88a663202021397d011625f52b7..3263b2ccc59f1f09246d746cabce137a5ba4cc47 100644
--- a/dbug/dbug_analyze.c
+++ b/dbug/dbug_analyze.c
@@ -574,10 +574,12 @@ int main (int argc, char **argv)
     FILE *infile;
     FILE *outfile = {stdout};
 
-#if defined(HAVE_PTHREAD_INIT) && defined(THREAD)
+#ifdef THREAD
+#if defined(HAVE_PTHREAD_INIT)
   pthread_init();                       /* Must be called before DBUG_ENTER */
 #endif
   my_thread_global_init();
+#endif /* THREAD */
   {
     DBUG_ENTER ("main");
     DBUG_PROCESS (argv[0]);
diff --git a/include/Makefile.am b/include/Makefile.am
index cdf8682094353781b8af9097cb4c9534bef7afda..b803f614a93239cfdae5cd28f1f56b91f4f01ba6 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -23,7 +23,7 @@ HEADERS_ABI =		mysql.h mysql_com.h mysql_time.h \
 pkginclude_HEADERS =	$(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
 			my_xml.h mysql_embed.h \
 		  	my_pthread.h my_no_pthread.h \
-			errmsg.h my_global.h my_net.h \
+			decimal.h errmsg.h my_global.h my_net.h \
 			my_getopt.h sslopt-longopts.h my_dir.h \
 			sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
 			m_ctype.h mysql/plugin.h my_attribute.h $(HEADERS_GEN)
@@ -34,7 +34,7 @@ noinst_HEADERS =	config-win.h config-netware.h \
 			my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
 			my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
 			thr_lock.h t_ctype.h violite.h md5.h base64.h \
-			mysql_version.h.in my_handler.h my_time.h decimal.h \
+			mysql_version.h.in my_handler.h my_time.h \
 			my_vle.h my_user.h my_atomic.h atomic/nolock.h \
 			atomic/rwlock.h atomic/x86-gcc.h atomic/x86-msvc.h \
 			my_libwrap.h
diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
index 34e01b7a675a8779a62c6b6dcb41cc66bbd3a9f7..a8a3e33b8cd236d2dc46d2a32aca8a21653f8153 100644
--- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
+++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
@@ -4,6 +4,9 @@
 # Purpose: To test having extra columns on the slave.
 ##################################################
 
+# Some tests in here requre partitioning
+-- source include/have_partition.inc
+
 ########### Clean up ################
 --disable_warnings
 --disable_query_log
diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result
index 6c21db0e2b81b7415cd3aeadfeb0cd94c2789d70..b194f9b7dc6b3505a9c26f5240e985b1b43b33d3 100644
--- a/mysql-test/r/truncate.result
+++ b/mysql-test/r/truncate.result
@@ -57,26 +57,6 @@ create table t1 (s1 int);
 insert into t1 (s1) values (1), (2), (3), (4), (5);
 create view v1 as select * from t1;
 truncate table v1;
-select count(*) from t1;
-count(*)
-0
-insert into t1 (s1) values (1), (2), (3), (4), (5);
-create view v2 as select * from t1 where s1 > 3;
-truncate table v2;
-select * from t1;
-s1
-1
-2
-3
-select * from v2;
-s1
-delete from t1;
-create table t2 (s1 int, s2 int);
-create view v3 as select a.s1, b.s2 from t1 a join t2 b on a.s1 = b.s1 where a.s1 > 3;
-truncate table v3;
-ERROR HY000: Can not delete from join view 'test.v3'
-create view v4 as select * from t1 limit 1,1;
-truncate table v4;
-ERROR HY000: The target table v4 of the TRUNCATE is not updatable
-drop view v1, v2, v3, v4;
-drop table t1, t2;
+ERROR 42S02: Table 'test.v1' doesn't exist
+drop view v1;
+drop table t1;
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index e99593b03a83b6d796b29bc2708018e7fa945066..961b1319fc42609742354aecfc1ea50553ed677f 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -415,9 +415,13 @@ drop table t1;
 #
 # BUG 14524
 #
+# Disable warnings to allow this test case to work without
+# the Blackhole engine.
+--disable_warnings
 CREATE TABLE `t1` (
   `id` int(11) default NULL
 ) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
+--enable_warnings
 SELECT * FROM t1;
 
 drop table t1;
@@ -425,9 +429,13 @@ drop table t1;
 #
 # BUG 14524
 #
+# Disable warnings to allow this test case to work without
+# the Blackhole engine.
+--disable_warnings
 CREATE TABLE `t1` (
   `id` int(11) default NULL
 ) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1 PARTITION BY HASH (id) ;
+--enable_warnings
 SELECT * FROM t1;
 
 drop table t1;
diff --git a/mysql-test/t/partition_hash.test b/mysql-test/t/partition_hash.test
index d3f1a5f4892742ee9be8b249a851906e26c0560f..dc527cad2b75131ffdf005a48378672f67329d21 100644
--- a/mysql-test/t/partition_hash.test
+++ b/mysql-test/t/partition_hash.test
@@ -129,7 +129,11 @@ drop table t1;
 #
 # BUG# 14524 Partitions: crash if blackhole
 #
+# Disable warnings to allow this test case to run without 
+# the Blackhole storage engine.
+--disable_warnings
 CREATE TABLE t1 (s1 int) ENGINE=BLACKHOLE PARTITION BY HASH (s1);
+--enable_warnings
 INSERT INTO t1 VALUES (0);
 DROP TABLE t1;
 
diff --git a/mysql-test/t/rpl_row_basic_11bugs.test b/mysql-test/t/rpl_row_basic_11bugs.test
index 17f5848ceef3dba65c2e1269a26323ec42f05abd..0109edf42643f8df52413094ef002a6209d3cb4f 100644
--- a/mysql-test/t/rpl_row_basic_11bugs.test
+++ b/mysql-test/t/rpl_row_basic_11bugs.test
@@ -1,6 +1,5 @@
 --source include/have_binlog_format_row.inc
 
-
 let $SERVER_VERSION=`select version()`;
 
 #This test case is not written for NDB, the result files 
@@ -127,6 +126,8 @@ sync_slave_with_master;
 --source include/master-slave-reset.inc
 --enable_query_log
 
+# disabling warnings temporarily for ENGINE=INNODB to work without InnoDB
+--disable_warnings
 --echo **** On Master **** 
 connection master;
 CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM;
@@ -139,6 +140,7 @@ ALTER TABLE t1_myisam ENGINE=INNODB;
 ALTER TABLE t1_innodb ENGINE=MYISAM;
 ALTER TABLE t2_myisam ENGINE=INNODB;
 ALTER TABLE t2_innodb ENGINE=MYISAM;
+--enable_warnings
 
 --echo **** On Master **** 
 connection master;
diff --git a/mysql-test/t/rpl_row_mysqlbinlog.test b/mysql-test/t/rpl_row_mysqlbinlog.test
index f7158107e4cd0255fd8b4b5ec47b1590cc7354f5..1a5dd281ae1b27f15ae0752cf054e9b5196ba12d 100644
--- a/mysql-test/t/rpl_row_mysqlbinlog.test
+++ b/mysql-test/t/rpl_row_mysqlbinlog.test
@@ -10,6 +10,8 @@
 # Embedded server doesn't support binlogging
 -- source include/not_embedded.inc
 -- source include/master-slave.inc
+# This test requires the cp932 charset compiled in
+-- source include/have_cp932.inc
 
 # Setup Section
 # we need this for getting fixed timestamps inside of this test
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 626a963e340ac9103897aef3e18bc7222a59f395..a9ef5ba8ea7a1a03848b4b00f91dcecd076387df 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -7167,8 +7167,11 @@ DROP FUNCTION bug5274_f2|
 delimiter ;|
 drop table t1,t2;
 
+# Disable warnings to allow test run without InnoDB
+--disable_warnings
 CREATE TABLE t1 (a int auto_increment primary key) engine=MyISAM;
 CREATE TABLE t2 (a int auto_increment primary key, b int) engine=innodb;
+--enable_warnings
 set @a=0;
 
 delimiter |;
diff --git a/mysql-test/t/truncate.test b/mysql-test/t/truncate.test
index c52260124cb48050721274b5c162c2e86f8bb89c..ba5364bd3242d05777e215c4953be8a20510f7a5 100644
--- a/mysql-test/t/truncate.test
+++ b/mysql-test/t/truncate.test
@@ -54,33 +54,18 @@ drop table t1;
 # End of 4.1 tests
 
 # Test for Bug#5507 "TRUNCATE should work with views"
+#
+# when it'll be fixed, the error should become 1347
+# (test.v1' is not BASE TABLE)
+#
 
 create table t1 (s1 int); 
-
 insert into t1 (s1) values (1), (2), (3), (4), (5);
 create view v1 as select * from t1;
+--error 1146
 truncate table v1;
-select count(*) from t1;
-
-insert into t1 (s1) values (1), (2), (3), (4), (5);
-create view v2 as select * from t1 where s1 > 3;
-truncate table v2; 
-select * from t1;
-select * from v2;
-delete from t1;
-
-# The following should fail
-create table t2 (s1 int, s2 int);
-create view v3 as select a.s1, b.s2 from t1 a join t2 b on a.s1 = b.s1 where a.s1 > 3;
---error 1395
-truncate table v3; 
-
-# The following should fail
-create view v4 as select * from t1 limit 1,1; 
---error 1288
-truncate table v4;
-
-drop view v1, v2, v3, v4;
-drop table t1, t2;
+drop view v1;
+drop table t1;
 
 # End of 5.0 tests
+
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 7f5c1cfd49489f2efc1c40cc87891f2da9d6b892..8fd9dd0354c02798d90a4659ca426cbff5d4a7f3 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -738,8 +738,8 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
         DBUG_DUMP("value", (char*)&bits, pack_len);
 #ifdef WORDS_BIGENDIAN
         /* store lsw first */
-        bits = ((bits >> 32) & 0x00000000FFFFFFFF)
-          |    ((bits << 32) & 0xFFFFFFFF00000000);
+        bits = ((bits >> 32) & 0x00000000FFFFFFFFLL)
+          |    ((bits << 32) & 0xFFFFFFFF00000000LL);
 #endif
         DBUG_RETURN(ndb_op->setValue(fieldnr, (char*)&bits) != 0);
       }
@@ -3222,10 +3222,10 @@ void ndb_unpack_record(TABLE *table, NdbValue *value,
             /* lsw is stored first */
             Uint32 *buf= (Uint32 *)(*value).rec->aRef();
             field_bit->Field_bit::store((((longlong)*buf)
-                                         & 0x000000000FFFFFFFF)
+                                         & 0x000000000FFFFFFFFLL)
                                         |
                                         ((((longlong)*(buf+1)) << 32)
-                                         & 0xFFFFFFFF00000000),
+                                         & 0xFFFFFFFF00000000LL),
                                         TRUE);
 #else
             field_bit->Field_bit::store((longlong)
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt
index 03990bbad0e35cce94755b8aa7ce2e51ebc63293..bb2d9c25a77f052c93478c71b2b9d7824da82316 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -5914,8 +5914,8 @@ ER_FOREIGN_DUPLICATE_KEY 23000 S1009
         eng "Upholding foreign key constraints for table '%.192s', entry '%-.192s', key %d would lead to a duplicate entry"
         ger "Aufrechterhalten der Fremdschlüssel-Constraints für Tabelle '%.192s', Eintrag '%-.192s', Schlüssel %d würde zu einem doppelten Eintrag führen"
 ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
-        eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use scripts/mysql_fix_privilege_tables"
-        ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MySQL %d, jetzt unter %d. Bitte benutzen Sie scripts/mysql_fix_privilege_tables, um den Fehler zu beheben"
+        eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysql_upgrade to fix this error."
+        ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MySQL %d, jetzt unter %d. Bitte benutzen Sie mysql_upgrade, um den Fehler zu beheben"
 ER_REMOVED_SPACES
         eng "Leading spaces are removed from name '%s'"
         ger "Führende Leerzeichen werden aus dem Namen '%s' entfernt"
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 92f38d57330b4632e077e5cde9a380f9d3f1340e..26c12dea081fba9fed275ebcef3f364cc6376d39 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -394,8 +394,6 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
 {
   Item *fake_conds= 0;
   SELECT_LEX *select_lex= &thd->lex->select_lex;
-  const char *operation = thd->lex->sql_command == SQLCOM_TRUNCATE ?
-                          "TRUNCATE" : "DELETE";
   DBUG_ENTER("mysql_prepare_delete");
   List<Item> all_fields;
 
@@ -410,14 +408,14 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
     DBUG_RETURN(TRUE);
   if (!table_list->updatable || check_key_in_view(thd, table_list))
   {
-    my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, operation);
+    my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "DELETE");
     DBUG_RETURN(TRUE);
   }
   {
     TABLE_LIST *duplicate;
     if ((duplicate= unique_table(thd, table_list, table_list->next_global, 0)))
     {
-      update_non_unique_table_error(table_list, operation, duplicate);
+      update_non_unique_table_error(table_list, "DELETE", duplicate);
       DBUG_RETURN(TRUE);
     }
   }
@@ -935,8 +933,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
   if (!dont_send_ok)
   {
     enum legacy_db_type table_type;
-    if (mysql_frm_type(thd, path, &table_type) == FRMTYPE_VIEW)
-      goto trunc_by_del;
+    mysql_frm_type(thd, path, &table_type);
     if (table_type == DB_TYPE_UNKNOWN)
     {
       my_error(ER_NO_SUCH_TABLE, MYF(0),
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 4a162478388810f3f289d7f9fd4e1b9ffe86fa85..26955c18342e229ba1bbba970979394a892378bb 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1835,7 +1835,6 @@ bool st_lex::can_use_merged()
   case SQLCOM_UPDATE_MULTI:
   case SQLCOM_DELETE:
   case SQLCOM_DELETE_MULTI:
-  case SQLCOM_TRUNCATE:
   case SQLCOM_INSERT:
   case SQLCOM_INSERT_SELECT:
   case SQLCOM_REPLACE:
diff --git a/storage/ndb/test/ndbapi/testScanFilter.cpp b/storage/ndb/test/ndbapi/testScanFilter.cpp
index 958b50d67013b2f3690576194f2fe72453a7e57d..0b2f7686c38dc8617a5dfc2d54a85f740732b618 100644
--- a/storage/ndb/test/ndbapi/testScanFilter.cpp
+++ b/storage/ndb/test/ndbapi/testScanFilter.cpp
@@ -2,8 +2,7 @@
 
    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; either version 2 of the License, or
-   (at your option) any later version.
+   the Free Software Foundation; version 2 of the License only.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of