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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2225a617
Commit
2225a617
authored
Mar 20, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: fil_init(): Add the parameter hash_size.
parent
1d229939
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
45 deletions
+27
-45
ChangeLog
ChangeLog
+5
-0
fil/fil0fil.c
fil/fil0fil.c
+19
-44
include/fil0fil.h
include/fil0fil.h
+1
-0
srv/srv0start.c
srv/srv0start.c
+2
-1
No files found.
ChangeLog
View file @
2225a617
...
@@ -9,6 +9,11 @@
...
@@ -9,6 +9,11 @@
* data/data0type.c, handler/ha_innodb.cc, include/ha_prototypes.h:
* data/data0type.c, handler/ha_innodb.cc, include/ha_prototypes.h:
Declare innobase_get_at_most_n_mbchars() in ha_prototypes.h.
Declare innobase_get_at_most_n_mbchars() in ha_prototypes.h.
2009-03-20 The InnoDB Team
* fil/fil0fil.h, fil/fil0fil.c, srv/srv0start.c:
Add the parameter hash_size to fil_init().
2009-03-20 The InnoDB Team
2009-03-20 The InnoDB Team
* fil/fil0fil.c:
* fil/fil0fil.c:
...
...
fil/fil0fil.c
View file @
2225a617
...
@@ -1457,63 +1457,38 @@ fil_check_adress_in_tablespace(
...
@@ -1457,63 +1457,38 @@ fil_check_adress_in_tablespace(
}
}
/********************************************************************
/********************************************************************
Creates a the tablespace memory cache. */
Initializes the tablespace memory cache. */
static
UNIV_INTERN
fil_system_t
*
void
fil_system_create
(
fil_init
(
/*==============*/
/*=====*/
/* out, own: tablespace memory cache */
ulint
hash_size
,
/* in: hash table size */
ulint
hash_size
,
/* in: hash table size */
ulint
max_n_open
)
/* in: maximum number of open files; must be
ulint
max_n_open
)
/* in: max number of open files */
> 10 */
{
{
fil_system_t
*
system
;
ut_a
(
fil_system
==
NULL
)
;
ut_a
(
hash_size
>
0
);
ut_a
(
hash_size
>
0
);
ut_a
(
max_n_open
>
0
);
ut_a
(
max_n_open
>
0
);
system
=
mem_alloc
(
sizeof
(
fil_system_t
));
fil_system
=
mem_alloc
(
sizeof
(
fil_system_t
));
mutex_create
(
&
system
->
mutex
,
SYNC_ANY_LATCH
);
system
->
spaces
=
hash_create
(
hash_size
);
system
->
name_hash
=
hash_create
(
hash_size
);
UT_LIST_INIT
(
system
->
LRU
);
system
->
n_open
=
0
;
system
->
max_n_open
=
max_n_open
;
system
->
modification_counter
=
0
;
mutex_create
(
&
fil_system
->
mutex
,
SYNC_ANY_LATCH
);
system
->
max_assigned_id
=
0
;
system
->
tablespace_version
=
0
;
fil_system
->
spaces
=
hash_create
(
hash_size
);
fil_system
->
name_hash
=
hash_create
(
hash_size
);
UT_LIST_INIT
(
system
->
unflushed_spaces
);
UT_LIST_INIT
(
fil_system
->
LRU
);
UT_LIST_INIT
(
system
->
space_list
);
return
(
system
)
;
fil_system
->
n_open
=
0
;
}
fil_system
->
max_n_open
=
max_n_open
;
/********************************************************************
fil_system
->
modification_counter
=
0
;
Initializes the tablespace memory cache. */
fil_system
->
max_assigned_id
=
0
;
UNIV_INTERN
void
fil_init
(
/*=====*/
ulint
max_n_open
)
/* in: max number of open files */
{
ulint
hash_size
;
ut_a
(
fil_system
==
NULL
);
if
(
srv_file_per_table
)
{
fil_system
->
tablespace_version
=
0
;
hash_size
=
50000
;
}
else
{
hash_size
=
5000
;
}
fil_system
=
fil_system_create
(
hash_size
,
max_n_open
);
UT_LIST_INIT
(
fil_system
->
unflushed_spaces
);
UT_LIST_INIT
(
fil_system
->
space_list
);
}
}
/***********************************************************************
/***********************************************************************
...
...
include/fil0fil.h
View file @
2225a617
...
@@ -263,6 +263,7 @@ UNIV_INTERN
...
@@ -263,6 +263,7 @@ UNIV_INTERN
void
void
fil_init
(
fil_init
(
/*=====*/
/*=====*/
ulint
hash_size
,
/* in: hash table size */
ulint
max_n_open
);
/* in: max number of open files */
ulint
max_n_open
);
/* in: max number of open files */
/***********************************************************************
/***********************************************************************
Opens all log files and system tablespace data files. They stay open until the
Opens all log files and system tablespace data files. They stay open until the
...
...
srv/srv0start.c
View file @
2225a617
...
@@ -1273,7 +1273,8 @@ innobase_start_or_create_for_mysql(void)
...
@@ -1273,7 +1273,8 @@ innobase_start_or_create_for_mysql(void)
SRV_MAX_N_PENDING_SYNC_IOS
);
SRV_MAX_N_PENDING_SYNC_IOS
);
}
}
fil_init
(
srv_max_n_open_files
);
fil_init
(
srv_file_per_table
?
50000
:
5000
,
srv_max_n_open_files
);
ret
=
buf_pool_init
();
ret
=
buf_pool_init
();
...
...
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