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
db2b40b4
Commit
db2b40b4
authored
Jul 19, 2007
by
holyfoot/hf@hfmain.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into mysql.com:/home/hf/work/29687/my51-29687
parents
dfd82a6b
1657b9e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
libmysql/libmysql.c
libmysql/libmysql.c
+1
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+33
-0
No files found.
libmysql/libmysql.c
View file @
db2b40b4
...
@@ -4939,7 +4939,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
...
@@ -4939,7 +4939,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
Reset stored result set if so was requested or it's a part
Reset stored result set if so was requested or it's a part
of cursor fetch.
of cursor fetch.
*/
*/
if
(
result
->
data
&&
(
flags
&
RESET_STORE_RESULT
)
)
if
(
flags
&
RESET_STORE_RESULT
)
{
{
/* Result buffered */
/* Result buffered */
free_root
(
&
result
->
alloc
,
MYF
(
MY_KEEP_PREALLOC
));
free_root
(
&
result
->
alloc
,
MYF
(
MY_KEEP_PREALLOC
));
...
...
tests/mysql_client_test.c
View file @
db2b40b4
...
@@ -16271,6 +16271,38 @@ static void test_bug27592()
...
@@ -16271,6 +16271,38 @@ static void test_bug27592()
}
}
/*
Bug#29687 mysql_stmt_store_result memory leak in libmysqld
*/
static
void
test_bug29687
()
{
const
int
NUM_ITERATIONS
=
40
;
int
i
;
int
rc
;
MYSQL_STMT
*
stmt
=
NULL
;
DBUG_ENTER
(
"test_bug29687"
);
myheader
(
"test_bug29687"
);
stmt
=
mysql_simple_prepare
(
mysql
,
"SELECT 1 FROM dual WHERE 0=2"
);
DIE_UNLESS
(
stmt
);
for
(
i
=
0
;
i
<
NUM_ITERATIONS
;
i
++
)
{
mysql_stmt_execute
(
stmt
);
check_execute
(
stmt
,
rc
);
mysql_stmt_store_result
(
stmt
);
while
(
mysql_stmt_fetch
(
stmt
)
==
0
);
mysql_stmt_free_result
(
stmt
);
}
mysql_stmt_close
(
stmt
);
DBUG_VOID_RETURN
;
}
/*
/*
Read and parse arguments and MySQL options from my.cnf
Read and parse arguments and MySQL options from my.cnf
*/
*/
...
@@ -16560,6 +16592,7 @@ static struct my_tests_st my_tests[]= {
...
@@ -16560,6 +16592,7 @@ static struct my_tests_st my_tests[]= {
{
"test_bug28505"
,
test_bug28505
},
{
"test_bug28505"
,
test_bug28505
},
{
"test_bug28934"
,
test_bug28934
},
{
"test_bug28934"
,
test_bug28934
},
{
"test_bug27592"
,
test_bug27592
},
{
"test_bug27592"
,
test_bug27592
},
{
"test_bug29687"
,
test_bug29687
},
{
0
,
0
}
{
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