summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-09-26 15:40:26 +0500
committerunknown <hf@deer.(none)>2003-09-26 15:40:26 +0500
commitdbb9596727c043805790c9cc24cc8726569d723e (patch)
treeb80c6147c3a9929ec4e00bac55883c6d575ac2a4 /sql/sql_insert.cc
parent23dfae40f6b0c0a0d873a248b6a3428b3b6d7cae (diff)
parent1705369809aaa17407ce0bd25fdd15607cdf32b0 (diff)
downloadmariadb-git-dbb9596727c043805790c9cc24cc8726569d723e.tar.gz
Merge
include/mysql.h: Auto merged sql/item_strfunc.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_derived.cc: Auto merged sql/sql_insert.cc: Auto merged sql-common/client.c: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_show.cc: Auto merged libmysqld/lib_sql.cc: SCCS merged libmysqld/libmysqld.c: SCCS merged sql/sql_parse.cc: SCCS merged
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 2e229d2b04d..af28d48ed8a 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -60,9 +60,11 @@ check_insert_fields(THD *thd,TABLE *table,List<Item> &fields,
MYF(0),counter);
return -1;
}
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (grant_option &&
check_grant_all_columns(thd,INSERT_ACL,table))
return -1;
+#endif
table->time_stamp=0; // This is saved by caller
}
else
@@ -96,7 +98,9 @@ check_insert_fields(THD *thd,TABLE *table,List<Item> &fields,
table->time_stamp= table->timestamp_field->offset()+1;
}
// For the values we need select_priv
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
table->grant.want_privilege=(SELECT_ACL & ~table->grant.privilege);
+#endif
return 0;
}
@@ -130,14 +134,15 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
thd->lex.select_lex.table_list.first;
DBUG_ENTER("mysql_insert");
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (thd->master_access & SUPER_ACL)
+#endif
{
if (!(thd->options & OPTION_UPDATE_LOG))
log_on&= ~(int) DELAYED_LOG_UPDATE;
if (!(thd->options & OPTION_BIN_LOG))
log_on&= ~(int) DELAYED_LOG_BIN;
}
-
/*
in safe mode or with skip-new change delayed insert to be regular
if we are told to replace duplicates, the insert cannot be concurrent
@@ -626,7 +631,7 @@ public:
group_count(0)
{
thd.user=thd.priv_user=(char*) delayed_user;
- thd.host=(char*) localhost;
+ thd.host=(char*) my_localhost;
thd.current_tablenr=0;
thd.version=refresh_version;
thd.command=COM_DELAYED_INSERT;