summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc
index dc7b5789efb..527d1605a2d 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -23,6 +23,8 @@
#endif
#include "mysql_priv.h"
+#include <mysql.h>
+
#include "sql_acl.h"
#include "sql_repl.h"
@@ -31,6 +33,7 @@
#include <m_ctype.h> // For test_if_number
#include <assert.h>
+
MYSQL_LOG mysql_log,mysql_update_log,mysql_slow_log,mysql_bin_log;
extern I_List<i_string> binlog_do_db, binlog_ignore_db;
@@ -610,6 +613,8 @@ err:
LOG_INFO_IO Got IO error while reading file
*/
+#ifndef EMBEDDED_LIBRARY
+
int MYSQL_LOG::purge_first_log(struct st_relay_log_info* rli)
{
int error;
@@ -739,6 +744,8 @@ err:
DBUG_RETURN(error);
}
+#endif /* EMBEDDED_LIBRARY */
+
/*
Create a new log file name
@@ -1048,6 +1055,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
#else
IO_CACHE *file = &log_file;
#endif
+#ifndef EMBEDDED_LIBRARY
if ((thd && !(thd->options & OPTION_BIN_LOG) &&
(thd->master_access & SUPER_ACL)) ||
(local_db && !db_ok(local_db, binlog_do_db, binlog_ignore_db)))
@@ -1056,6 +1064,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
DBUG_PRINT("error",("!db_ok"));
DBUG_RETURN(0);
}
+#endif /* EMBEDDED_LIBRARY */
error=1;
/*
@@ -1419,6 +1428,7 @@ void MYSQL_LOG::close(bool exiting)
DBUG_PRINT("enter",("exiting: %d", (int) exiting));
if (is_open())
{
+#ifndef EMBEDDED_LIBRARY
if (log_type == LOG_BIN && !no_auto_events && exiting)
{
Stop_log_event s;
@@ -1426,6 +1436,7 @@ void MYSQL_LOG::close(bool exiting)
s.write(&log_file);
signal_update();
}
+#endif /* EMBEDDED_LIBRARY */
end_io_cache(&log_file);
if (my_close(log_file.file,MYF(0)) < 0 && ! write_error)
{
@@ -1549,3 +1560,6 @@ void sql_perror(const char *message)
perror(message);
#endif
}
+
+
+