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
f58f5bbb
Commit
f58f5bbb
authored
Nov 15, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into lmy004.:/work/mysql-5.1-bdb_region
parents
fef09121
029fb874
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
9 deletions
+38
-9
sql/ha_berkeley.cc
sql/ha_berkeley.cc
+11
-2
sql/ha_berkeley.h
sql/ha_berkeley.h
+3
-1
sql/mysqld.cc
sql/mysqld.cc
+18
-4
sql/set_var.cc
sql/set_var.cc
+6
-2
No files found.
sql/ha_berkeley.cc
View file @
f58f5bbb
...
...
@@ -78,9 +78,11 @@ const char *ha_berkeley_ext=".db";
bool
berkeley_shared_data
=
0
;
u_int32_t
berkeley_init_flags
=
DB_PRIVATE
|
DB_RECOVER
,
berkeley_env_flags
=
0
,
berkeley_lock_type
=
DB_LOCK_DEFAULT
;
ulong
berkeley_cache_size
,
berkeley_log_buffer_size
,
berkeley_log_file_size
=
0
;
ulong
berkeley_log_buffer_size
=
0
,
berkeley_log_file_size
=
0
;
ulonglong
berkeley_cache_size
=
0
;
char
*
berkeley_home
,
*
berkeley_tmpdir
,
*
berkeley_logdir
;
long
berkeley_lock_scan_time
=
0
;
ulong
berkeley_region_size
=
0
,
berkeley_cache_parts
=
1
;
ulong
berkeley_trans_retry
=
1
;
ulong
berkeley_max_lock
;
pthread_mutex_t
bdb_mutex
;
...
...
@@ -204,10 +206,17 @@ bool berkeley_init(void)
DB_VERB_DEADLOCK
|
DB_VERB_RECOVERY
,
1
);
db_env
->
set_cachesize
(
db_env
,
0
,
berkeley_cache_size
,
0
);
if
(
berkeley_cache_size
>
(
uint
)
~
0
)
db_env
->
set_cachesize
(
db_env
,
berkeley_cache_size
/
(
1024
*
1024L
*
1024L
),
berkeley_cache_size
%
(
1024L
*
1024L
*
1024L
),
berkeley_cache_parts
);
else
db_env
->
set_cachesize
(
db_env
,
0
,
berkeley_cache_size
,
berkeley_cache_parts
);
db_env
->
set_lg_max
(
db_env
,
berkeley_log_file_size
);
db_env
->
set_lg_bsize
(
db_env
,
berkeley_log_buffer_size
);
db_env
->
set_lk_detect
(
db_env
,
berkeley_lock_type
);
db_env
->
set_lg_regionmax
(
db_env
,
berkeley_region_size
);
if
(
berkeley_max_lock
)
db_env
->
set_lk_max
(
db_env
,
berkeley_max_lock
);
...
...
sql/ha_berkeley.h
View file @
f58f5bbb
...
...
@@ -163,7 +163,9 @@ extern const u_int32_t bdb_DB_PRIVATE;
extern
bool
berkeley_shared_data
;
extern
u_int32_t
berkeley_init_flags
,
berkeley_env_flags
,
berkeley_lock_type
,
berkeley_lock_types
[];
extern
ulong
berkeley_cache_size
,
berkeley_max_lock
,
berkeley_log_buffer_size
;
extern
ulong
berkeley_max_lock
,
berkeley_log_buffer_size
;
extern
ulonglong
berkeley_cache_size
;
extern
ulong
berkeley_region_size
,
berkeley_cache_parts
;
extern
char
*
berkeley_home
,
*
berkeley_tmpdir
,
*
berkeley_logdir
;
extern
long
berkeley_lock_scan_time
;
extern
TYPELIB
berkeley_lock_typelib
;
...
...
sql/mysqld.cc
View file @
f58f5bbb
...
...
@@ -394,7 +394,9 @@ extern const u_int32_t bdb_DB_TXN_NOSYNC, bdb_DB_RECOVER, bdb_DB_PRIVATE;
extern
bool
berkeley_shared_data
;
extern
u_int32_t
berkeley_init_flags
,
berkeley_env_flags
,
berkeley_lock_type
,
berkeley_lock_types
[];
extern
ulong
berkeley_cache_size
,
berkeley_max_lock
,
berkeley_log_buffer_size
;
extern
ulong
berkeley_max_lock
,
berkeley_log_buffer_size
;
extern
ulonglong
berkeley_cache_size
;
extern
ulong
berkeley_region_size
,
berkeley_cache_parts
;
extern
char
*
berkeley_home
,
*
berkeley_tmpdir
,
*
berkeley_logdir
;
extern
long
berkeley_lock_scan_time
;
extern
TYPELIB
berkeley_lock_typelib
;
...
...
@@ -4582,8 +4584,10 @@ enum options_mysqld
OPT_INNODB_CONCURRENCY_TICKETS
,
OPT_INNODB_THREAD_SLEEP_DELAY
,
OPT_BDB_CACHE_SIZE
,
OPT_BDB_CACHE_PARTS
,
OPT_BDB_LOG_BUFFER_SIZE
,
OPT_BDB_MAX_LOCK
,
OPT_BDB_REGION_SIZE
,
OPT_ERROR_LOG_FILE
,
OPT_DEFAULT_WEEK_FORMAT
,
OPT_RANGE_ALLOC_BLOCK_SIZE
,
OPT_ALLOW_SUSPICIOUS_UDFS
,
...
...
@@ -5398,8 +5402,12 @@ log and this option does nothing anymore.",
#ifdef WITH_BERKELEY_STORAGE_ENGINE
{
"bdb_cache_size"
,
OPT_BDB_CACHE_SIZE
,
"The buffer that is allocated to cache index and rows for BDB tables."
,
(
gptr
*
)
&
berkeley_cache_size
,
(
gptr
*
)
&
berkeley_cache_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
KEY_CACHE_SIZE
,
20
*
1024
,
(
long
)
~
0
,
0
,
IO_SIZE
,
0
},
(
gptr
*
)
&
berkeley_cache_size
,
(
gptr
*
)
&
berkeley_cache_size
,
0
,
GET_ULL
,
REQUIRED_ARG
,
KEY_CACHE_SIZE
,
20
*
1024
,
(
ulonglong
)
~
0
,
0
,
IO_SIZE
,
0
},
{
"bdb_cache_parts"
,
OPT_BDB_CACHE_PARTS
,
"Number of parts to use for BDB cache."
,
(
gptr
*
)
&
berkeley_cache_parts
,
(
gptr
*
)
&
berkeley_cache_parts
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
1
,
1
,
1024
,
0
,
1
,
0
},
/* QQ: The following should be removed soon! (bdb_max_lock preferred) */
{
"bdb_lock_max"
,
OPT_BDB_MAX_LOCK
,
"Synonym for bdb_max_lock."
,
(
gptr
*
)
&
berkeley_max_lock
,
(
gptr
*
)
&
berkeley_max_lock
,
0
,
GET_ULONG
,
...
...
@@ -5412,6 +5420,10 @@ log and this option does nothing anymore.",
"The maximum number of locks you can have active on a BDB table."
,
(
gptr
*
)
&
berkeley_max_lock
,
(
gptr
*
)
&
berkeley_max_lock
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
10000
,
0
,
(
long
)
~
0
,
0
,
1
,
0
},
{
"bdb_region_size"
,
OPT_BDB_REGION_SIZE
,
"The size of the underlying logging area of the Berkeley DB environment."
,
(
gptr
*
)
&
berkeley_region_size
,
(
gptr
*
)
&
berkeley_region_size
,
0
,
GET_ULONG
,
OPT_ARG
,
60
*
1024L
,
60
*
1024L
,
(
long
)
~
0
,
0
,
1
,
0
},
#endif
/* WITH_BERKELEY_STORAGE_ENGINE */
{
"binlog_cache_size"
,
OPT_BINLOG_CACHE_SIZE
,
"The size of the cache to hold the SQL statements for the binary log during a transaction. If you often use big, multi-statement transactions you can increase this to get more performance."
,
...
...
@@ -7410,7 +7422,9 @@ SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO;
#ifndef WITH_BERKELEY_STORAGE_ENGINE
bool
berkeley_shared_data
;
ulong
berkeley_cache_size
,
berkeley_max_lock
,
berkeley_log_buffer_size
;
ulong
berkeley_max_lock
,
berkeley_log_buffer_size
;
ulonglong
berkeley_cache_size
,
ulong
berkeley_region_size
,
berkeley_cache_parts
;
char
*
berkeley_home
,
*
berkeley_tmpdir
,
*
berkeley_logdir
;
#endif
...
...
sql/set_var.cc
View file @
f58f5bbb
...
...
@@ -61,7 +61,9 @@
/* WITH_BERKELEY_STORAGE_ENGINE */
extern
bool
berkeley_shared_data
;
extern
ulong
berkeley_cache_size
,
berkeley_max_lock
,
berkeley_log_buffer_size
;
extern
ulong
berkeley_max_lock
,
berkeley_log_buffer_size
;
extern
ulonglong
berkeley_cache_size
;
extern
ulong
berkeley_region_size
,
berkeley_cache_parts
;
extern
char
*
berkeley_home
,
*
berkeley_tmpdir
,
*
berkeley_logdir
;
/* WITH_INNOBASE_STORAGE_ENGINE */
...
...
@@ -622,11 +624,13 @@ struct show_var_st init_vars[]= {
{
sys_automatic_sp_privileges
.
name
,(
char
*
)
&
sys_automatic_sp_privileges
,
SHOW_SYS
},
{
"back_log"
,
(
char
*
)
&
back_log
,
SHOW_LONG
},
{
"basedir"
,
mysql_home
,
SHOW_CHAR
},
{
"bdb_cache_size"
,
(
char
*
)
&
berkeley_cache_size
,
SHOW_LONG
},
{
"bdb_cache_size"
,
(
char
*
)
&
berkeley_cache_size
,
SHOW_LONGLONG
},
{
"bdb_cache_parts"
,
(
char
*
)
&
berkeley_cache_parts
,
SHOW_LONG
},
{
"bdb_home"
,
(
char
*
)
&
berkeley_home
,
SHOW_CHAR_PTR
},
{
"bdb_log_buffer_size"
,
(
char
*
)
&
berkeley_log_buffer_size
,
SHOW_LONG
},
{
"bdb_logdir"
,
(
char
*
)
&
berkeley_logdir
,
SHOW_CHAR_PTR
},
{
"bdb_max_lock"
,
(
char
*
)
&
berkeley_max_lock
,
SHOW_LONG
},
{
"bdb_region_size"
,
(
char
*
)
&
berkeley_region_size
,
SHOW_LONG
},
{
"bdb_shared_data"
,
(
char
*
)
&
berkeley_shared_data
,
SHOW_BOOL
},
{
"bdb_tmpdir"
,
(
char
*
)
&
berkeley_tmpdir
,
SHOW_CHAR_PTR
},
{
sys_binlog_cache_size
.
name
,(
char
*
)
&
sys_binlog_cache_size
,
SHOW_SYS
},
...
...
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