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
2090d579
Commit
2090d579
authored
Aug 26, 2003
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
key_cache.result, sql_lex.h, sql_yacc.yy, set_var.cc, sql_lex.cc:
After merge fix
parent
3f6daf6e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
34 deletions
+43
-34
mysql-test/r/key_cache.result
mysql-test/r/key_cache.result
+2
-2
sql/set_var.cc
sql/set_var.cc
+26
-20
sql/sql_lex.cc
sql/sql_lex.cc
+3
-0
sql/sql_lex.h
sql/sql_lex.h
+2
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+10
-10
No files found.
mysql-test/r/key_cache.result
View file @
2090d579
...
...
@@ -77,7 +77,7 @@ select @@keycache1.key_cache_block_size;
0
select @@key_buffer_size;
@@key_buffer_size
16777216
2097152
select @@key_cache_block_size;
@@key_cache_block_size
1024
...
...
@@ -121,7 +121,7 @@ i
explain select count(*) from t1, t2 where t1.p = t2.i;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index
1 SIMPLE t2
index k1 k1 5 NULL 4
Using where; Using index
1 SIMPLE t2
ref k1 k1 5 test.t1.p 2
Using where; Using index
select count(*) from t1, t2 where t1.p = t2.i;
count(*)
3
...
...
sql/set_var.cc
View file @
2090d579
...
...
@@ -1507,7 +1507,8 @@ static KEY_CACHE_VAR *get_key_cache(LEX_STRING *cache_name)
default_key_cache_base
.
length
)))
cache_name
=
&
default_key_cache_base
;
return
((
KEY_CACHE_VAR
*
)
find_named
(
&
key_caches
,
cache_name
->
str
,
cache_name
->
length
));
cache_name
->
str
,
cache_name
->
length
,
0
));
}
byte
*
sys_var_key_cache_param
::
value_ptr
(
THD
*
thd
,
enum_var_type
type
,
...
...
@@ -1519,23 +1520,20 @@ byte *sys_var_key_cache_param::value_ptr(THD *thd, enum_var_type type,
return
(
byte
*
)
key_cache
+
offset
;
}
bool
sys_var_key_buffer_size
::
update
(
THD
*
thd
,
set_var
*
var
bool
sys_var_key_buffer_size
::
update
(
THD
*
thd
,
set_var
*
var
)
{
ulonglong
tmp
=
var
->
value
->
val_int
();
base_name
=
&
default_key_cache_base
;
LEX_STRING
*
base_name
=
&
var
->
base
;
if
(
!
base_name
->
length
)
base_name
=
&
default_key_cache_base
;
KEY_CACHE_VAR
*
key_cache
=
get_key_cache
(
base_name
);
}
KEY_CACHE
*
key_cache
=
(
KEY_CACHE
*
)
find_named
(
&
key_caches
,
base_name
.
str
,
base_name
.
length
);
if
(
!
key_cache
)
{
if
(
!
tmp
)
// Tried to delete cache
return
0
;
// Ok, nothing to do
if
(
!
(
key_cache
=
create_key_cache
(
base_name
->
str
,
base_name
->
length
)
base_name
->
length
)
))
return
1
;
}
if
(
!
tmp
)
// Zero size means delete
...
...
@@ -1549,8 +1547,15 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var
Move tables using this key cache to the default key cache
and remove this key cache if no tables are assigned to it
*/
return
(
reassign_keycache_tables
(
thd
,
key_cache
,
default_key_cache_base
.
str
,
1
));
NAMED_LIST
*
list
;
key_cache
=
(
KEY_CACHE_VAR
*
)
find_named
(
&
key_caches
,
base_name
->
str
,
base_name
->
length
,
&
list
);
delete
list
;
int
rc
=
reassign_keycache_tables
(
thd
,
key_cache
,
default_key_cache_base
.
str
,
1
);
my_free
((
char
*
)
key_cache
,
MYF
(
0
));
return
rc
;
}
return
0
;
}
...
...
@@ -1566,8 +1571,8 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var
bool
sys_var_key_cache_block_size
::
update
(
THD
*
thd
,
set_var
*
var
)
{
ulong
tmp
=
var
->
value
->
val_int
();
if
(
!
base_name
.
length
)
LEX_STRING
*
base_name
=
&
var
->
base
;
if
(
!
base_name
->
length
)
base_name
=
&
default_key_cache_base
;
KEY_CACHE_VAR
*
key_cache
=
get_key_cache
(
base_name
);
...
...
@@ -1586,8 +1591,8 @@ bool sys_var_key_cache_block_size::update(THD *thd, set_var *var)
bool
sys_var_key_cache_division_limit
::
update
(
THD
*
thd
,
set_var
*
var
)
{
ulong
tmp
=
var
->
value
->
val_int
();
if
(
!
base_name
.
length
)
LEX_STRING
*
base_name
=
&
var
->
base
;
if
(
!
base_name
->
length
)
base_name
=
&
default_key_cache_base
;
KEY_CACHE_VAR
*
key_cache
=
get_key_cache
(
base_name
);
...
...
@@ -1604,11 +1609,11 @@ bool sys_var_key_cache_division_limit::update(THD *thd, set_var *var)
return
0
;
}
bool
sys_var_key_age_threshold
::
update
(
THD
*
thd
,
set_var
*
var
)
bool
sys_var_key_
cache_
age_threshold
::
update
(
THD
*
thd
,
set_var
*
var
)
{
ulong
tmp
=
var
->
value
->
val_int
();
if
(
!
base_name
.
length
)
LEX_STRING
*
base_name
=
&
var
->
base
;
if
(
!
base_name
->
length
)
base_name
=
&
default_key_cache_base
;
KEY_CACHE_VAR
*
key_cache
=
get_key_cache
(
base_name
);
...
...
@@ -2195,7 +2200,8 @@ gptr find_named(I_List<NAMED_LIST> *list, const char *name, uint length,
{
if
(
element
->
cmp
(
name
,
length
))
{
*
found
=
element
;
if
(
found
)
*
found
=
element
;
return
element
->
data
;
}
}
...
...
sql/sql_lex.cc
View file @
2090d579
...
...
@@ -1174,6 +1174,9 @@ TABLE_LIST *st_select_lex_node::add_table_to_list(THD *thd, Table_ident *table,
List
<
String
>
*
use_index
,
List
<
String
>
*
ignore_index
,
LEX_STRING
*
option
)
{
return
0
;
}
ulong
st_select_lex_node
::
get_table_join_options
()
{
return
0
;
...
...
sql/sql_lex.h
View file @
2090d579
...
...
@@ -437,8 +437,8 @@ public:
ulong
table_options
,
thr_lock_type
flags
=
TL_UNLOCK
,
List
<
String
>
*
use_index
=
0
,
List
<
String
>
*
ignore_index
=
0
);
List
<
String
>
*
ignore_index
=
0
,
LEX_STRING
*
option
=
0
);
TABLE_LIST
*
get_table_list
();
List
<
Item
>*
get_item_list
();
List
<
String
>*
get_use_index
();
...
...
sql/sql_yacc.yy
View file @
2090d579
...
...
@@ -1946,16 +1946,16 @@ preload_keys:
}
;
preload
_keys_spec:
keys_or_index { Select->interval_list.empty(); }
cache_key_list_or_empty
{
LEX *lex=Lex;
SELECT_LEX *sel= &lex->select_lex;
sel->use_index= sel->interval_list;
sel->use_index_ptr= &sel->use_index;
}
;
cache
_keys_spec:
keys_or_index { Select->interval_list.empty(); }
cache_key_list_or_empty
{
LEX *lex=Lex;
SELECT_LEX *sel= &lex->select_lex;
sel->use_index= sel->interval_list;
sel->use_index_ptr= &sel->use_index;
}
;
cache_key_list_or_empty:
/* empty */
...
...
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