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
af187dee
Commit
af187dee
authored
Dec 14, 2011
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
ea2cd838
ba8c33f5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
0 deletions
+49
-0
.bzrignore
.bzrignore
+9
-0
myisam/mi_preload.c
myisam/mi_preload.c
+3
-0
mysql-test/r/key_cache.result
mysql-test/r/key_cache.result
+16
-0
mysql-test/t/key_cache.test
mysql-test/t/key_cache.test
+16
-0
sql/sql_table.cc
sql/sql_table.cc
+5
-0
No files found.
.bzrignore
View file @
af187dee
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
*.core
*.core
*.d
*.d
*.da
*.da
*.dir
*.exe
*.exe
*.gcda
*.gcda
*.gcno
*.gcno
...
@@ -25,6 +26,7 @@
...
@@ -25,6 +26,7 @@
*.pdb
*.pdb
*.reject
*.reject
*.res
*.res
*.rule
*.sbr
*.sbr
*.so
*.so
*.so.*
*.so.*
...
@@ -32,13 +34,19 @@
...
@@ -32,13 +34,19 @@
*.user
*.user
*.vcproj
*.vcproj
*.vcproj.cmake
*.vcproj.cmake
*.vcxproj
*.vcxproj.filters
*/*.dir/*
*/*.dir/*
Debug
MySql.sdf
Win32
*/*_pure_*warnings
*/*_pure_*warnings
*/.deps
*/.deps
*/.libs/*
*/.libs/*
*/.pure
*/.pure
*/debug/*
*/debug/*
*/release/*
*/release/*
RelWithDebInfo
*~
*~
.*.swp
.*.swp
./CMakeCache.txt
./CMakeCache.txt
...
@@ -83,6 +91,7 @@ BitKeeper/tmp/*
...
@@ -83,6 +91,7 @@ BitKeeper/tmp/*
BitKeeper/tmp/bkr3sAHD
BitKeeper/tmp/bkr3sAHD
BitKeeper/tmp/gone
BitKeeper/tmp/gone
CMakeFiles/*
CMakeFiles/*
CMakeFiles
COPYING
COPYING
COPYING.LIB
COPYING.LIB
Docs/#manual.texi#
Docs/#manual.texi#
...
...
myisam/mi_preload.c
View file @
af187dee
...
@@ -54,6 +54,9 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
...
@@ -54,6 +54,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
)
if
(
!
keys
||
!
mi_is_any_key_active
(
key_map
)
||
key_file_length
==
pos
)
DBUG_RETURN
(
0
);
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
;
block_length
=
keyinfo
[
0
].
block_length
;
if
(
ignore_leaves
)
if
(
ignore_leaves
)
...
...
mysql-test/r/key_cache.result
View file @
af187dee
...
@@ -368,3 +368,19 @@ Variable_name Value
...
@@ -368,3 +368,19 @@ Variable_name Value
key_cache_block_size 1536
key_cache_block_size 1536
SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size;
SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size;
DROP TABLE t1;
DROP TABLE t1;
#
# 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/t/key_cache.test
View file @
af187dee
...
@@ -247,3 +247,19 @@ SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size;
...
@@ -247,3 +247,19 @@ SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
# End of 4.1 tests
# End of 4.1 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
;
sql/sql_table.cc
View file @
af187dee
...
@@ -2680,6 +2680,11 @@ bool mysql_assign_to_keycache(THD* thd, TABLE_LIST* tables,
...
@@ -2680,6 +2680,11 @@ bool mysql_assign_to_keycache(THD* thd, TABLE_LIST* tables,
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
pthread_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
;
check_opt
.
key_cache
=
key_cache
;
DBUG_RETURN
(
mysql_admin_table
(
thd
,
tables
,
&
check_opt
,
DBUG_RETURN
(
mysql_admin_table
(
thd
,
tables
,
&
check_opt
,
"assign_to_keycache"
,
TL_READ_NO_INSERT
,
0
,
0
,
"assign_to_keycache"
,
TL_READ_NO_INSERT
,
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