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
ef31b39d
Commit
ef31b39d
authored
Oct 09, 2009
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge into mysql-5.1-bugteam
parents
89050754
0186334a
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 @
ef31b39d
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 @
ef31b39d
--open-files-limit=5 --max_connections=2 --table_open_cache=1
mysql-test/t/partition_open_files_limit.test
0 → 100644
View file @
ef31b39d
--
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 @
ef31b39d
...
...
@@ -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