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
f1c8e165
Commit
f1c8e165
authored
May 04, 2004
by
dlenev@brandersnatch.localdomain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After merge fix.
Now test_bug1664() uses new statement checking macros.
parent
2c30359a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
21 deletions
+16
-21
tests/client_test.c
tests/client_test.c
+16
-21
No files found.
tests/client_test.c
View file @
f1c8e165
...
...
@@ -9454,9 +9454,9 @@ static void test_bug1664()
myquery
(
rc
);
stmt
=
mysql_stmt_init
(
mysql
);
mystmt_ini
t
(
stmt
);
check_stm
t
(
stmt
);
rc
=
mysql_stmt_prepare
(
stmt
,
query
,
strlen
(
query
));
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
verify_param_count
(
stmt
,
2
);
...
...
@@ -9470,7 +9470,7 @@ static void test_bug1664()
bind
[
1
].
buffer_type
=
FIELD_TYPE_LONG
;
rc
=
mysql_stmt_bind_param
(
stmt
,
bind
);
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
int_data
=
1
;
...
...
@@ -9480,11 +9480,10 @@ static void test_bug1664()
*/
data
=
""
;
rc
=
mysql_stmt_send_long_data
(
stmt
,
0
,
data
,
strlen
(
data
));
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
rc
=
mysql_stmt_execute
(
stmt
);
fprintf
(
stdout
,
" mysql_execute() returned %d
\n
"
,
rc
);
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
verify_col_data
(
"test_long_data"
,
"col1"
,
"1"
);
verify_col_data
(
"test_long_data"
,
"col2"
,
""
);
...
...
@@ -9495,11 +9494,10 @@ static void test_bug1664()
/* This should pass OK */
data
=
(
char
*
)
"Data"
;
rc
=
mysql_stmt_send_long_data
(
stmt
,
0
,
data
,
strlen
(
data
));
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
rc
=
mysql_stmt_execute
(
stmt
);
fprintf
(
stdout
,
" mysql_execute() returned %d
\n
"
,
rc
);
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
verify_col_data
(
"test_long_data"
,
"col1"
,
"1"
);
verify_col_data
(
"test_long_data"
,
"col2"
,
"Data"
);
...
...
@@ -9517,8 +9515,7 @@ static void test_bug1664()
int_data
=
2
;
/* execute */
rc
=
mysql_stmt_execute
(
stmt
);
fprintf
(
stdout
,
" mysql_execute() returned %d
\n
"
,
rc
);
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
verify_col_data
(
"test_long_data"
,
"col1"
,
"2"
);
verify_col_data
(
"test_long_data"
,
"col2"
,
str_data
);
...
...
@@ -9534,11 +9531,10 @@ static void test_bug1664()
data
=
(
char
*
)
"SomeOtherData"
;
rc
=
mysql_stmt_send_long_data
(
stmt
,
0
,
data
,
strlen
(
data
));
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
rc
=
mysql_stmt_execute
(
stmt
);
fprintf
(
stdout
,
" mysql_execute() returned %d
\n
"
,
rc
);
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
verify_col_data
(
"test_long_data"
,
"col1"
,
"2"
);
verify_col_data
(
"test_long_data"
,
"col2"
,
"SomeOtherData"
);
...
...
@@ -9551,22 +9547,21 @@ static void test_bug1664()
/* Now let us test how mysql_stmt_reset works. */
stmt
=
mysql_stmt_init
(
mysql
);
mystmt_ini
t
(
stmt
);
check_stm
t
(
stmt
);
rc
=
mysql_stmt_prepare
(
stmt
,
query
,
strlen
(
query
));
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
rc
=
mysql_bind_param
(
stmt
,
bind
);
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
data
=
(
char
*
)
"SomeData"
;
rc
=
mysql_stmt_send_long_data
(
stmt
,
0
,
data
,
strlen
(
data
));
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
rc
=
mysql_stmt_reset
(
stmt
);
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
rc
=
mysql_stmt_execute
(
stmt
);
fprintf
(
stdout
,
" mysql_execute() returned %d
\n
"
,
rc
);
mystmt
(
stmt
,
rc
);
check_execute
(
stmt
,
rc
);
verify_col_data
(
"test_long_data"
,
"col1"
,
"2"
);
verify_col_data
(
"test_long_data"
,
"col2"
,
str_data
);
...
...
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