summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-12 01:01:18 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-12 01:01:18 +0200
commitce926c90accc6ca36c62f0b954e651d89db66da8 (patch)
tree737c9571a90e6e1f07be30d8bdc64c2f06d6fbf3 /tests
parent5ae72bb73cceafe5062be3827dbe3b4f488a7a73 (diff)
parentea4a417a8d456e8e09b6b4306f22c7c20b3e594c (diff)
downloadmariadb-git-ce926c90accc6ca36c62f0b954e651d89db66da8.tar.gz
5.3 merge
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 f348ec4515b..f3f25a4ec90 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -6204,7 +6204,7 @@ static void test_date_dt()
static void test_pure_coverage()
{
MYSQL_STMT *stmt;
- MYSQL_BIND my_bind[1];
+ MYSQL_BIND my_bind[2];
int rc;
ulong length;
@@ -8880,7 +8880,7 @@ static void test_parse_error_and_bad_length()
DIE_UNLESS(rc);
if (!opt_silent)
fprintf(stdout, "Got error (as expected): '%s'\n", mysql_error(mysql));
- rc= mysql_real_query(mysql, "SHOW DATABASES", 100);
+ rc= mysql_real_query(mysql, STRING_WITH_LEN("SHOW DATABASES\0AAAAAAAA"));
DIE_UNLESS(rc);
if (!opt_silent)
fprintf(stdout, "Got error (as expected): '%s'\n", mysql_error(mysql));
@@ -8891,7 +8891,7 @@ static void test_parse_error_and_bad_length()
fprintf(stdout, "Got error (as expected): '%s'\n", mysql_error(mysql));
stmt= mysql_stmt_init(mysql);
DIE_UNLESS(stmt);
- rc= mysql_stmt_prepare(stmt, "SHOW DATABASES", 100);
+ rc= mysql_stmt_prepare(stmt, STRING_WITH_LEN("SHOW DATABASES\0AAAAAAA"));
DIE_UNLESS(rc != 0);
if (!opt_silent)
fprintf(stdout, "Got error (as expected): '%s'\n", mysql_stmt_error(stmt));
@@ -16926,7 +16926,8 @@ static void test_bug31669()
rc= mysql_change_user(conn, "", "", "");
DIE_UNLESS(rc);
- memset(buff, 'a', sizeof(buff));
+ memset(buff, 'a', sizeof(buff) - 1);
+ buff[sizeof(buff) - 1]= 0;
mysql_close(conn);
conn= client_connect(0, MYSQL_PROTOCOL_TCP, 0);