summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortim@cane.mysql.fi <>2000-12-21 12:00:09 +0200
committertim@cane.mysql.fi <>2000-12-21 12:00:09 +0200
commit7e3fd8ce798c681cdbe18dcdecb563f63160166c (patch)
tree0fcc294e65f2ac0aa26f05054339eb7a5a9b040a
parent45d537d58014587caa1f61a2d69a9fc7bbaa0856 (diff)
parent6ea697884728f9b05cc8604154788dbf7d108406 (diff)
downloadmariadb-git-7e3fd8ce798c681cdbe18dcdecb563f63160166c.tar.gz
Merge work.mysql.com:/home/bk/mysql
into cane.mysql.fi:/usr/home/tim/my/work
-rw-r--r--acconfig.h3
-rw-r--r--configure.in5
-rw-r--r--libmysql/Makefile.am1
-rw-r--r--libmysql/Makefile.shared2
-rw-r--r--libmysql/libmysql.c2
-rw-r--r--mysql-test/r/delete.result0
-rw-r--r--mysql-test/r/replace.result0
-rw-r--r--mysql-test/t/delete.test8
-rw-r--r--mysql-test/t/replace.test21
-rw-r--r--sql/mini_client.cc2
10 files changed, 41 insertions, 3 deletions
diff --git a/acconfig.h b/acconfig.h
index 986bf90fd42..b0b6a3aae64 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -189,6 +189,9 @@
/* Define as the base type of the last arg to accept */
#undef SOCKET_SIZE_TYPE
+/* Last argument to get/setsockopt */
+#undef SOCKOPT_OPTLEN_TYPE
+
#undef SPEED_T_IN_SYS_TYPES
#undef SPRINTF_RETURNS_PTR
#undef SPRINTF_RETURNS_INT
diff --git a/configure.in b/configure.in
index 1d50d48a8a8..c6885bffec0 100644
--- a/configure.in
+++ b/configure.in
@@ -1177,6 +1177,11 @@ AC_C_BIGENDIAN
#---START: Used in for client configure
# Check base type of last arg to accept
MYSQL_TYPE_ACCEPT
+case "$SYSTEM_TYPE" in
+*bsdi* ) AC_DEFINE_UNQUOTED(SOCKOPT_OPTLEN_TYPE, size_t);;
+* ) AC_DEFINE_UNQUOTED(SOCKOPT_OPTLEN_TYPE, size_socket);;
+esac
+
#---END:
# Find where the stack goes
MYSQL_STACK_DIRECTION
diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am
index 7df01aa4e52..7b6472ecaba 100644
--- a/libmysql/Makefile.am
+++ b/libmysql/Makefile.am
@@ -28,6 +28,7 @@ include $(srcdir)/Makefile.shared
libmysqlclient_la_SOURCES = $(target_sources)
libmysqlclient_la_LIBADD = $(target_libadd)
libmysqlclient_la_LDFLAGS = $(target_ldflags)
+EXTRA_DIST = Makefile.shared
# This is called from the toplevel makefile
link_sources:
diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared
index 240a520aa14..795a64ba138 100644
--- a/libmysql/Makefile.shared
+++ b/libmysql/Makefile.shared
@@ -39,7 +39,7 @@ mystringsobjects = strmov.lo strxmov.lo strnmov.lo strmake.lo strend.lo \
int2str.lo str2int.lo strinstr.lo strcont.lo \
strcend.lo \
bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \
- strtoull.lo strtoll.lo llstr.lo strto.lo \
+ strtoull.lo strtoll.lo llstr.lo \
ctype.lo $(LTCHARSET_OBJS)
mystringsextra= strto.c ctype_autoconf.c
dbugobjects = dbug.lo # IT IS IN SAFEMALLOC.C sanity.lo
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 9f71273b119..979ef6a4945 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -125,7 +125,7 @@ static int connect2(my_socket s, const struct sockaddr *name, uint namelen,
return connect(s, (struct sockaddr*) name, namelen);
#else
int flags, res, s_err;
- size_socket s_err_size = sizeof(uint);
+ SOCKOPT_OPTLEN_TYPE s_err_size = sizeof(uint);
fd_set sfds;
struct timeval tv;
time_t start_time, now_time;
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mysql-test/r/delete.result
diff --git a/mysql-test/r/replace.result b/mysql-test/r/replace.result
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mysql-test/r/replace.result
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
new file mode 100644
index 00000000000..85802354b2c
--- /dev/null
+++ b/mysql-test/t/delete.test
@@ -0,0 +1,8 @@
+drop table if exists t1;
+
+# test delete using hidden_primary_key
+create table t1 (a int) type=bdb;
+insert into t1 values (1), (2);
+delete from t1 where a = 1;
+
+drop table t1;
diff --git a/mysql-test/t/replace.test b/mysql-test/t/replace.test
new file mode 100644
index 00000000000..4000ee1b4e2
--- /dev/null
+++ b/mysql-test/t/replace.test
@@ -0,0 +1,21 @@
+#
+# Test of REPLACE with ISAM and MyISAM and BDB
+#
+
+drop table if exists t1;
+
+CREATE TABLE t1 (
+ gesuchnr int(11) DEFAULT '0' NOT NULL,
+ benutzer_id int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (gesuchnr,benutzer_id)
+) type=ISAM;
+
+replace into t1 (gesuchnr,benutzer_id) values (1,1);
+replace into t1 (gesuchnr,benutzer_id) values (1,1);
+alter table t1 type=myisam;
+replace into t1 (gesuchnr,benutzer_id) values (1,1);
+alter table t1 type=bdb;
+replace into t1 (gesuchnr,benutzer_id) values (1,1);
+alter table t1 type=heap;
+replace into t1 (gesuchnr,benutzer_id) values (1,1);
+drop table t1;
diff --git a/sql/mini_client.cc b/sql/mini_client.cc
index 11b0b111ec4..12c8a740398 100644
--- a/sql/mini_client.cc
+++ b/sql/mini_client.cc
@@ -233,7 +233,7 @@ static int mc_sock_connect(my_socket s, const struct sockaddr *name,
return connect(s, (struct sockaddr*) name, namelen);
#else
int flags, res, s_err;
- size_socket s_err_size = sizeof(uint);
+ SOCKOPT_OPTLEN_TYPE s_err_size = sizeof(uint);
fd_set sfds;
struct timeval tv;