summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2001-02-15 03:43:14 +0200
committerunknown <monty@donna.mysql.com>2001-02-15 03:43:14 +0200
commitc1488c7e5896920e5f66e28de38964ae9b5ff22e (patch)
tree48461790e73014dbea005fbd6ef8d48e83cc6f14 /sql/log_event.cc
parent8ece82e4dcef6b7dd097350890e27b593ec079b1 (diff)
downloadmariadb-git-c1488c7e5896920e5f66e28de38964ae9b5ff22e.tar.gz
Changed --replace to --replace_result in mysqltest
Changed errmsg -> my_errmsg (portability issue) Fixed that mysqlbinlog writes SET TIMESTAMP before all queries Fixed comments in default my.cnf files Docs/manual.texi: Updated information about character sets client/mysqladmin.c: Added missing help text client/mysqltest.c: Changed --replace to --replace_result to not conflict with SQL replace command include/my_sys.h: change errmsg -> my_errmsg (portability issue) libmysql/errmsg.c: change errmsg -> my_errmsg (portability issue) myisam/mi_cache.c: Changed seek+read to pread myisam/mi_check.c: Fix bug that caused myisamchk to be very slow under some specific error conditions myisam/mi_dynrec.c: cleanup myisam/myisamchk.c: Write out value of checksum myisam/myisamdef.h: cleanup mysql-test/r/backup.result: Fixed the case where backup caused different error messages mysql-test/r/bdb.result: Added new test case mysql-test/r/fulltext.result: Fix for new CREATE TABLE format mysql-test/t/backup.test: Use --replace_result and --send mysql-test/t/bdb.test: New test case mysql-test/t/status.test: Use --send mysys/errors.c: change errmsg -> my_errmsg (portability issue) mysys/my_error.c: change errmsg -> my_errmsg (portability issue) mysys/typelib.c: Only accept full type names sql/derror.cc: change errmsg -> my_errmsg (portability issue) sql/ha_berkeley.cc: Fixed bug when using key parts that could be NULL sql/log_event.cc: Log SET TIMESTAMP before all queries sql/mysqlbinlog.cc: Incremented version number sql/mysqld.cc: change errmsg -> my_errmsg (portability issue) Always accept --skip-gemeni, --skip-bdb and --skip-innobase sql/slave.cc: cleanup sql/sql_base.cc: cleanup sql/sql_db.cc: cleanup support-files/my-huge.cnf.sh: Remove usage of # at end of line support-files/my-large.cnf.sh: Remove usage of # at end of line support-files/my-medium.cnf.sh: Remove usage of # at end of line support-files/my-small.cnf.sh: Remove usage of # at end of line
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index dfe8d71f146..38f353d4ec7 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -442,6 +442,7 @@ Query_log_event::Query_log_event(const char* buf, int event_len):
void Query_log_event::print(FILE* file, bool short_form)
{
+ char buff[40],*end; // Enough for SET TIMESTAMP
if (!short_form)
{
print_header(file);
@@ -449,8 +450,12 @@ void Query_log_event::print(FILE* file, bool short_form)
(ulong) thread_id, (ulong) exec_time, error_code);
}
- if(db && db[0])
+ if (db && db[0])
fprintf(file, "use %s;\n", db);
+ end=int10_to_str((long) when, strmov(buff,"SET TIMESTAMP="),10);
+ *end++=';';
+ *end++='\n';
+ my_fwrite(file, (byte*) buff, (uint) (end-buff),MYF(MY_NABP | MY_WME));
my_fwrite(file, (byte*) query, q_len, MYF(MY_NABP | MY_WME));
fprintf(file, ";\n");
}