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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
19fd36e2
Commit
19fd36e2
authored
Jan 17, 2006
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix and a test case for Bug#16144 "mysql_stmt_attr_get type error":
use the right type in mysql_stmt_attr_get
parent
70bb0668
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
libmysql/libmysql.c
libmysql/libmysql.c
+1
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+20
-0
No files found.
libmysql/libmysql.c
View file @
19fd36e2
...
...
@@ -2733,7 +2733,7 @@ my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt,
{
switch
(
attr_type
)
{
case
STMT_ATTR_UPDATE_MAX_LENGTH
:
*
(
unsigned
long
*
)
value
=
stmt
->
update_max_length
;
*
(
my_bool
*
)
value
=
stmt
->
update_max_length
;
break
;
default:
return
TRUE
;
...
...
tests/mysql_client_test.c
View file @
19fd36e2
...
...
@@ -11753,6 +11753,25 @@ static void test_bug12925()
}
/* Bug #16144: mysql_stmt_attr_get type error */
static
void
test_bug16144
()
{
const
my_bool
flag_orig
=
(
my_bool
)
0xde
;
my_bool
flag
=
flag_orig
;
MYSQL_STMT
*
stmt
;
myheader
(
"test_bug16144"
);
/* Check that attr_get returns correct data on little and big endian CPUs */
stmt
=
mysql_stmt_init
(
mysql
);
mysql_stmt_attr_set
(
stmt
,
STMT_ATTR_UPDATE_MAX_LENGTH
,
(
const
void
*
)
&
flag
);
mysql_stmt_attr_get
(
stmt
,
STMT_ATTR_UPDATE_MAX_LENGTH
,
(
void
*
)
&
flag
);
DIE_UNLESS
(
flag
==
flag_orig
);
mysql_stmt_close
(
stmt
);
}
/*
Read and parse arguments and MySQL options from my.cnf
*/
...
...
@@ -11974,6 +11993,7 @@ static struct my_tests_st my_tests[]= {
{
"test_bug12001"
,
test_bug12001
},
{
"test_bug11718"
,
test_bug11718
},
{
"test_bug12925"
,
test_bug12925
},
{
"test_bug16144"
,
test_bug16144
},
{
0
,
0
}
};
...
...
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