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
021c2d45
Commit
021c2d45
authored
Jun 19, 2005
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the test for Bug#11111: coding style, a compiler warning, don't
use tabs.
parent
d75f6d74
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
tests/mysql_client_test.c
tests/mysql_client_test.c
+16
-12
No files found.
tests/mysql_client_test.c
View file @
021c2d45
...
@@ -13154,10 +13154,11 @@ static void test_bug11111()
...
@@ -13154,10 +13154,11 @@ static void test_bug11111()
MYSQL_STMT
*
stmt
;
MYSQL_STMT
*
stmt
;
MYSQL_BIND
bind
[
2
];
MYSQL_BIND
bind
[
2
];
char
buf
[
2
][
20
];
char
buf
[
2
][
20
];
long
len
[
2
];
ulong
len
[
2
];
int
i
;
int
i
;
int
rc
;
int
rc
;
const
char
*
query
=
"SELECT DISTINCT f1,ff2 FROM v1"
;
const
char
*
query
=
"SELECT DISTINCT f1,ff2 FROM v1"
;
myheader
(
"test_bug11111"
);
myheader
(
"test_bug11111"
);
rc
=
mysql_query
(
mysql
,
"drop table if exists t1, t2, v1"
);
rc
=
mysql_query
(
mysql
,
"drop table if exists t1, t2, v1"
);
...
@@ -13175,23 +13176,26 @@ static void test_bug11111()
...
@@ -13175,23 +13176,26 @@ static void test_bug11111()
rc
=
mysql_query
(
mysql
,
"insert into t2 values (1,1), (2,2), (3,3)"
);
rc
=
mysql_query
(
mysql
,
"insert into t2 values (1,1), (2,2), (3,3)"
);
myquery
(
rc
);
myquery
(
rc
);
stmt
=
mysql_stmt_init
(
mysql
);
stmt
=
mysql_stmt_init
(
mysql
);
mysql_stmt_prepare
(
stmt
,
query
,
strlen
(
query
));
mysql_stmt_prepare
(
stmt
,
query
,
strlen
(
query
));
mysql_stmt_execute
(
stmt
);
mysql_stmt_execute
(
stmt
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
bzero
(
bind
,
sizeof
(
bind
));
memset
(
&
bind
[
i
],
'\0'
,
sizeof
(
MYSQL_BIND
));
for
(
i
=
0
;
i
<
2
;
i
++
)
{
bind
[
i
].
buffer_type
=
MYSQL_TYPE_STRING
;
bind
[
i
].
buffer_type
=
MYSQL_TYPE_STRING
;
bind
[
i
].
buffer
=
(
gptr
*
)
&
buf
[
i
];
bind
[
i
].
buffer
=
(
gptr
*
)
&
buf
[
i
];
bind
[
i
].
buffer_length
=
20
;
bind
[
i
].
buffer_length
=
20
;
bind
[
i
].
length
=
&
len
[
i
];
bind
[
i
].
length
=
&
len
[
i
];
}
}
if
(
mysql_stmt_bind_result
(
stmt
,
bind
))
rc
=
mysql_stmt_bind_result
(
stmt
,
bind
);
printf
(
"Error: %s
\n
"
,
mysql_stmt_error
(
stmt
)
);
check_execute
(
stmt
,
rc
);
mysql_stmt_fetch
(
stmt
);
rc
=
mysql_stmt_fetch
(
stmt
);
check_execute
(
stmt
,
rc
);
if
(
!
opt_silent
)
printf
(
"return: %s"
,
buf
[
1
]);
printf
(
"return: %s"
,
buf
[
1
]);
DIE_UNLESS
(
!
strcmp
(
buf
[
1
],
"1"
));
DIE_UNLESS
(
!
strcmp
(
buf
[
1
],
"1"
));
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