diff options
author | unknown <serg@serg.mylan> | 2004-08-19 03:02:09 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-08-19 03:02:09 +0200 |
commit | ae2bf6275e971f45cdfda8dada9a9bfd6f75e746 (patch) | |
tree | bb710739af8b8fd4ec8ff388deaf56c37a27d24a /sql/protocol.cc | |
parent | 945625ebaa21468fdf0b2a3c1786fca50bdd5aa2 (diff) | |
download | mariadb-git-ae2bf6275e971f45cdfda8dada9a9bfd6f75e746.tar.gz |
after merge fixes
strings/my_vsnprintf.c:
%.#s support in my_vsnprintf
BitKeeper/etc/ignore:
Added EXCEPTIONS-CLIENT to the ignore list
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 2812a92497f..7c4b09ac3e3 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -200,13 +200,13 @@ net_printf(THD *thd, uint errcode, ...) 2+SQLSTATE_LENGTH+1 : 2) : 0); #ifndef EMBEDDED_LIBRARY text_pos=(char*) net->buff + head_length + offset + 1; + length=(char*)net->buff_end-text_pos; +#else + length=sizeof(text_pos)-1; #endif - (void) my_vsnprintf(my_const_cast(char*) (text_pos), - (char*)net->buff_end-text_pos, + length=my_vsnprintf(my_const_cast(char*) (text_pos), + min(length, sizeof(net->last_error)), format,args); - length=(uint) strlen((char*) text_pos); - if (length >= sizeof(net->last_error)) - length=sizeof(net->last_error)-1; /* purecov: inspected */ va_end(args); #ifndef EMBEDDED_LIBRARY |