diff --git a/Docs/manual.texi b/Docs/manual.texi index 723239fe32a..364b774f9be 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -2376,6 +2376,9 @@ Apart from the following links, you can find and download a lot of @subheading Tutorials and Manuals @table @asis +@item @uref{http://netgraft.com/~mbac/research/mysqlmyths.html, MySQL Myths Debunked} +@strong{MySQL} used in the real world. + @item @uref{http://www.4t2.com/mysql} Information about the German MySQL mailing list. diff --git a/client/mysql.cc b/client/mysql.cc index ce4a351bdbe..c0c24c4fbe6 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -39,7 +39,7 @@ #include "my_readline.h" #include -const char *VER="11.14"; +const char *VER="11.15"; /* Don't try to make a nice table if the data is too big */ #define MAX_COLUMN_LENGTH 1024 @@ -269,6 +269,11 @@ int main(int argc,char *argv[]) strmov(outfile, "\0"); // no (default) outfile, unless given at least once strmov(pager, "stdout"); // the default, if --pager wasn't given + { + char *tmp=getenv("PAGER"); + if (tmp) + strmov(default_pager,tmp); + } if (!isatty(0) || !isatty(1)) { status.batch=1; opt_silent=1; diff --git a/sql/field.cc b/sql/field.cc index 29485797408..8d998683bd7 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1791,7 +1791,8 @@ String *Field_float::val_str(String *val_buffer, #endif memcpy_fixed((byte*) &nr,ptr,sizeof(nr)); - val_buffer->alloc(max(field_length,70)); + uint to_length=max(field_length,70); + val_buffer->alloc(to_length); char *to=(char*) val_buffer->ptr(); if (dec >= NOT_FIXED_DEC) @@ -1841,8 +1842,9 @@ String *Field_float::val_str(String *val_buffer, while (tmp_dec--) *to++= *pos++; #else -#ifdef HAVE_SNPRINTF_ - sprintf(to,val_buffer->length(),"%.*f",dec,nr); +#ifdef HAVE_SNPRINTF + to[to_length-1]=0; // Safety + snprintf(to,to_length-1,"%.*f",dec,nr); #else sprintf(to,"%.*f",dec,nr); #endif