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
1d0f873d
Commit
1d0f873d
authored
Jul 29, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix after manual merge.
tests/mysql_client_test.c: Fix after manual merge: add test for bug#21206.
parent
74214b86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
1 deletion
+45
-1
mysys/my_bitmap.c
mysys/my_bitmap.c
+1
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+44
-0
No files found.
mysys/my_bitmap.c
View file @
1d0f873d
...
@@ -445,7 +445,7 @@ uint bitmap_get_first(const MY_BITMAP *map)
...
@@ -445,7 +445,7 @@ uint bitmap_get_first(const MY_BITMAP *map)
{
{
uchar
*
bitmap
=
map
->
bitmap
;
uchar
*
bitmap
=
map
->
bitmap
;
uint
bit_found
=
MY_BIT_NONE
;
uint
bit_found
=
MY_BIT_NONE
;
uint
bitmap_size
=
map
->
bitmap_size
*
8
;
uint
bitmap_size
=
map
->
bitmap_size
;
uint
i
;
uint
i
;
DBUG_ASSERT
(
map
->
bitmap
);
DBUG_ASSERT
(
map
->
bitmap
);
...
...
tests/mysql_client_test.c
View file @
1d0f873d
...
@@ -15028,6 +15028,49 @@ static void test_bug20152()
...
@@ -15028,6 +15028,49 @@ static void test_bug20152()
}
}
/*
Bug#21206: memory corruption when too many cursors are opened at once
Memory corruption happens when more than 1024 cursors are open
simultaneously.
*/
static
void
test_bug21206
()
{
const
size_t
cursor_count
=
1025
;
const
char
*
create_table
[]
=
{
"DROP TABLE IF EXISTS t1"
,
"CREATE TABLE t1 (i INT)"
,
"INSERT INTO t1 VALUES (1), (2), (3)"
};
const
char
*
query
=
"SELECT * FROM t1"
;
Stmt_fetch
*
fetch_array
=
(
Stmt_fetch
*
)
calloc
(
cursor_count
,
sizeof
(
Stmt_fetch
));
Stmt_fetch
*
fetch
;
DBUG_ENTER
(
"test_bug21206"
);
myheader
(
"test_bug21206"
);
fill_tables
(
create_table
,
sizeof
(
create_table
)
/
sizeof
(
*
create_table
));
for
(
fetch
=
fetch_array
;
fetch
<
fetch_array
+
cursor_count
;
++
fetch
)
{
/* Init will exit(1) in case of error */
stmt_fetch_init
(
fetch
,
fetch
-
fetch_array
,
query
);
}
for
(
fetch
=
fetch_array
;
fetch
<
fetch_array
+
cursor_count
;
++
fetch
)
stmt_fetch_close
(
fetch
);
free
(
fetch_array
);
DBUG_VOID_RETURN
;
}
/*
/*
Read and parse arguments and MySQL options from my.cnf
Read and parse arguments and MySQL options from my.cnf
*/
*/
...
@@ -15300,6 +15343,7 @@ static struct my_tests_st my_tests[]= {
...
@@ -15300,6 +15343,7 @@ static struct my_tests_st my_tests[]= {
{
"test_bug14169"
,
test_bug14169
},
{
"test_bug14169"
,
test_bug14169
},
{
"test_bug17667"
,
test_bug17667
},
{
"test_bug17667"
,
test_bug17667
},
{
"test_bug19671"
,
test_bug19671
},
{
"test_bug19671"
,
test_bug19671
},
{
"test_bug21206"
,
test_bug21206
},
{
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