From 74dd6421777f2046b8e5067f8c918d1f29e9f339 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Jun 2005 11:16:37 +0200 Subject: [PATCH 1/4] sql_repl.cc: Bug #11064 some read error not detected in replication on 64-bit platform sql/sql_repl.cc: Bug #11064 some read error not detected in replication on 64-bit platform BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- BitKeeper/etc/logging_ok | 1 + sql/sql_repl.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 499e3cdd4f5..185f84cc772 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -110,6 +110,7 @@ mwagner@here.mwagner.org mwagner@ultrafly.mysql.com mwagner@work.mysql.com mysqldev@build.mysql2.com +ndbdev@dl145b.mysql.com nick@mysql.com nick@nick.leippe.com patg@krsna.patg.net diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 9485031c144..ed2d477fc5d 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -84,7 +84,7 @@ static int send_file(THD *thd) char fname[FN_REFLEN+1]; const char *errmsg = 0; int old_timeout; - uint packet_len; + unsigned long packet_len; char buf[IO_SIZE]; // It's safe to alloc this DBUG_ENTER("send_file"); From 78fc41727e17807668ab87c41060abf59a6cc2ee Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Jun 2005 15:05:18 +0200 Subject: [PATCH 2/4] *don't* mess with kernel defines, boy. and HAVE_ATOMIC_ADD/HAVE_ATOMIC_SUB is tested in configure --- include/my_global.h | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/include/my_global.h b/include/my_global.h index 0d6f52a3376..f24bcd528ca 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -203,18 +203,6 @@ C_MODE_END #define BAD_MEMCPY #endif -/* In Linux-alpha we have atomic.h if we are using gcc */ -#if defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && defined(__alpha__) && (__GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95)) && !defined(HAVE_ATOMIC_ADD) -#define HAVE_ATOMIC_ADD -#define HAVE_ATOMIC_SUB -#endif - -/* In Linux-ia64 including atomic.h will give us an error */ -#if (defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && (defined(__ia64__)||defined(__powerpc64__))) || !defined(THREAD) -#undef HAVE_ATOMIC_ADD -#undef HAVE_ATOMIC_SUB -#endif - #if defined(_lint) && !defined(lint) #define lint #endif @@ -276,16 +264,17 @@ C_MODE_END #include #endif #ifdef HAVE_ATOMIC_ADD -#define __SMP__ -#ifdef HAVE_LINUX_CONFIG_H -#include /* May define CONFIG_SMP */ -#endif -#ifndef CONFIG_SMP -#define CONFIG_SMP +#if defined(__ia64__) +#define new my_arg_new +#define need_to_restore_new 1 #endif C_MODE_START #include C_MODE_END +#ifdef need_to_restore_new /* probably safer than #ifdef new */ +#undef new +#undef need_to_restore_new +#endif #endif #include /* Recommended by debian */ /* We need the following to go around a problem with openssl on solaris */ From 7509b50054bbcb6d703f6ce41972d1533614b221 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Jun 2005 21:08:45 +0200 Subject: [PATCH 3/4] after merge fixes --- mysql-test/r/create.result | 14 +++++++++++--- mysql-test/t/create.test | 7 +++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 103bed598ef..a4f5cc517b3 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -497,9 +497,9 @@ drop database mysqltest; select database(); database() NULL -select database(); -database() -NULL +select database(), user(); +database() user() +NULL mysqltest_1@localhost use test; create table t1 (a int, index `primary` (a)); ERROR 42000: Incorrect index name 'primary' @@ -563,3 +563,11 @@ select * from t2; b 1 drop table t1,t2; +create table t1 (a int); +create table t1 select * from t1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +create table t2 union = (t1) select * from t1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +flush tables with read lock; +unlock tables; +drop table t1; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 2ba726f29e2..4644d3db5c5 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -403,8 +403,11 @@ drop database mysqltest; select database(); # Connect without a database -connect (user4,localhost,mysqltest_1,,*NO-ONE*); -select database(); +connect (user1,localhost,mysqltest_1,,*NO-ONE*); +connection user1; +select database(), user(); +connection default; +disconnect user1; # # Test for Bug 856 'Naming a key "Primary" causes trouble' From 61c12aa299890bfbde8d8726c623c7af4eee5ec6 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 4 Jun 2005 07:15:11 +0200 Subject: [PATCH 4/4] after mergemerge --- mysql-test/r/create.result | 8 ++++++++ mysql-test/t/create.test | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index b9dda435b11..de3840447dc 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -563,6 +563,14 @@ select * from t2; b 1 drop table t1,t2; +create table t1 (a int); +create table t1 select * from t1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +create table t2 union = (t1) select * from t1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +flush tables with read lock; +unlock tables; +drop table t1; create table t1(column.name int); ERROR 42000: Incorrect table name 'column' create table t1(test.column.name int); diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index a08603f8efb..b73cd28c71c 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -408,12 +408,12 @@ connection user1; select database(), user(); connection default; disconnect user1; +use test; # # Test for Bug 856 'Naming a key "Primary" causes trouble' # -use test; --error 1280 create table t1 (a int, index `primary` (a)); --error 1280 @@ -470,8 +470,6 @@ drop table t1,t2; # This tests two additional possible errors and a hang if # an improper fix is present. # -connection default; -use test; create table t1 (a int); --error 1093 create table t1 select * from t1;