diff options
author | monty@mysql.com/nosik.monty.fi <> | 2007-07-30 11:33:50 +0300 |
---|---|---|
committer | monty@mysql.com/nosik.monty.fi <> | 2007-07-30 11:33:50 +0300 |
commit | b16289a5e05397211fd47e05ce08fe12f93ec38a (patch) | |
tree | b1f9aa6b9e6bcbc36eded4aeb066d360e7541e72 /mysys/mf_iocache2.c | |
parent | a33c863ffd1e0de7bf72a590a90ee5c50180a677 (diff) | |
download | mariadb-git-b16289a5e05397211fd47e05ce08fe12f93ec38a.tar.gz |
Slow query log to file now displays queries with microsecond precission
--long-query-time is now given in seconds with microseconds as decimals
--min_examined_row_limit added for slow query log
long_query_time user variable is now double with 6 decimals
Added functions to get time in microseconds
Added faster time() functions for system that has gethrtime() (Solaris)
We now do less time() calls.
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
set_var.cc and my_getopt() can now handle DOUBLE variables.
All time() calls changed to my_time()
my_time() now does retry's if time() call fails.
Added debug function for stopping in mysql_admin_table() when tables are locked
Some trivial function and struct variable renames to avoid merge errors.
Fixed compiler warnings
Initialization of some time variables on windows moved to my_init()
Diffstat (limited to 'mysys/mf_iocache2.c')
-rw-r--r-- | mysys/mf_iocache2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c index 8a5b91661c4..87ea995f518 100644 --- a/mysys/mf_iocache2.c +++ b/mysys/mf_iocache2.c @@ -246,7 +246,7 @@ size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length) for (;;) { - char *pos,*end; + uchar *pos, *end; if (length > max_length) length=max_length; for (pos=info->read_pos,end=pos+length ; pos < end ;) @@ -323,7 +323,7 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) length= (size_t) (fmt - start); out_length+=length; - if (my_b_write(info, start, length)) + if (my_b_write(info, (const uchar*) start, length)) goto err; if (*fmt == '\0') /* End of format */ @@ -378,14 +378,14 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) size_t length2 = strlen(par); /* TODO: implement minimum width and precision */ out_length+= length2; - if (my_b_write(info, par, length2)) + if (my_b_write(info, (uchar*) par, length2)) goto err; } else if (*fmt == 'b') /* Sized buffer parameter, only precision makes sense */ { char *par = va_arg(args, char *); out_length+= precision; - if (my_b_write(info, par, precision)) + if (my_b_write(info, (uchar*) par, precision)) goto err; } else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ @@ -400,7 +400,7 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) else length2= (size_t) (int10_to_str((long) (uint) iarg,buff,10)- buff); out_length+= length2; - if (my_b_write(info, buff, length2)) + if (my_b_write(info, (uchar*) buff, length2)) goto err; } else if ((*fmt == 'l' && fmt[1] == 'd') || fmt[1] == 'u') @@ -416,13 +416,13 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) else length2= (size_t) (int10_to_str(iarg,buff,10)- buff); out_length+= length2; - if (my_b_write(info, buff, length2)) + if (my_b_write(info, (uchar*) buff, length2)) goto err; } else { /* %% or unknown code */ - if (my_b_write(info, backtrack, fmt-backtrack)) + if (my_b_write(info, (uchar*) backtrack, (size_t) (fmt-backtrack))) goto err; out_length+= fmt-backtrack; } |