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
34dd8892
Commit
34dd8892
authored
Oct 09, 2009
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge into mysql-5.1-bugteam
parents
66a33d25
3c20cf5f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
1 deletion
+43
-1
mysql-test/r/partition_open_files_limit.result
mysql-test/r/partition_open_files_limit.result
+22
-0
mysql-test/t/partition_open_files_limit-master.opt
mysql-test/t/partition_open_files_limit-master.opt
+1
-0
mysql-test/t/partition_open_files_limit.test
mysql-test/t/partition_open_files_limit.test
+19
-0
sql/ha_partition.cc
sql/ha_partition.cc
+1
-1
No files found.
mysql-test/r/partition_open_files_limit.result
0 → 100644
View file @
34dd8892
DROP TABLE IF EXISTS `t1`;
# Bug#46922: crash when adding partitions and open_files_limit is reached
CREATE TABLE t1 (a INT PRIMARY KEY)
ENGINE=MyISAM PARTITION BY KEY () PARTITIONS 1;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
# if the bug exists, then crash will happen here
ALTER TABLE t1 ADD PARTITION PARTITIONS 511;
ERROR HY000: Out of resources when opening file '<partition file>' (Errcode: 24)
SELECT * FROM t1;
a
1
10
11
2
3
4
5
6
7
8
9
DROP TABLE t1;
mysql-test/t/partition_open_files_limit-master.opt
0 → 100644
View file @
34dd8892
--open-files-limit=5 --max_connections=2 --table_open_cache=1
mysql-test/t/partition_open_files_limit.test
0 → 100644
View file @
34dd8892
--
source
include
/
have_partition
.
inc
--
disable_warnings
DROP
TABLE
IF
EXISTS
`t1`
;
--
enable_warnings
#
--
echo
# Bug#46922: crash when adding partitions and open_files_limit is reached
#
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
)
ENGINE
=
MyISAM
PARTITION
BY
KEY
()
PARTITIONS
1
;
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
),
(
6
),
(
7
),
(
8
),
(
9
),
(
10
),
(
11
);
--
echo
# if the bug exists, then crash will happen here
--
replace_regex
/
file
'.*'
/
file
'<partition file>'
/
--
error
23
ALTER
TABLE
t1
ADD
PARTITION
PARTITIONS
511
;
--
sorted_result
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
sql/ha_partition.cc
View file @
34dd8892
...
...
@@ -1280,10 +1280,10 @@ void ha_partition::cleanup_new_partition(uint part_count)
m_file
=
m_added_file
;
m_added_file
=
NULL
;
external_lock
(
ha_thd
(),
F_UNLCK
);
/* delete_table also needed, a bit more complex */
close
();
m_added_file
=
m_file
;
m_file
=
save_m_file
;
}
DBUG_VOID_RETURN
;
...
...
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