summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/Makefile.am2
-rw-r--r--sql/ha_gemini.cc5
-rw-r--r--sql/ha_gemini.h2
-rw-r--r--sql/sql_delete.cc7
-rw-r--r--sql/sql_update.cc3
5 files changed, 11 insertions, 8 deletions
diff --git a/sql/Makefile.am b/sql/Makefile.am
index 774ef06f17c..28484f09b3d 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -85,7 +85,7 @@ gen_lex_hash_SOURCES = gen_lex_hash.cc
gen_lex_hash_LDADD = $(LDADD) $(CXXLDFLAGS)
mysqlbinlog_SOURCES = mysqlbinlog.cc mini_client.cc net_serv.cc \
mini_client_errors.c violite.c password.c
-mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS) $(mysqld_LDADD)
+mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS) # $(mysqld_LDADD)
DEFS = -DMYSQL_SERVER \
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
diff --git a/sql/ha_gemini.cc b/sql/ha_gemini.cc
index c95a348f238..e80d9a001e6 100644
--- a/sql/ha_gemini.cc
+++ b/sql/ha_gemini.cc
@@ -1,5 +1,5 @@
-/* Copyright (C) 2000 NuSphere Corporation
-
+/* Copyright (C) 2000 MySQL AB & NuSphere Corporation
+
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
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+/* This file is based on ha_berkeley.cc */
#ifdef __GNUC__
#pragma implementation // gcc: Class implementation
diff --git a/sql/ha_gemini.h b/sql/ha_gemini.h
index 495dc2fd1c9..3bfe85bfba2 100644
--- a/sql/ha_gemini.h
+++ b/sql/ha_gemini.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 NuSphere Corporation
+/* Copyright (C) 2000 MySQL AB & NuSphere Corporation
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
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 587b205886e..8b4b1b527ca 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -170,12 +170,13 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit,
select=make_select(table,0,0,conds,&error);
if (error)
DBUG_RETURN(-1);
- if (select && select->check_quick(test(thd->options & SQL_SAFE_UPDATES),
- limit))
+ if ((select && select->check_quick(test(thd->options & SQL_SAFE_UPDATES),
+ limit)) ||
+ !limit)
{
delete select;
send_ok(&thd->net,0L);
- DBUG_RETURN(0);
+ DBUG_RETURN(0); // Nothing to delete
}
/* If running in safe sql mode, don't allow updates without keys */
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 87a2f5c7b2b..c41586c58c8 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -110,7 +110,8 @@ int mysql_update(THD *thd,TABLE_LIST *table_list,List<Item> &fields,
select=make_select(table,0,0,conds,&error);
if (error ||
(select && select->check_quick(test(thd->options & SQL_SAFE_UPDATES),
- limit)))
+ limit)) ||
+ !limit)
{
delete select;
table->time_stamp=save_time_stamp; // Restore timestamp pointer