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
47a54a2e
Commit
47a54a2e
authored
Feb 14, 2012
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge MySQL 5.5.20 into MariaDB 5.5.
parents
bbd20403
16036b5e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
100 additions
and
3 deletions
+100
-3
.bzr-mysql/default.conf
.bzr-mysql/default.conf
+3
-3
mysql-test/r/key_cache.result
mysql-test/r/key_cache.result
+16
-0
mysql-test/r/mysqlcheck.result
mysql-test/r/mysqlcheck.result
+1
-0
mysql-test/r/partition_key_cache.result
mysql-test/r/partition_key_cache.result
+27
-0
mysql-test/t/key_cache.test
mysql-test/t/key_cache.test
+16
-0
mysql-test/t/mysqlcheck.test
mysql-test/t/mysqlcheck.test
+1
-0
mysql-test/t/partition_key_cache.test
mysql-test/t/partition_key_cache.test
+28
-0
sql/sql_admin.cc
sql/sql_admin.cc
+5
-0
storage/myisam/mi_preload.c
storage/myisam/mi_preload.c
+3
-0
No files found.
.bzr-mysql/default.conf
View file @
47a54a2e
[
MYSQL
]
post_commit_to
=
"
commits@lists.mysql.com
"
post_push_to
=
"
commits@lists.mysql.com
"
tree_name
=
"mysql-5.5"
post_commit_to
=
"
MYSQL_COMMITS_SECURITY_WW@ORACLE.COM
"
post_push_to
=
"
MYSQL_COMMITS_SECURITY_WW@ORACLE.COM
"
tree_name
=
"mysql-5.5
-security
"
mysql-test/r/key_cache.result
View file @
47a54a2e
...
...
@@ -817,3 +817,19 @@ set global keycache1.key_buffer_size=0;
set global keycache2.key_buffer_size=0;
set global key_buffer_size=@save_key_buffer_size;
set global key_cache_segments=@save_key_cache_segments;
#
# Bug#12361113: crash when load index into cache
#
# Note that this creates an empty disabled key cache!
SET GLOBAL key_cache_none.key_cache_block_size = 1024;
CREATE TABLE t1 (a INT, b INTEGER NOT NULL, KEY (b) ) ENGINE = MYISAM;
INSERT INTO t1 VALUES (1, 1);
CACHE INDEX t1 in key_cache_none;
ERROR HY000: Unknown key cache 'key_cache_none'
# The bug crashed the server at LOAD INDEX below. Now it will succeed
# since the default cache is used due to CACHE INDEX failed for
# key_cache_none.
LOAD INDEX INTO CACHE t1;
Table Op Msg_type Msg_text
test.t1 preload_keys status OK
DROP TABLE t1;
mysql-test/r/mysqlcheck.result
View file @
47a54a2e
...
...
@@ -191,6 +191,7 @@ CREATE TABLE `я` (a INT) engine=myisam;
SET NAMES DEFAULT;
call mtr.add_suppression("@003f.frm' \\(errno: 22\\)");
mysqlcheck --default-character-set="latin1" --databases test
call mtr.add_suppression("Can't find file: '..test.@003f.frm'");
test.?
Error : Table doesn't exist
status : Operation failed
...
...
mysql-test/r/partition_key_cache.result
View file @
47a54a2e
...
...
@@ -397,6 +397,33 @@ test.t1 assign_to_keycache error Subpartition sp0 returned error
test.t1 assign_to_keycache Error Key 'inx_b' doesn't exist in table 't1'
test.t1 assign_to_keycache status Operation failed
DROP TABLE t1,t2;
#
# Bug#12361113: crash when load index into cache
#
# Note that this creates an empty disabled key cache!
SET GLOBAL key_cache_none.key_cache_block_size = 1024;
CREATE TABLE t1 (a INT, b INTEGER NOT NULL, KEY (b) )
ENGINE = MYISAM
PARTITION BY HASH(a) PARTITIONS 2;
INSERT INTO t1 VALUES (1, 1);
CACHE INDEX t1 IN key_cache_none;
ERROR HY000: Unknown key cache 'key_cache_none'
CACHE INDEX t1 PARTITION (p0) IN key_cache_none;
ERROR HY000: Unknown key cache 'key_cache_none'
CACHE INDEX t1 PARTITION (p1) IN key_cache_none;
ERROR HY000: Unknown key cache 'key_cache_none'
CACHE INDEX t1 PARTITION (p0) KEY (`b`) IN key_cache_none;
ERROR HY000: Unknown key cache 'key_cache_none'
CACHE INDEX t1 PARTITION (p1) KEY (`b`) IN key_cache_none;
ERROR HY000: Unknown key cache 'key_cache_none'
# The bug crashed the server at LOAD INDEX below. Now it will succeed
# since the default cache is used due to CACHE INDEX failed for
# key_cache_none.
LOAD INDEX INTO CACHE t1;
Table Op Msg_type Msg_text
test.t1 preload_keys status OK
DROP TABLE t1;
# Clean up
SET GLOBAL hot_cache.key_buffer_size = 0;
SET GLOBAL warm_cache.key_buffer_size = 0;
SET @@global.cold_cache.key_buffer_size = 0;
...
...
mysql-test/t/key_cache.test
View file @
47a54a2e
...
...
@@ -522,3 +522,19 @@ set global key_buffer_size=@save_key_buffer_size;
set
global
key_cache_segments
=@
save_key_cache_segments
;
# End of 5.2 tests
--
echo
#
--
echo
# Bug#12361113: crash when load index into cache
--
echo
#
--
echo
# Note that this creates an empty disabled key cache!
SET
GLOBAL
key_cache_none
.
key_cache_block_size
=
1024
;
CREATE
TABLE
t1
(
a
INT
,
b
INTEGER
NOT
NULL
,
KEY
(
b
)
)
ENGINE
=
MYISAM
;
INSERT
INTO
t1
VALUES
(
1
,
1
);
--
error
ER_UNKNOWN_KEY_CACHE
CACHE
INDEX
t1
in
key_cache_none
;
--
echo
# The bug crashed the server at LOAD INDEX below. Now it will succeed
--
echo
# since the default cache is used due to CACHE INDEX failed for
--
echo
# key_cache_none.
LOAD
INDEX
INTO
CACHE
t1
;
DROP
TABLE
t1
;
mysql-test/t/mysqlcheck.test
View file @
47a54a2e
...
...
@@ -147,6 +147,7 @@ SET NAMES DEFAULT;
call
mtr
.
add_suppression
(
"@003f.frm'
\\
(errno: 22
\\
)"
);
--
echo
mysqlcheck
--
default
-
character
-
set
=
"latin1"
--
databases
test
# Error returned depends on platform, replace it with "Table doesn't exist"
call
mtr
.
add_suppression
(
"Can't find file: '..test.@003f.frm'"
);
--
replace_result
"Can't find file: './test/@003f.frm' (errno: 22)"
"Table doesn't exist"
"Table 'test.?' doesn't exist"
"Table doesn't exist"
--
exec
$MYSQL_CHECK
--
default
-
character
-
set
=
"latin1"
--
databases
test
--
echo
mysqlcheck
--
default
-
character
-
set
=
"utf8"
--
databases
test
...
...
mysql-test/t/partition_key_cache.test
View file @
47a54a2e
...
...
@@ -239,6 +239,34 @@ CACHE INDEX t2 INDEX (`inx_b`) IN hot_cache;
CACHE
INDEX
t1
PARTITION
(
p0
)
KEY
(
`inx_b`
)
IN
hot_cache
;
CACHE
INDEX
t1
INDEX
(
`inx_b`
)
IN
hot_cache
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# Bug#12361113: crash when load index into cache
--
echo
#
--
echo
# Note that this creates an empty disabled key cache!
SET
GLOBAL
key_cache_none
.
key_cache_block_size
=
1024
;
CREATE
TABLE
t1
(
a
INT
,
b
INTEGER
NOT
NULL
,
KEY
(
b
)
)
ENGINE
=
MYISAM
PARTITION
BY
HASH
(
a
)
PARTITIONS
2
;
INSERT
INTO
t1
VALUES
(
1
,
1
);
--
error
ER_UNKNOWN_KEY_CACHE
CACHE
INDEX
t1
IN
key_cache_none
;
--
error
ER_UNKNOWN_KEY_CACHE
CACHE
INDEX
t1
PARTITION
(
p0
)
IN
key_cache_none
;
--
error
ER_UNKNOWN_KEY_CACHE
CACHE
INDEX
t1
PARTITION
(
p1
)
IN
key_cache_none
;
--
error
ER_UNKNOWN_KEY_CACHE
CACHE
INDEX
t1
PARTITION
(
p0
)
KEY
(
`b`
)
IN
key_cache_none
;
--
error
ER_UNKNOWN_KEY_CACHE
CACHE
INDEX
t1
PARTITION
(
p1
)
KEY
(
`b`
)
IN
key_cache_none
;
--
echo
# The bug crashed the server at LOAD INDEX below. Now it will succeed
--
echo
# since the default cache is used due to CACHE INDEX failed for
--
echo
# key_cache_none.
LOAD
INDEX
INTO
CACHE
t1
;
DROP
TABLE
t1
;
--
echo
# Clean up
SET
GLOBAL
hot_cache
.
key_buffer_size
=
0
;
SET
GLOBAL
warm_cache
.
key_buffer_size
=
0
;
SET
@@
global
.
cold_cache
.
key_buffer_size
=
0
;
...
...
sql/sql_admin.cc
View file @
47a54a2e
...
...
@@ -935,6 +935,11 @@ bool mysql_assign_to_keycache(THD* thd, TABLE_LIST* tables,
DBUG_RETURN
(
TRUE
);
}
mysql_mutex_unlock
(
&
LOCK_global_system_variables
);
if
(
!
key_cache
->
key_cache_inited
)
{
my_error
(
ER_UNKNOWN_KEY_CACHE
,
MYF
(
0
),
key_cache_name
->
str
);
DBUG_RETURN
(
true
);
}
check_opt
.
key_cache
=
key_cache
;
DBUG_RETURN
(
mysql_admin_table
(
thd
,
tables
,
&
check_opt
,
"assign_to_keycache"
,
TL_READ_NO_INSERT
,
0
,
0
,
...
...
storage/myisam/mi_preload.c
View file @
47a54a2e
...
...
@@ -53,6 +53,9 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
if
(
!
keys
||
!
mi_is_any_key_active
(
key_map
)
||
key_file_length
==
pos
)
DBUG_RETURN
(
0
);
/* Preload into a non initialized key cache should never happen. */
DBUG_ASSERT
(
share
->
key_cache
->
key_cache_inited
);
block_length
=
keyinfo
[
0
].
block_length
;
if
(
ignore_leaves
)
...
...
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