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
f1a176d7
Commit
f1a176d7
authored
Jul 29, 2002
by
paul@teton.kitebird.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge paul@work.mysql.com:/home/bk/mysql-4.0
into teton.kitebird.com:/home/paul/mysql-4.0
parents
f6afbb5d
721928ca
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
11 deletions
+46
-11
Build-tools/Do-compile
Build-tools/Do-compile
+1
-1
Docs/manual.texi
Docs/manual.texi
+9
-7
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+16
-0
mysql-test/t/query_cache.test
mysql-test/t/query_cache.test
+16
-0
sql/set_var.cc
sql/set_var.cc
+1
-1
sql/sql_cache.cc
sql/sql_cache.cc
+3
-2
No files found.
Build-tools/Do-compile
View file @
f1a176d7
...
@@ -12,7 +12,7 @@ GetOptions("Information","help","distribution=s","user=s","result=s","delete","n
...
@@ -12,7 +12,7 @@ GetOptions("Information","help","distribution=s","user=s","result=s","delete","n
usage
()
if
(
$opt_help
||
$opt_Information
);
usage
()
if
(
$opt_help
||
$opt_Information
);
usage
()
if
(
!
$opt_distribution
);
usage
()
if
(
!
$opt_distribution
);
if
(
(
$opt_innodb
||
$opt_bdb
)
&&
$opt_version_suffix
eq
"")
if
(
$opt_bdb
&&
$opt_version_suffix
eq
"")
{
{
$opt_version_suffix
=
"
-max
";
$opt_version_suffix
=
"
-max
";
}
}
...
...
Docs/manual.texi
View file @
f1a176d7
...
@@ -19815,7 +19815,7 @@ MyISAM uses special tree-like cache to make bulk inserts (that is,
...
@@ -19815,7 +19815,7 @@ MyISAM uses special tree-like cache to make bulk inserts (that is,
@code{INSERT ... SELECT}, @code{INSERT ... VALUES (...), (...), ...}, and
@code{INSERT ... SELECT}, @code{INSERT ... VALUES (...), (...), ...}, and
@code{LOAD DATA INFILE}) faster. This variable limits
@code{LOAD DATA INFILE}) faster. This variable limits
the size of the cache tree in bytes per thread. Setting it to 0
the size of the cache tree in bytes per thread. Setting it to 0
will disable this optimi
z
ation.
will disable this optimi
s
ation.
@strong{Note}: this cache is only used when adding data to non-empty table.
@strong{Note}: this cache is only used when adding data to non-empty table.
Default value is 8 MB.
Default value is 8 MB.
...
@@ -20324,7 +20324,7 @@ example an @code{ALTER TABLE} or a @code{LOCK TABLE} can prevent opening
...
@@ -20324,7 +20324,7 @@ example an @code{ALTER TABLE} or a @code{LOCK TABLE} can prevent opening
a table until the command is finished.
a table until the command is finished.
@item @code{Removing duplicates}
@item @code{Removing duplicates}
The query was using @code{SELECT DISTINCT} in such a way that MySQL
The query was using @code{SELECT DISTINCT} in such a way that MySQL
couldn't optimi
z
e that distinct away at an early stage. Because of this
couldn't optimi
s
e that distinct away at an early stage. Because of this
MySQL has to do an extra stage to remove all duplicated rows before
MySQL has to do an extra stage to remove all duplicated rows before
sending the result to the client.
sending the result to the client.
@item @code{Reopen table}
@item @code{Reopen table}
...
@@ -26013,7 +26013,7 @@ the sort-key) is written to a result file.
...
@@ -26013,7 +26013,7 @@ the sort-key) is written to a result file.
@item
@item
Now the code in @file{sql/records.cc} will be used to read through them
Now the code in @file{sql/records.cc} will be used to read through them
in sorted order by using the row pointers in the result file. To
in sorted order by using the row pointers in the result file. To
optimi
z
e this, we read in a big block of row pointers, sort these and
optimi
s
e this, we read in a big block of row pointers, sort these and
then we read the rows in the sorted order into a row buffer
then we read the rows in the sorted order into a row buffer
(@code{record_rnd_buffer}) .
(@code{record_rnd_buffer}) .
@end itemize
@end itemize
...
@@ -26163,7 +26163,7 @@ Execute a @code{FLUSH TABLES} statement or the shell command @code{mysqladmin
...
@@ -26163,7 +26163,7 @@ Execute a @code{FLUSH TABLES} statement or the shell command @code{mysqladmin
flush-tables}.
flush-tables}.
@end enumerate
@end enumerate
Note that @code{LOAD DATA INFILE} also does the above optimi
z
ation if
Note that @code{LOAD DATA INFILE} also does the above optimi
s
ation if
you insert into an empty table; the main difference with the above
you insert into an empty table; the main difference with the above
procedure is that you can let myisamchk allocate much more temporary
procedure is that you can let myisamchk allocate much more temporary
memory for the index creation that you may want MySQL to allocate for
memory for the index creation that you may want MySQL to allocate for
...
@@ -26872,7 +26872,7 @@ In the first statement, the @code{LIKE} value begins with a wildcard
...
@@ -26872,7 +26872,7 @@ In the first statement, the @code{LIKE} value begins with a wildcard
character. In the second statement, the @code{LIKE} value is not a
character. In the second statement, the @code{LIKE} value is not a
constant.
constant.
MySQL 4.0 does another optimi
z
ation on @code{LIKE}. If you use
MySQL 4.0 does another optimi
s
ation on @code{LIKE}. If you use
@code{... LIKE "%string%"} and @code{string} is longer than 3 characters,
@code{... LIKE "%string%"} and @code{string} is longer than 3 characters,
MySQL will use the @code{Turbo Boyer-Moore} algorithm to initialise the
MySQL will use the @code{Turbo Boyer-Moore} algorithm to initialise the
pattern for the string and then use this pattern to perform the search
pattern for the string and then use this pattern to perform the search
...
@@ -34475,13 +34475,13 @@ A designated table handler is allocated for the thread in @code{HANDLER open}.
...
@@ -34475,13 +34475,13 @@ A designated table handler is allocated for the thread in @code{HANDLER open}.
@item
@item
There is less parsing involved.
There is less parsing involved.
@item
@item
No optimi
z
er and no query checking overhead.
No optimi
s
er and no query checking overhead.
@item
@item
The used table doesn't have to be locked between two handler requests.
The used table doesn't have to be locked between two handler requests.
@item
@item
The handler interface doesn't have to provide a consistent look of the
The handler interface doesn't have to provide a consistent look of the
data (for example dirty-reads are allow), which allows the table handler
data (for example dirty-reads are allow), which allows the table handler
to do optimi
z
ations that SQL doesn't normally allow.
to do optimi
s
ations that SQL doesn't normally allow.
@end itemize
@end itemize
@item
@item
It makes it much easier to port applications that uses an ISAM like
It makes it much easier to port applications that uses an ISAM like
...
@@ -50065,6 +50065,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
...
@@ -50065,6 +50065,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@itemize @bullet
@item
@item
Fixed bug in query cache initialisation with very small query cache size.
@item
Allow @code{DEFAULT} with @code{INSERT} statement.
Allow @code{DEFAULT} with @code{INSERT} statement.
@item
@item
The startup parameters @code{myisam_max_extra_sort_file_size} and
The startup parameters @code{myisam_max_extra_sort_file_size} and
mysql-test/r/query_cache.result
View file @
f1a176d7
...
@@ -490,3 +490,19 @@ drop table t1;
...
@@ -490,3 +490,19 @@ drop table t1;
show status like "Qcache_queries_in_cache";
show status like "Qcache_queries_in_cache";
Variable_name Value
Variable_name Value
Qcache_queries_in_cache 0
Qcache_queries_in_cache 0
set GLOBAL query_cache_size=1000;
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 0
set GLOBAL query_cache_size=1100;
set GLOBAL query_cache_size=1200;
set GLOBAL query_cache_size=1300;
set GLOBAL query_cache_size=1400;
set GLOBAL query_cache_size=1500;
set GLOBAL query_cache_size=1600;
set GLOBAL query_cache_size=1700;
set GLOBAL query_cache_size=1800;
set GLOBAL query_cache_size=1900;
show global variables like "query_cache_size";
Variable_name Value
query_cache_size 1024
mysql-test/t/query_cache.test
View file @
f1a176d7
...
@@ -336,3 +336,19 @@ select a from t1;
...
@@ -336,3 +336,19 @@ select a from t1;
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_queries_in_cache"
;
drop
table
t1
;
drop
table
t1
;
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_queries_in_cache"
;
#
# Test of query cache resizing
#
set
GLOBAL
query_cache_size
=
1000
;
show
global
variables
like
"query_cache_size"
;
set
GLOBAL
query_cache_size
=
1100
;
set
GLOBAL
query_cache_size
=
1200
;
set
GLOBAL
query_cache_size
=
1300
;
set
GLOBAL
query_cache_size
=
1400
;
set
GLOBAL
query_cache_size
=
1500
;
set
GLOBAL
query_cache_size
=
1600
;
set
GLOBAL
query_cache_size
=
1700
;
set
GLOBAL
query_cache_size
=
1800
;
set
GLOBAL
query_cache_size
=
1900
;
show
global
variables
like
"query_cache_size"
;
sql/set_var.cc
View file @
f1a176d7
...
@@ -467,7 +467,7 @@ struct show_var_st init_vars[]= {
...
@@ -467,7 +467,7 @@ struct show_var_st init_vars[]= {
{
sys_read_buff_size
.
name
,
(
char
*
)
&
sys_read_buff_size
,
SHOW_SYS
},
{
sys_read_buff_size
.
name
,
(
char
*
)
&
sys_read_buff_size
,
SHOW_SYS
},
{
sys_read_rnd_buff_size
.
name
,(
char
*
)
&
sys_read_rnd_buff_size
,
SHOW_SYS
},
{
sys_read_rnd_buff_size
.
name
,(
char
*
)
&
sys_read_rnd_buff_size
,
SHOW_SYS
},
{
sys_rpl_recovery_rank
.
name
,(
char
*
)
&
sys_rpl_recovery_rank
,
SHOW_SYS
},
{
sys_rpl_recovery_rank
.
name
,(
char
*
)
&
sys_rpl_recovery_rank
,
SHOW_SYS
},
#ifdef HAVE_QUER
T
Y_CACHE
#ifdef HAVE_QUERY_CACHE
{
sys_query_cache_limit
.
name
,(
char
*
)
&
sys_query_cache_limit
,
SHOW_SYS
},
{
sys_query_cache_limit
.
name
,(
char
*
)
&
sys_query_cache_limit
,
SHOW_SYS
},
{
sys_query_cache_size
.
name
,
(
char
*
)
&
sys_query_cache_size
,
SHOW_SYS
},
{
sys_query_cache_size
.
name
,
(
char
*
)
&
sys_query_cache_size
,
SHOW_SYS
},
{
sys_query_cache_type
.
name
,
(
char
*
)
&
sys_query_cache_type
,
SHOW_SYS
},
{
sys_query_cache_type
.
name
,
(
char
*
)
&
sys_query_cache_type
,
SHOW_SYS
},
...
...
sql/sql_cache.cc
View file @
f1a176d7
...
@@ -1276,10 +1276,11 @@ ulong Query_cache::init_cache()
...
@@ -1276,10 +1276,11 @@ ulong Query_cache::init_cache()
query_cache_size
-=
additional_data_size
;
query_cache_size
-=
additional_data_size
;
STRUCT_LOCK
(
&
structure_guard_mutex
);
STRUCT_LOCK
(
&
structure_guard_mutex
);
if
(
query_cache
_size
<=
min_allocation_unit
)
if
(
max_mem_bin
_size
<=
min_allocation_unit
)
{
{
DBUG_PRINT
(
"qcache"
,
DBUG_PRINT
(
"qcache"
,
(
" query_cache_size <= min_allocation_unit => cache disabled"
));
(
" max bin size (%lu) <= min_allocation_unit => cache disabled"
,
max_mem_bin_size
));
STRUCT_UNLOCK
(
&
structure_guard_mutex
);
STRUCT_UNLOCK
(
&
structure_guard_mutex
);
goto
err
;
goto
err
;
}
}
...
...
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