post-merge fixup

parent aa678312
...@@ -461,3 +461,4 @@ vio/viotest-ssl ...@@ -461,3 +461,4 @@ vio/viotest-ssl
Docs/mysql.xml Docs/mysql.xml
mysql-test/r/rpl000001.eval mysql-test/r/rpl000001.eval
Docs/safe-mysql.xml Docs/safe-mysql.xml
mysys/test_vsnprintf
...@@ -161,6 +161,10 @@ MASTER_RUNNING=0 ...@@ -161,6 +161,10 @@ MASTER_RUNNING=0
MASTER_MYPORT=9306 MASTER_MYPORT=9306
SLAVE_RUNNING=0 SLAVE_RUNNING=0
SLAVE_MYPORT=9307 SLAVE_MYPORT=9307
MYSQL_MANAGER_PORT=9305 # needs to be out of the way of slaves
MYSQL_MANAGER_PW_FILE=$MYSQL_TEST_DIR/var/tmp/manager.pwd
MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
MYSQL_MANAGER_USER=root
NO_SLAVE=0 NO_SLAVE=0
USER_TEST= USER_TEST=
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <m_string.h> #include <m_string.h>
#include <stdarg.h> #include <stdarg.h>
#include <m_ctype.h> #include <m_ctype.h>
#include <assert.h>
int my_snprintf(char* to, size_t n, const char* fmt, ...) int my_snprintf(char* to, size_t n, const char* fmt, ...)
{ {
...@@ -53,7 +54,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) ...@@ -53,7 +54,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
plen = (uint) strlen(par); plen = (uint) strlen(par);
if (left_len <= plen) if (left_len <= plen)
plen = left_len - 1; plen = left_len - 1;
to=strmov(to,par); to=strnmov(to,par,plen);
continue; continue;
} }
else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */
...@@ -73,6 +74,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) ...@@ -73,6 +74,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
break; break;
*to++='%'; /* % used as % or unknown code */ *to++='%'; /* % used as % or unknown code */
} }
DBUG_ASSERT(to <= end);
*to='\0'; /* End of errmessage */ *to='\0'; /* End of errmessage */
return (uint) (to - start); return (uint) (to - start);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment