summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-18 22:17:29 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-18 22:17:29 +0200
commit84ce6832e64305a769fb424d272311468b5d1d0d (patch)
treed2a25ca91f63d312f0b2d09ccba012ecd102a7ba /tests
parent07315d36030bd1cbe6acfeb3e8f60c49ba876a10 (diff)
downloadmariadb-git-84ce6832e64305a769fb424d272311468b5d1d0d.tar.gz
MDEV-4332 Increase username length from 16 characters
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index f3f25a4ec90..d726563f86a 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -16903,13 +16903,14 @@ static void test_bug31418()
*/
#define LARGE_BUFFER_SIZE 2048
+#define OLD_USERNAME_CHAR_LENGTH 16
static void test_bug31669()
{
int rc;
static char buff[LARGE_BUFFER_SIZE+1];
#ifndef EMBEDDED_LIBRARY
- static char user[USERNAME_CHAR_LENGTH+1];
+ static char user[OLD_USERNAME_CHAR_LENGTH+1];
static char db[NAME_CHAR_LEN+1];
static char query[LARGE_BUFFER_SIZE*2];
#endif
@@ -16946,7 +16947,7 @@ static void test_bug31669()
myquery(rc);
memset(user, 'b', sizeof(user));
- user[USERNAME_CHAR_LENGTH]= 0;
+ user[OLD_USERNAME_CHAR_LENGTH]= 0;
memset(buff, 'c', sizeof(buff));
buff[LARGE_BUFFER_SIZE]= 0;
strxmov(query, "GRANT ALL PRIVILEGES ON *.* TO '", user, "'@'%' IDENTIFIED BY "
@@ -16965,11 +16966,11 @@ static void test_bug31669()
rc= mysql_change_user(conn, user, buff, db);
DIE_UNLESS(!rc);
- user[USERNAME_CHAR_LENGTH-1]= 'a';
+ user[OLD_USERNAME_CHAR_LENGTH-1]= 'a';
rc= mysql_change_user(conn, user, buff, db);
DIE_UNLESS(rc);
- user[USERNAME_CHAR_LENGTH-1]= 'b';
+ user[OLD_USERNAME_CHAR_LENGTH-1]= 'b';
buff[LARGE_BUFFER_SIZE-1]= 'd';
rc= mysql_change_user(conn, user, buff, db);
DIE_UNLESS(rc);