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
cfbdb5d2
Commit
cfbdb5d2
authored
Aug 23, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into 10.3
parents
7b492d6a
ca894897
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1041 additions
and
2562 deletions
+1041
-2562
debian/mariadb-server-10.3.postinst
debian/mariadb-server-10.3.postinst
+2
-6
storage/innobase/btr/btr0sea.cc
storage/innobase/btr/btr0sea.cc
+8
-1
storage/innobase/dict/dict0dict.cc
storage/innobase/dict/dict0dict.cc
+19
-9
storage/innobase/handler/i_s.cc
storage/innobase/handler/i_s.cc
+1007
-2518
storage/innobase/handler/i_s.h
storage/innobase/handler/i_s.h
+1
-18
storage/innobase/include/dict0mem.h
storage/innobase/include/dict0mem.h
+3
-3
storage/innobase/innodb.cmake
storage/innobase/innodb.cmake
+0
-5
storage/mroonga/CMakeLists.txt
storage/mroonga/CMakeLists.txt
+1
-2
No files found.
debian/mariadb-server-10.3.postinst
View file @
cfbdb5d2
...
...
@@ -117,7 +117,7 @@ EOF
if
[
!
-d
"
$mysql_datadir
"
-a
!
-L
"
$mysql_datadir
"
]
;
then
mkdir
"
$mysql_datadir
"
;
fi
if
[
!
-d
"
$mysql_logdir
"
-a
!
-L
"
$mysql_logdir
"
]
;
then
mkdir
"
$mysql_logdir
"
;
fi
# When creating an ext3 jounal on an already mounted filesystem like e.g.
# /var/lib/mysql, you get a .journal file that is not modif
y
able by chown.
# /var/lib/mysql, you get a .journal file that is not modif
i
able by chown.
# The mysql_statedir must not be writable by the mysql user under any
# circumstances as it contains scripts that are executed by root.
set
+e
...
...
@@ -149,10 +149,6 @@ EOF
$ERR_LOGGER
set
-e
# To avoid downgrades.
touch
$mysql_statedir
/debian-
$MAJOR_VER
.flag
## On every reconfiguration the maintenance user is recreated.
#
# - It is easier to regenerate the password every time but as people
...
...
@@ -261,7 +257,7 @@ EOF
;;
esac
db_stop
# in case invoke fail
e
s
db_stop
# in case invoke fails
# dh_systemd_start doesn't emit anything since we still ship /etc/init.d/mysql.
# Thus MariaDB server is started via init.d script, which in turn redirects to
...
...
storage/innobase/btr/btr0sea.cc
View file @
cfbdb5d2
...
...
@@ -308,6 +308,8 @@ ATTRIBUTE_COLD static void btr_search_lazy_free(dict_index_t *index)
{
ut_ad
(
index
->
freed
());
dict_table_t
*
table
=
index
->
table
;
mysql_mutex_lock
(
&
table
->
autoinc_mutex
);
/* Perform the skipped steps of dict_index_remove_from_cache_low(). */
UT_LIST_REMOVE
(
table
->
freed_indexes
,
index
);
rw_lock_free
(
&
index
->
lock
);
...
...
@@ -316,9 +318,14 @@ ATTRIBUTE_COLD static void btr_search_lazy_free(dict_index_t *index)
if
(
!
UT_LIST_GET_LEN
(
table
->
freed_indexes
)
&&
!
UT_LIST_GET_LEN
(
table
->
indexes
))
{
ut_ad
(
table
->
id
==
0
);
ut_ad
(
!
table
->
id
);
mysql_mutex_unlock
(
&
table
->
autoinc_mutex
);
mysql_mutex_destroy
(
&
table
->
autoinc_mutex
);
dict_mem_table_free
(
table
);
return
;
}
mysql_mutex_unlock
(
&
table
->
autoinc_mutex
);
}
/** Clear the adaptive hash index on all pages in the buffer pool. */
...
...
storage/innobase/dict/dict0dict.cc
View file @
cfbdb5d2
...
...
@@ -1233,6 +1233,7 @@ dict_index_t *dict_index_t::clone_if_needed()
return
this
;
dict_index_t
*
prev
=
UT_LIST_GET_PREV
(
indexes
,
this
);
mysql_mutex_lock
(
&
table
->
autoinc_mutex
);
UT_LIST_REMOVE
(
table
->
indexes
,
this
);
UT_LIST_ADD_LAST
(
table
->
freed_indexes
,
this
);
dict_index_t
*
index
=
clone
();
...
...
@@ -1241,6 +1242,7 @@ dict_index_t *dict_index_t::clone_if_needed()
UT_LIST_INSERT_AFTER
(
table
->
indexes
,
prev
,
index
);
else
UT_LIST_ADD_FIRST
(
table
->
indexes
,
index
);
mysql_mutex_unlock
(
&
table
->
autoinc_mutex
);
return
index
;
}
#endif
/* BTR_CUR_HASH_ADAPT */
...
...
@@ -1912,21 +1914,27 @@ dict_table_remove_from_cache_low(
UT_DELETE
(
table
->
vc_templ
);
}
mysql_mutex_destroy
(
&
table
->
autoinc_mutex
);
#ifdef BTR_CUR_HASH_ADAPT
if
(
UNIV_UNLIKELY
(
UT_LIST_GET_LEN
(
table
->
freed_indexes
)
!=
0
))
{
if
(
table
->
fts
)
{
fts_optimize_remove_table
(
table
);
fts_free
(
table
);
table
->
fts
=
NULL
;
}
mysql_mutex_lock
(
&
table
->
autoinc_mutex
);
ulint
freed
=
UT_LIST_GET_LEN
(
table
->
freed_indexes
);
table
->
vc_templ
=
NULL
;
table
->
id
=
0
;
mysql_mutex_unlock
(
&
table
->
autoinc_mutex
);
if
(
UNIV_UNLIKELY
(
freed
!=
0
))
{
return
;
}
#endif
/* BTR_CUR_HASH_ADAPT */
mysql_mutex_destroy
(
&
table
->
autoinc_mutex
);
dict_mem_table_free
(
table
);
}
...
...
@@ -2191,8 +2199,10 @@ dict_index_remove_from_cache_low(
zero. See also: dict_table_can_be_evicted() */
if
(
index
->
n_ahi_pages
())
{
mysql_mutex_lock
(
&
table
->
autoinc_mutex
);
index
->
set_freed
();
UT_LIST_ADD_LAST
(
table
->
freed_indexes
,
index
);
mysql_mutex_unlock
(
&
table
->
autoinc_mutex
);
return
;
}
#endif
/* BTR_CUR_HASH_ADAPT */
...
...
storage/innobase/handler/i_s.cc
View file @
cfbdb5d2
This diff is collapsed.
Click to expand it.
storage/innobase/handler/i_s.h
View file @
cfbdb5d2
...
...
@@ -92,26 +92,9 @@ do { \
} \
} while (0)
#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && !defined __INTEL_COMPILER && !defined __clang__
#ifdef HAVE_C99_INITIALIZERS
#define STRUCT_FLD(name, value) .name = value
#else
#define STRUCT_FLD(name, value) name: value
#endif
/* HAVE_C99_INITIALIZERS */
#else
#define STRUCT_FLD(name, value) value
#endif
/* Don't use a static const variable here, as some C++ compilers (notably
HPUX aCC: HP ANSI C++ B3910B A.03.65) can't handle it. */
#define END_OF_ST_FIELD_INFO \
{STRUCT_FLD(field_name, NULL), \
STRUCT_FLD(field_length, 0), \
STRUCT_FLD(field_type, MYSQL_TYPE_NULL), \
STRUCT_FLD(value, 0), \
STRUCT_FLD(field_flags, 0), \
STRUCT_FLD(old_name, ""), \
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}
#define END_OF_ST_FIELD_INFO {NULL,0,MYSQL_TYPE_NULL,0,0,"",SKIP_OPEN_TABLE}
/** Fields on INFORMATION_SCHEMA.SYS_SEMAMPHORE_WAITS table */
#define SYS_SEMAPHORE_WAITS_THREAD_ID 0
...
...
storage/innobase/include/dict0mem.h
View file @
cfbdb5d2
...
...
@@ -1881,7 +1881,8 @@ struct dict_table_t {
UT_LIST_BASE_NODE_T
(
dict_index_t
)
indexes
;
#ifdef BTR_CUR_HASH_ADAPT
/** List of detached indexes that are waiting to be freed along with
the last adaptive hash index entry */
the last adaptive hash index entry.
Protected by autoinc_mutex (sic!) */
UT_LIST_BASE_NODE_T
(
dict_index_t
)
freed_indexes
;
#endif
/* BTR_CUR_HASH_ADAPT */
...
...
@@ -2048,7 +2049,7 @@ struct dict_table_t {
from a select. */
lock_t
*
autoinc_lock
;
/** Mutex protecting the autoinc
rement counter
. */
/** Mutex protecting the autoinc
counter and freed_indexes
. */
mysql_mutex_t
autoinc_mutex
;
/** Autoinc counter value to give to the next inserted row. */
...
...
@@ -2080,7 +2081,6 @@ struct dict_table_t {
determine whether we can evict the table from the dictionary cache.
It is protected by lock_sys.mutex. */
ulint
n_rec_locks
;
private:
/** Count of how many handles are opened to this table. Dropping of the
table is NOT allowed until this count gets to zero. MySQL does NOT
...
...
storage/innobase/innodb.cmake
View file @
cfbdb5d2
...
...
@@ -204,11 +204,6 @@ ENDIF(NOT MSVC)
CHECK_FUNCTION_EXISTS
(
vasprintf HAVE_VASPRINTF
)
CHECK_CXX_SOURCE_COMPILES
(
"struct t1{ int a; char *b; }; struct t1 c= { .a=1, .b=0 }; main() { }"
HAVE_C99_INITIALIZERS
)
IF
(
HAVE_C99_INITIALIZERS
)
ADD_DEFINITIONS
(
-DHAVE_C99_INITIALIZERS
)
ENDIF
()
SET
(
MUTEXTYPE
"event"
CACHE STRING
"Mutex type: event, sys or futex"
)
IF
(
MUTEXTYPE MATCHES
"event"
)
...
...
storage/mroonga/CMakeLists.txt
View file @
cfbdb5d2
...
...
@@ -219,8 +219,7 @@ set(MYSQL_INCLUDE_DIRS
"
${
MYSQL_REGEX_INCLUDE_DIR
}
"
"
${
MYSQL_RAPIDJSON_INCLUDE_DIR
}
"
"
${
MYSQL_LIBBINLOGEVENTS_EXPORT_DIR
}
"
"
${
MYSQL_LIBBINLOGEVENTS_INCLUDE_DIR
}
"
"
${
MYSQL_SOURCE_DIR
}
"
)
"
${
MYSQL_LIBBINLOGEVENTS_INCLUDE_DIR
}
"
)
if
(
MRN_BUNDLED
)
set
(
MYSQL_PLUGIN_DIR
"
${
INSTALL_PLUGINDIR
}
"
)
...
...
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