Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3ee57276
Commit
3ee57276
authored
Sep 01, 2004
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make client_test pass on 64-bit HP-UX11: long is 64 bit,
replace all (mis)uses of it with int32.
parent
b02451c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
33 deletions
+33
-33
tests/client_test.c
tests/client_test.c
+33
-33
No files found.
tests/client_test.c
View file @
3ee57276
...
@@ -1790,7 +1790,7 @@ static void test_ps_conj_select()
...
@@ -1790,7 +1790,7 @@ static void test_ps_conj_select()
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
int
rc
;
int
rc
;
MYSQL_BIND
bind
[
2
];
MYSQL_BIND
bind
[
2
];
long
int
int_data
;
int32
int_data
;
char
str_data
[
32
];
char
str_data
[
32
];
unsigned
long
str_length
;
unsigned
long
str_length
;
myheader
(
"test_ps_conj_select"
);
myheader
(
"test_ps_conj_select"
);
...
@@ -3227,7 +3227,7 @@ static void bind_fetch(int row_count)
...
@@ -3227,7 +3227,7 @@ static void bind_fetch(int row_count)
{
{
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
int
rc
,
i
,
count
=
row_count
;
int
rc
,
i
,
count
=
row_count
;
long
data
[
10
];
int32
data
[
10
];
int8
i8_data
;
int8
i8_data
;
int16
i16_data
;
int16
i16_data
;
int32
i32_data
;
int32
i32_data
;
...
@@ -4546,7 +4546,7 @@ static void test_multi_stmt()
...
@@ -4546,7 +4546,7 @@ static void test_multi_stmt()
MYSQL_STMT
*
stmt
,
*
stmt1
,
*
stmt2
;
MYSQL_STMT
*
stmt
,
*
stmt1
,
*
stmt2
;
int
rc
;
int
rc
;
u
long
id
;
u
int32
id
;
char
name
[
50
];
char
name
[
50
];
MYSQL_BIND
bind
[
2
];
MYSQL_BIND
bind
[
2
];
ulong
length
[
2
];
ulong
length
[
2
];
...
@@ -4605,7 +4605,7 @@ static void test_multi_stmt()
...
@@ -4605,7 +4605,7 @@ static void test_multi_stmt()
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
int_data: %lu(%lu)"
,
id
,
length
[
0
]);
fprintf
(
stdout
,
"
\n
int_data: %lu(%lu)"
,
(
ulong
)
id
,
length
[
0
]);
fprintf
(
stdout
,
"
\n
str_data: %s(%lu)"
,
name
,
length
[
1
]);
fprintf
(
stdout
,
"
\n
str_data: %s(%lu)"
,
name
,
length
[
1
]);
assert
(
id
==
10
);
assert
(
id
==
10
);
assert
(
strcmp
(
name
,
"mysql"
)
==
0
);
assert
(
strcmp
(
name
,
"mysql"
)
==
0
);
...
@@ -4634,7 +4634,7 @@ static void test_multi_stmt()
...
@@ -4634,7 +4634,7 @@ static void test_multi_stmt()
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
int_data: %lu(%lu)"
,
id
,
length
[
0
]);
fprintf
(
stdout
,
"
\n
int_data: %lu(%lu)"
,
(
ulong
)
id
,
length
[
0
]);
fprintf
(
stdout
,
"
\n
str_data: %s(%lu)"
,
name
,
length
[
1
]);
fprintf
(
stdout
,
"
\n
str_data: %s(%lu)"
,
name
,
length
[
1
]);
assert
(
id
==
10
);
assert
(
id
==
10
);
assert
(
strcmp
(
name
,
"updated"
)
==
0
);
assert
(
strcmp
(
name
,
"updated"
)
==
0
);
...
@@ -5042,7 +5042,7 @@ static void test_store_result()
...
@@ -5042,7 +5042,7 @@ static void test_store_result()
{
{
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
int
rc
;
int
rc
;
long
nData
;
int32
nData
;
char
szData
[
100
];
char
szData
[
100
];
MYSQL_BIND
bind
[
2
];
MYSQL_BIND
bind
[
2
];
ulong
length
,
length1
;
ulong
length
,
length1
;
...
@@ -5094,7 +5094,7 @@ static void test_store_result()
...
@@ -5094,7 +5094,7 @@ static void test_store_result()
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
row 1: %ld, %s(%lu)"
,
nData
,
szData
,
length1
);
fprintf
(
stdout
,
"
\n
row 1: %ld, %s(%lu)"
,
(
long
)
nData
,
szData
,
length1
);
assert
(
nData
==
10
);
assert
(
nData
==
10
);
assert
(
strcmp
(
szData
,
"venu"
)
==
0
);
assert
(
strcmp
(
szData
,
"venu"
)
==
0
);
assert
(
length1
==
4
);
assert
(
length1
==
4
);
...
@@ -5102,7 +5102,7 @@ static void test_store_result()
...
@@ -5102,7 +5102,7 @@ static void test_store_result()
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
row 2: %ld, %s(%lu)"
,
nData
,
szData
,
length1
);
fprintf
(
stdout
,
"
\n
row 2: %ld, %s(%lu)"
,
(
long
)
nData
,
szData
,
length1
);
assert
(
nData
==
20
);
assert
(
nData
==
20
);
assert
(
strcmp
(
szData
,
"mysql"
)
==
0
);
assert
(
strcmp
(
szData
,
"mysql"
)
==
0
);
assert
(
length1
==
5
);
assert
(
length1
==
5
);
...
@@ -5129,7 +5129,7 @@ static void test_store_result()
...
@@ -5129,7 +5129,7 @@ static void test_store_result()
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
row 1: %ld, %s(%lu)"
,
nData
,
szData
,
length1
);
fprintf
(
stdout
,
"
\n
row 1: %ld, %s(%lu)"
,
(
long
)
nData
,
szData
,
length1
);
assert
(
nData
==
10
);
assert
(
nData
==
10
);
assert
(
strcmp
(
szData
,
"venu"
)
==
0
);
assert
(
strcmp
(
szData
,
"venu"
)
==
0
);
assert
(
length1
==
4
);
assert
(
length1
==
4
);
...
@@ -5137,7 +5137,7 @@ static void test_store_result()
...
@@ -5137,7 +5137,7 @@ static void test_store_result()
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
row 2: %ld, %s(%lu)"
,
nData
,
szData
,
length1
);
fprintf
(
stdout
,
"
\n
row 2: %ld, %s(%lu)"
,
(
long
)
nData
,
szData
,
length1
);
assert
(
nData
==
20
);
assert
(
nData
==
20
);
assert
(
strcmp
(
szData
,
"mysql"
)
==
0
);
assert
(
strcmp
(
szData
,
"mysql"
)
==
0
);
assert
(
length1
==
5
);
assert
(
length1
==
5
);
...
@@ -5984,7 +5984,7 @@ static void test_ushort_bug()
...
@@ -5984,7 +5984,7 @@ static void test_ushort_bug()
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
MYSQL_BIND
bind
[
4
];
MYSQL_BIND
bind
[
4
];
ushort
short_value
;
ushort
short_value
;
u
long
long_value
;
u
int32
long_value
;
ulong
s_length
,
l_length
,
ll_length
,
t_length
;
ulong
s_length
,
l_length
,
ll_length
,
t_length
;
ulonglong
longlong_value
;
ulonglong
longlong_value
;
int
rc
;
int
rc
;
...
@@ -6038,7 +6038,7 @@ static void test_ushort_bug()
...
@@ -6038,7 +6038,7 @@ static void test_ushort_bug()
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
ushort : %d (%ld)"
,
short_value
,
s_length
);
fprintf
(
stdout
,
"
\n
ushort : %d (%ld)"
,
short_value
,
s_length
);
fprintf
(
stdout
,
"
\n
ulong : %l
d (%ld)"
,
long_value
,
l_length
);
fprintf
(
stdout
,
"
\n
ulong : %l
u (%ld)"
,
(
ulong
)
long_value
,
l_length
);
fprintf
(
stdout
,
"
\n
longlong : %lld (%ld)"
,
longlong_value
,
ll_length
);
fprintf
(
stdout
,
"
\n
longlong : %lld (%ld)"
,
longlong_value
,
ll_length
);
fprintf
(
stdout
,
"
\n
tinyint : %d (%ld)"
,
tiny_value
,
t_length
);
fprintf
(
stdout
,
"
\n
tinyint : %d (%ld)"
,
tiny_value
,
t_length
);
...
@@ -6068,7 +6068,7 @@ static void test_sshort_bug()
...
@@ -6068,7 +6068,7 @@ static void test_sshort_bug()
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
MYSQL_BIND
bind
[
4
];
MYSQL_BIND
bind
[
4
];
short
short_value
;
short
short_value
;
long
long_value
;
int32
long_value
;
ulong
s_length
,
l_length
,
ll_length
,
t_length
;
ulong
s_length
,
l_length
,
ll_length
,
t_length
;
ulonglong
longlong_value
;
ulonglong
longlong_value
;
int
rc
;
int
rc
;
...
@@ -6122,7 +6122,7 @@ static void test_sshort_bug()
...
@@ -6122,7 +6122,7 @@ static void test_sshort_bug()
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
sshort : %d (%ld)"
,
short_value
,
s_length
);
fprintf
(
stdout
,
"
\n
sshort : %d (%ld)"
,
short_value
,
s_length
);
fprintf
(
stdout
,
"
\n
slong : %ld (%ld)"
,
long_value
,
l_length
);
fprintf
(
stdout
,
"
\n
slong : %ld (%ld)"
,
(
long
)
long_value
,
l_length
);
fprintf
(
stdout
,
"
\n
longlong : %lld (%ld)"
,
longlong_value
,
ll_length
);
fprintf
(
stdout
,
"
\n
longlong : %lld (%ld)"
,
longlong_value
,
ll_length
);
fprintf
(
stdout
,
"
\n
tinyint : %d (%ld)"
,
tiny_value
,
t_length
);
fprintf
(
stdout
,
"
\n
tinyint : %d (%ld)"
,
tiny_value
,
t_length
);
...
@@ -6152,7 +6152,7 @@ static void test_stiny_bug()
...
@@ -6152,7 +6152,7 @@ static void test_stiny_bug()
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
MYSQL_BIND
bind
[
4
];
MYSQL_BIND
bind
[
4
];
short
short_value
;
short
short_value
;
long
long_value
;
int32
long_value
;
ulong
s_length
,
l_length
,
ll_length
,
t_length
;
ulong
s_length
,
l_length
,
ll_length
,
t_length
;
ulonglong
longlong_value
;
ulonglong
longlong_value
;
int
rc
;
int
rc
;
...
@@ -6206,7 +6206,7 @@ static void test_stiny_bug()
...
@@ -6206,7 +6206,7 @@ static void test_stiny_bug()
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
sshort : %d (%ld)"
,
short_value
,
s_length
);
fprintf
(
stdout
,
"
\n
sshort : %d (%ld)"
,
short_value
,
s_length
);
fprintf
(
stdout
,
"
\n
slong : %ld (%ld)"
,
long_value
,
l_length
);
fprintf
(
stdout
,
"
\n
slong : %ld (%ld)"
,
(
long
)
long_value
,
l_length
);
fprintf
(
stdout
,
"
\n
longlong : %lld (%ld)"
,
longlong_value
,
ll_length
);
fprintf
(
stdout
,
"
\n
longlong : %lld (%ld)"
,
longlong_value
,
ll_length
);
fprintf
(
stdout
,
"
\n
tinyint : %d (%ld)"
,
tiny_value
,
t_length
);
fprintf
(
stdout
,
"
\n
tinyint : %d (%ld)"
,
tiny_value
,
t_length
);
...
@@ -7251,7 +7251,7 @@ static void test_fetch_seek()
...
@@ -7251,7 +7251,7 @@ static void test_fetch_seek()
MYSQL_BIND
bind
[
3
];
MYSQL_BIND
bind
[
3
];
MYSQL_ROW_OFFSET
row
;
MYSQL_ROW_OFFSET
row
;
int
rc
;
int
rc
;
long
c1
;
int32
c1
;
char
c2
[
11
],
c3
[
20
];
char
c2
[
11
],
c3
[
20
];
myheader
(
"test_fetch_seek"
);
myheader
(
"test_fetch_seek"
);
...
@@ -7296,7 +7296,7 @@ static void test_fetch_seek()
...
@@ -7296,7 +7296,7 @@ static void test_fetch_seek()
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
row 0: %ld, %s, %s"
,
c1
,
c2
,
c3
);
fprintf
(
stdout
,
"
\n
row 0: %ld, %s, %s"
,
(
long
)
c1
,
c2
,
c3
);
row
=
mysql_stmt_row_tell
(
stmt
);
row
=
mysql_stmt_row_tell
(
stmt
);
...
@@ -7305,21 +7305,21 @@ static void test_fetch_seek()
...
@@ -7305,21 +7305,21 @@ static void test_fetch_seek()
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
row 2: %ld, %s, %s"
,
c1
,
c2
,
c3
);
fprintf
(
stdout
,
"
\n
row 2: %ld, %s, %s"
,
(
long
)
c1
,
c2
,
c3
);
row
=
mysql_stmt_row_seek
(
stmt
,
row
);
row
=
mysql_stmt_row_seek
(
stmt
,
row
);
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
row 2: %ld, %s, %s"
,
c1
,
c2
,
c3
);
fprintf
(
stdout
,
"
\n
row 2: %ld, %s, %s"
,
(
long
)
c1
,
c2
,
c3
);
mysql_stmt_data_seek
(
stmt
,
0
);
mysql_stmt_data_seek
(
stmt
,
0
);
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
fprintf
(
stdout
,
"
\n
row 0: %ld, %s, %s"
,
c1
,
c2
,
c3
);
fprintf
(
stdout
,
"
\n
row 0: %ld, %s, %s"
,
(
long
)
c1
,
c2
,
c3
);
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
...
@@ -8050,7 +8050,7 @@ static void test_bug1500()
...
@@ -8050,7 +8050,7 @@ static void test_bug1500()
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
MYSQL_BIND
bind
[
3
];
MYSQL_BIND
bind
[
3
];
int
rc
;
int
rc
;
long
int_data
[
3
]
=
{
2
,
3
,
4
};
int32
int_data
[
3
]
=
{
2
,
3
,
4
};
const
char
*
data
;
const
char
*
data
;
myheader
(
"test_bug1500"
);
myheader
(
"test_bug1500"
);
...
@@ -8836,7 +8836,7 @@ static void test_multi()
...
@@ -8836,7 +8836,7 @@ static void test_multi()
char
*
query
;
char
*
query
;
MYSQL_BIND
bind
[
1
];
MYSQL_BIND
bind
[
1
];
int
rc
,
i
;
int
rc
,
i
;
long
param
=
1
;
int32
param
=
1
;
ulong
length
=
1
;
ulong
length
=
1
;
myheader
(
"test_multi"
);
myheader
(
"test_multi"
);
...
@@ -8888,11 +8888,11 @@ static void test_multi()
...
@@ -8888,11 +8888,11 @@ static void test_multi()
rc
=
mysql_stmt_execute
(
stmt_update
);
rc
=
mysql_stmt_execute
(
stmt_update
);
check_execute
(
stmt_update
,
rc
);
check_execute
(
stmt_update
,
rc
);
fprintf
(
stdout
,
"update %ld
\n
"
,
param
);
fprintf
(
stdout
,
"update %ld
\n
"
,
(
long
)
param
);
rc
=
mysql_stmt_execute
(
stmt_delete
);
rc
=
mysql_stmt_execute
(
stmt_delete
);
check_execute
(
stmt_delete
,
rc
);
check_execute
(
stmt_delete
,
rc
);
fprintf
(
stdout
,
"delete %ld
\n
"
,
param
);
fprintf
(
stdout
,
"delete %ld
\n
"
,
(
long
)
param
);
rc
=
mysql_stmt_execute
(
stmt_select1
);
rc
=
mysql_stmt_execute
(
stmt_select1
);
check_execute
(
stmt_select1
,
rc
);
check_execute
(
stmt_select1
,
rc
);
...
@@ -8966,9 +8966,9 @@ static void test_bind_nagative()
...
@@ -8966,9 +8966,9 @@ static void test_bind_nagative()
char
*
query
;
char
*
query
;
int
rc
;
int
rc
;
MYSQL_BIND
bind
[
1
];
MYSQL_BIND
bind
[
1
];
long
my_val
=
0L
;
int32
my_val
=
0
;
ulong
my_length
=
0L
;
ulong
my_length
=
0L
;
long
my_null
=
0L
;
my_bool
my_null
=
FALSE
;
myheader
(
"test_insert_select"
);
myheader
(
"test_insert_select"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS t1"
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS t1"
);
...
@@ -9010,9 +9010,9 @@ static void test_derived()
...
@@ -9010,9 +9010,9 @@ static void test_derived()
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
int
rc
,
i
;
int
rc
,
i
;
MYSQL_BIND
bind
[
1
];
MYSQL_BIND
bind
[
1
];
long
my_val
=
0L
;
int32
my_val
=
0
;
ulong
my_length
=
0L
;
ulong
my_length
=
0L
;
long
my_null
=
0L
;
my_bool
my_null
=
FALSE
;
const
char
*
query
=
const
char
*
query
=
"select count(1) from (select f.id from t1 f where f.id=?) as x"
;
"select count(1) from (select f.id from t1 f where f.id=?) as x"
;
...
@@ -9520,7 +9520,7 @@ static void test_union_param()
...
@@ -9520,7 +9520,7 @@ static void test_union_param()
MYSQL_BIND
bind
[
2
];
MYSQL_BIND
bind
[
2
];
char
my_val
[
4
];
char
my_val
[
4
];
ulong
my_length
=
3L
;
ulong
my_length
=
3L
;
long
my_null
=
0L
;
my_bool
my_null
=
FALSE
;
myheader
(
"test_union_param"
);
myheader
(
"test_union_param"
);
strcpy
(
my_val
,
"abc"
);
strcpy
(
my_val
,
"abc"
);
...
@@ -9904,7 +9904,7 @@ static void test_bug4079()
...
@@ -9904,7 +9904,7 @@ static void test_bug4079()
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
MYSQL_BIND
bind
[
1
];
MYSQL_BIND
bind
[
1
];
const
char
*
stmt_text
;
const
char
*
stmt_text
;
u
nsigned
long
res
;
u
int32
res
;
int
rc
;
int
rc
;
myheader
(
"test_bug4079"
);
myheader
(
"test_bug4079"
);
...
@@ -10048,7 +10048,7 @@ static void test_bug5126()
...
@@ -10048,7 +10048,7 @@ static void test_bug5126()
{
{
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
MYSQL_BIND
bind
[
2
];
MYSQL_BIND
bind
[
2
];
long
c1
,
c2
;
int32
c1
,
c2
;
const
char
*
stmt_text
;
const
char
*
stmt_text
;
int
rc
;
int
rc
;
...
@@ -10086,7 +10086,7 @@ static void test_bug5126()
...
@@ -10086,7 +10086,7 @@ static void test_bug5126()
rc
=
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
assert
(
rc
==
0
);
assert
(
rc
==
0
);
assert
(
c1
==
8386608
&&
c2
==
1
);
assert
(
c1
==
8386608
&&
c2
==
1
);
printf
(
"%ld, %ld
\n
"
,
c1
,
c2
);
printf
(
"%ld, %ld
\n
"
,
(
long
)
c1
,
(
long
)
c2
);
mysql_stmt_close
(
stmt
);
mysql_stmt_close
(
stmt
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment