From 9cc4031808d8338b3c08d7d6cc947bb181f3fe55 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Apr 2007 17:50:43 +0200 Subject: [PATCH 01/10] BUG#27701 Arguments to some compile-pentium* scripts were not properly passed to SETUP.sh. Besides the old way not working with some shells, single arguments that contained whitespace were also broken up. This patch tries to fix both errors. BUILD/compile-pentium-debug-max-no-ndb: correctly pass arguments to sourced script BUILD/compile-pentium-debug-max: correctly pass arguments to sourced script BUILD/compile-pentium-debug: correctly pass arguments to sourced script BUILD/compile-pentium64-debug-max: correctly pass arguments to sourced script BUILD/compile-pentium64-debug: correctly pass arguments to sourced script --- BUILD/compile-pentium-debug | 3 +- BUILD/compile-pentium-debug-max | 3 +- BUILD/compile-pentium-debug-max-no-ndb | 3 +- BUILD/compile-pentium64-debug | 3 +- BUILD/compile-pentium64-debug-max | 3 +- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 ++++++++++++++++++++++++++ 7 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/BUILD/compile-pentium-debug b/BUILD/compile-pentium-debug index 7957caead29..e31cb59a8a4 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" c_warnings="$c_warnings $debug_extra_warnings" diff --git a/BUILD/compile-pentium-debug-max b/BUILD/compile-pentium-debug-max index a69513ac6bb..56e24617abb 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 $max_cflags" c_warnings="$c_warnings $debug_extra_warnings" diff --git a/BUILD/compile-pentium-debug-max-no-ndb b/BUILD/compile-pentium-debug-max-no-ndb index 26ec7eacc9d..92a388f9cb9 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 $max_cflags" c_warnings="$c_warnings $debug_extra_warnings" diff --git a/BUILD/compile-pentium64-debug b/BUILD/compile-pentium64-debug index 0299669f79a..1edc9827366 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" c_warnings="$c_warnings $debug_extra_warnings" diff --git a/BUILD/compile-pentium64-debug-max b/BUILD/compile-pentium64-debug-max index f0745c88c90..656825d8494 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 $max_cflags" c_warnings="$c_warnings $debug_extra_warnings" diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests From 0d982c5d67a539f93171c1ab1a9a021623fa2eb5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Apr 2007 21:50:56 +0200 Subject: [PATCH 02/10] Header file "decimal.h" needs to be delivered with binary packages: Bug#27456 decimal.h is not installed with public include files --- include/Makefile.am | 4 +-- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/include/Makefile.am b/include/Makefile.am index 9cd2f6215f1..95a7a4803e0 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -22,7 +22,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 raid.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 $(HEADERS_GEN) @@ -33,7 +33,7 @@ noinst_HEADERS = config-win.h config-os2.h config-netware.h \ my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \ my_aes.h my_tree.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_user.h my_libwrap.h # Remove built files and the symlinked directories diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests From 5c9123b5fc78716ac9bac51ce93fb5f84da88e42 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Apr 2007 12:18:17 +0200 Subject: [PATCH 03/10] Let the "configure" options that control table handlers (NDB, InnoDB) or features ("embedded") also control the list of man pages installed, so that they correspond better to the binaries. This is the second version of this fix, including review comments. configure.in: Several of our man pages are specific to parts (table handlers, features, ...) which are controlled by "configure" options, so there are builds which do not include these parts. For such builds, remove those specific man pages from the list of man pages to be installed, so that the man pages correspond better to the binaries. In this patch, do it for NDB (modify Kent's approach), "embedded", and InnoDB. Ensure that the handling of the man pages is determined only after the options have been processed, the old nandling (NDB only) was done too early. This is the second version of this fix, including review comments. --- configure.in | 76 ++++++++++++++++++++--------- mysql-test/r/bdb_notembedded.result | 35 +++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++ 3 files changed, 127 insertions(+), 22 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/configure.in b/configure.in index 9b5abe39a6f..76352b06d62 100644 --- a/configure.in +++ b/configure.in @@ -2376,28 +2376,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) - # Shall we build the bench code? AC_ARG_WITH(bench, [ --without-bench Skip building of the benchmark suite.], @@ -2532,6 +2510,60 @@ MYSQL_CHECK_BLACKHOLEDB MYSQL_CHECK_NDBCLUSTER MYSQL_CHECK_FEDERATED +# 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"$have_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"$have_innodb" != 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 +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= server_scripts= diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests From 5234f5adb786718c90bc96280ad598467da69e69 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Apr 2007 12:32:01 +0200 Subject: [PATCH 04/10] reverted the fix for Bug#5507 --- mysql-test/r/truncate.result | 26 +++----------------------- mysql-test/t/truncate.test | 31 ++++++++----------------------- sql/sql_delete.cc | 9 +++------ sql/sql_lex.cc | 1 - 4 files changed, 14 insertions(+), 53 deletions(-) diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result index 6c21db0e2b8..b194f9b7dc6 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/truncate.test b/mysql-test/t/truncate.test index c52260124cb..ba5364bd324 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/sql_delete.cc b/sql/sql_delete.cc index 6956e5cfe91..19f3135c594 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -369,8 +369,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 all_fields; @@ -385,14 +383,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); } } @@ -897,8 +895,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) if (!dont_send_ok) { 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 4be0aca3ea7..3be844b6761 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1834,7 +1834,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: From e4fe1f9f152d9d29c7cfaf913bf3d5c4b9059c43 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Apr 2007 14:41:07 +0200 Subject: [PATCH 05/10] Cleanup: The temporary file could be left around if nothing was excluded. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 76352b06d62..0c2d20e3feb 100644 --- a/configure.in +++ b/configure.in @@ -2554,7 +2554,7 @@ then man_dirs="man" man1_files=`echo $man1_files` man8_files=`echo $man8_files` - rm -f $MANLISTFIL + rm -f $MANLISTFIL $TMPLISTFIL else man_dirs="" man1_files="" From 0e42267fa0975afcf42ac0e21ba7d308c93d17ec Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Apr 2007 16:41:38 +0200 Subject: [PATCH 06/10] sql/ha_ndbcluster.cc Hex constants that exceed 32 bit need to be marked "LL" for the compile to work. sql/ha_ndbcluster.cc: Hex constants that exceed 32 bit need to be marked "LL" for the compile to work (discovered on a Debian PPC box, 32-bit big-endian, running gcc 3.3.6). --- sql/ha_ndbcluster.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 71050bc73e4..350133221ab 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -733,8 +733,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, pack_len) != 0); } @@ -2678,10 +2678,10 @@ void ha_ndbcluster::unpack_record(byte* buf) /* lsw is stored first */ Uint32 *buf= (Uint32 *)(*value).rec->aRef(); ((Field_bit *) *field)->store((((longlong)*buf) - & 0x000000000FFFFFFFF) + & 0x000000000FFFFFFFFLL) | ((((longlong)*(buf+1)) << 32) - & 0xFFFFFFFF00000000), + & 0xFFFFFFFF00000000LL), TRUE); #else ((Field_bit *) *field)->store((longlong) From 26aba3fb2c2924f530d258593abecda5d3a90a22 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Apr 2007 10:51:53 +0200 Subject: [PATCH 07/10] configure.in : Ensure that "icheck" is really the ABI checker, not some other tool (file system checker on Tru64). Patch originally supplied by Peter O'Gorman, slightly modified by me. Bug#27739 "build fails on Tru64 due to icheck test in configure" configure.in: We use "icheck" as a tool to check against ABI changes. However, some systems (like Tru64) have "icheck" as a file system checker. So if "icheck" is found, it should be verified that this really is the ABI checker and not some other tool. Patch originally supplied by Peter O'Gorman, slightly modified by me. Bug#27739 "build fails on Tru64 due to icheck test in configure" --- configure.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configure.in b/configure.in index 0c2d20e3feb..a29329707af 100644 --- a/configure.in +++ b/configure.in @@ -459,6 +459,22 @@ AC_SUBST(MAKEINDEX) # 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 From e67c28ca493df1b75bcf06a6bc3a3666277c9f6a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 23 Apr 2007 13:36:18 +0200 Subject: [PATCH 08/10] dbug/dbug_analyze.c : Avoid the unresolved symbol "my_thread_global_init()" in a build "--without-server". Fix for bug#14685 dbug/dbug_analyze.c: In a build "--without-server", the libraries will be built without threading. In this case, "my_thread_global_init()" is missing in the libraries, and the linker will report an unresolved symbol. Avoid this error by making the call to "my_thread_global_init()" depend on "#ifdef THREAD". Fix for bug#14685 --- dbug/dbug_analyze.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dbug/dbug_analyze.c b/dbug/dbug_analyze.c index 8cd0af4f7e0..3263b2ccc59 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]); From 879e0a124518f1601c51461509d79b759b57f875 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Apr 2007 22:33:25 +0200 Subject: [PATCH 09/10] restrict recently added file to GPLv2 ndb/test/ndbapi/testScanFilter.cpp: restrict to GPLv2 --- ndb/test/ndbapi/testScanFilter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ndb/test/ndbapi/testScanFilter.cpp b/ndb/test/ndbapi/testScanFilter.cpp index e195c04bd93..4ce9145bc1e 100644 --- a/ndb/test/ndbapi/testScanFilter.cpp +++ b/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 From 246232268c598e68a376d634a79ed4eb5cb040e4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Apr 2007 20:23:19 +0200 Subject: [PATCH 10/10] Fix test case that was broken for builds without InnoDB. mysql-test/t/sp.test: Disable warnings during table creation in one place where engine=innodb is used, in order to make this test case work with a mysqld that was compiled without InnoDB. --- mysql-test/t/sp.test | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 64876ae0584..c94a526e10c 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -7075,8 +7075,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 |;