summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <kostja@vajra.(none)>2007-05-14 10:56:23 +0400
committerunknown <kostja@vajra.(none)>2007-05-14 10:56:23 +0400
commitd98a2a87c9610b40cf1c7a6cbf1e7f90e971739b (patch)
treeb7052b32c2ea9697f8cdf1238d300450936b5c1d /sql
parentc9af98c4a4171900f7d6b56710f406e5aa09029d (diff)
downloadmariadb-git-d98a2a87c9610b40cf1c7a6cbf1e7f90e971739b.tar.gz
Fix a warning.
sql/sql_insert.cc: Fix a compile-time warning (log_on is not used in embedded).
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_insert.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index febc7883f62..26caf059e73 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -483,11 +483,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
bool ignore)
{
int error, res;
- /*
- log_on is about delayed inserts only.
- By default, both logs are enabled (this won't cause problems if the server
- runs without --log-update or --log-bin).
- */
bool transactional_table, joins_freed= FALSE;
bool changed;
uint value_count;
@@ -501,9 +496,14 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
Name_resolution_context_state ctx_state;
#ifndef EMBEDDED_LIBRARY
char *query= thd->query;
-#endif
+ /*
+ log_on is about delayed inserts only.
+ By default, both logs are enabled (this won't cause problems if the server
+ runs without --log-update or --log-bin).
+ */
bool log_on= (thd->options & OPTION_BIN_LOG) ||
(!(thd->security_ctx->master_access & SUPER_ACL));
+#endif
thr_lock_type lock_type = table_list->lock_type;
Item *unused_conds= 0;
DBUG_ENTER("mysql_insert");