summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <monty@tik.mysql.com>2000-12-15 10:58:17 +0200
committerunknown <monty@tik.mysql.com>2000-12-15 10:58:17 +0200
commite1e7ba756a609f9e78d4cbf8291b7f1859df4425 (patch)
treeaf18dadc582d3cff29172087140d13e2a78fecac /libmysql
parent6d8a5e9088526f2fb86bf7aaefc7426ee1291afc (diff)
downloadmariadb-git-e1e7ba756a609f9e78d4cbf8291b7f1859df4425.tar.gz
Fixed that LPAD() and RPAD() cuts arguments
New test for string functions Docs/manual.texi: Updated changes for 3.23.29 client/mysqldump.c: Cleanup libmysql/libmysql.c: Fixed possible overflow sql/handler.cc: Fixed typo sql/item_strfunc.cc: Fixed that LPAD() and RPAD() cuts arguments sql/mysqld.cc: Better error message on core dump BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 8f750affd5f..9f71273b119 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -531,8 +531,8 @@ static void read_user_name(char *name)
static void read_user_name(char *name)
{
- char *str=getenv("USER");
- strmov(name,str ? str : "ODBC"); /* ODBC will send user variable */
+ char *str=getenv("USER"); /* ODBC will send user variable */
+ strmake(name,str ? str : "ODBC", USERNAME_LENGTH);
}
#endif
@@ -1149,8 +1149,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
const char *passwd, const char *db,
uint port, const char *unix_socket,uint client_flag)
{
- char buff[NAME_LEN+100],charset_name_buff[16],*end,*host_info,
- *charset_name;
+ char buff[NAME_LEN+USERNAME_LENGTH+100],charset_name_buff[16];
+ char *end,*host_info,*charset_name;
my_socket sock;
uint32 ip_addr;
struct sockaddr_in sock_addr;