summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-15 15:09:22 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-15 15:09:22 +0200
commita9035be5b7a7b3865ddb4ef34a5d0cfc65dfc254 (patch)
treea9df7341e91623f62fe37cd47fce139d8888fc95 /tests
parent3a1c91d87d69ef243b3e78be6089102cafef0a8e (diff)
parentf57ecb7786177e0af3b1e3ec94302720b2e0f967 (diff)
downloadmariadb-git-a9035be5b7a7b3865ddb4ef34a5d0cfc65dfc254.tar.gz
10.0-base merge
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 93ed18ed565..d926334bb7f 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2002, 2012, Oracle and/or its affiliates.
- Copyright (c) 2008, 2012, Monty Program Ab
+ Copyright (c) 2008, 2013, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -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));
@@ -9862,11 +9862,11 @@ static void test_bug3035()
const uint32 uint32_max= 4294967295U;
/* it might not work okay everyplace */
- const longlong int64_max= LL(9223372036854775807);
+ const longlong int64_max= 9223372036854775807LL;
const longlong int64_min= -int64_max - 1;
const ulonglong uint64_min= 0U;
- const ulonglong uint64_max= ULL(18446744073709551615);
+ const ulonglong uint64_max= 18446744073709551615ULL;
const char *stmt_text;
@@ -12533,7 +12533,7 @@ static void test_truncation()
/* double -> longlong, negative fp number to signed integer: no loss */
DIE_UNLESS(my_bind++ < bind_array + bind_count);
- DIE_UNLESS(! *my_bind->error && * (longlong*) my_bind->buffer == LL(-12345678910));
+ DIE_UNLESS(! *my_bind->error && * (longlong*) my_bind->buffer == -12345678910LL);
/* big numeric string -> number */
DIE_UNLESS(my_bind++ < bind_array + bind_count);
@@ -14535,7 +14535,7 @@ static void test_bug12925()
{
myheader("test_bug12925");
if (opt_getopt_ll_test)
- DIE_UNLESS(opt_getopt_ll_test == LL(25600*1024*1024));
+ DIE_UNLESS(opt_getopt_ll_test == 25600LL*1024*1024);
}
@@ -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);