summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2002-03-01 21:14:13 -0700
committerunknown <sasha@mysql.sashanet.com>2002-03-01 21:14:13 -0700
commit3eb9c0be7df702a8af47daa2d01929704d8a41c9 (patch)
tree0e77b2158bac94d79228bc9817a0fc23422a0eea
parent2c9879ca0cfd319e939835816cd4501b1d097b0a (diff)
downloadmariadb-git-3eb9c0be7df702a8af47daa2d01929704d8a41c9.tar.gz
post-merge fixup
BitKeeper/etc/ignore: Added mysys/test_vsnprintf to the ignore list mysql-test/mysql-test-run.sh: post-merge fix mysys/my_vsnprintf.c: fixed newly introduced bug
-rw-r--r--.bzrignore1
-rw-r--r--mysql-test/mysql-test-run.sh4
-rw-r--r--mysys/my_vsnprintf.c4
3 files changed, 8 insertions, 1 deletions
diff --git a/.bzrignore b/.bzrignore
index 319612b83c8..aabb7bddd3a 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -461,3 +461,4 @@ vio/viotest-ssl
Docs/mysql.xml
mysql-test/r/rpl000001.eval
Docs/safe-mysql.xml
+mysys/test_vsnprintf
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 34b0caf55ca..68e383e9ce6 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -161,6 +161,10 @@ MASTER_RUNNING=0
MASTER_MYPORT=9306
SLAVE_RUNNING=0
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
USER_TEST=
diff --git a/mysys/my_vsnprintf.c b/mysys/my_vsnprintf.c
index ccd4fbb74fc..7b6d9672eb6 100644
--- a/mysys/my_vsnprintf.c
+++ b/mysys/my_vsnprintf.c
@@ -19,6 +19,7 @@
#include <m_string.h>
#include <stdarg.h>
#include <m_ctype.h>
+#include <assert.h>
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)
plen = (uint) strlen(par);
if (left_len <= plen)
plen = left_len - 1;
- to=strmov(to,par);
+ to=strnmov(to,par,plen);
continue;
}
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)
break;
*to++='%'; /* % used as % or unknown code */
}
+ DBUG_ASSERT(to <= end);
*to='\0'; /* End of errmessage */
return (uint) (to - start);
}