summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2006-02-18 08:46:18 +0100
committerunknown <kent@mysql.com>2006-02-18 08:46:18 +0100
commit4bc61ff95c3957078f021a53431b56447e0806d1 (patch)
treeb06b4763bf4827715a3ec1d74c10007a7a8883bf /dbug
parent3470647a6d832ccf06ded76780bb9eadfccfde5b (diff)
downloadmariadb-git-4bc61ff95c3957078f021a53431b56447e0806d1.tar.gz
mysqlimport.c:
Handle case where there is no snprintf() libmysql.vcproj, mysqlclient.vcproj: Added __WIN__ symbol, needed when compiling dbug.c dbug.vcproj: Changed __WIN32__ to __WIN__ dbug.c: Added Windows specific code to handle TIMESTAMP_ON log line format make_win_src_distribution.sh: Copy plugin directory recursively dbug.vcproj: Define __WIN__ for all targets scripts/make_win_src_distribution.sh: Copy plugin directory recursively dbug/dbug.c: Added Windows specific code to handle TIMESTAMP_ON log line format VC++Files/client/mysqlclient.vcproj: Added __WIN__ symbol, needed when compiling dbug.c VC++Files/dbug/dbug.vcproj: Changed __WIN32__ to __WIN__ VC++Files/libmysql/libmysql.vcproj: Added __WIN__ symbol, needed when compiling dbug.c client/mysqlimport.c: Handle case where there is no snprintf()
Diffstat (limited to 'dbug')
-rw-r--r--dbug/dbug.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index c212d55d815..f53cb525912 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -1655,6 +1655,17 @@ static void DoPrefix(CODE_STATE *cs, uint _line_)
(void) fprintf(cs->stack->out_file, "%5d: ", cs->lineno);
if (cs->stack->flags & TIMESTAMP_ON)
{
+#ifdef __WIN__
+ /* FIXME This doesn't give microseconds as in Unix case, and the resolution is
+ in system ticks, 10 ms intervals. See my_getsystime.c for high res */
+ SYSTEMTIME loc_t;
+ GetLocalTime(&loc_t);
+ (void) fprintf (cs->stack->out_file,
+ /* "%04d-%02d-%02d " */
+ "%02d:%02d:%02d.%06d ",
+ /*tm_p->tm_year + 1900, tm_p->tm_mon + 1, tm_p->tm_mday,*/
+ loc_t.wHour, loc_t.wMinute, loc_t.wSecond, loc_t.wMilliseconds);
+#else
struct timeval tv;
struct tm *tm_p;
if (gettimeofday(&tv, NULL) != -1)
@@ -1669,6 +1680,7 @@ static void DoPrefix(CODE_STATE *cs, uint _line_)
(int) (tv.tv_usec));
}
}
+#endif
}
if (cs->stack->flags & PROCESS_ON)
(void) fprintf(cs->stack->out_file, "%s: ", cs->process);