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
57a9626f
Commit
57a9626f
authored
May 06, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
06a4193c
fd9e733a
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
114 additions
and
122 deletions
+114
-122
cmake/pcre.cmake
cmake/pcre.cmake
+3
-2
mysql-test/suite/innodb_gis/r/rtree_split.result
mysql-test/suite/innodb_gis/r/rtree_split.result
+0
-7
mysql-test/suite/innodb_gis/r/rtree_temporary.result
mysql-test/suite/innodb_gis/r/rtree_temporary.result
+14
-0
mysql-test/suite/innodb_gis/t/rtree_split.test
mysql-test/suite/innodb_gis/t/rtree_split.test
+0
-8
mysql-test/suite/innodb_gis/t/rtree_temporary.test
mysql-test/suite/innodb_gis/t/rtree_temporary.test
+18
-0
sql/sql_i_s.h
sql/sql_i_s.h
+2
-2
sql/sql_show.cc
sql/sql_show.cc
+30
-30
storage/innobase/btr/btr0btr.cc
storage/innobase/btr/btr0btr.cc
+0
-8
storage/innobase/btr/btr0cur.cc
storage/innobase/btr/btr0cur.cc
+2
-12
storage/innobase/gis/gis0rtree.cc
storage/innobase/gis/gis0rtree.cc
+10
-29
storage/innobase/include/buf0types.h
storage/innobase/include/buf0types.h
+21
-17
storage/innobase/include/gis0rtree.h
storage/innobase/include/gis0rtree.h
+3
-4
storage/innobase/include/mtr0log.h
storage/innobase/include/mtr0log.h
+5
-1
storage/innobase/row/row0ins.cc
storage/innobase/row/row0ins.cc
+6
-2
No files found.
cmake/pcre.cmake
View file @
57a9626f
...
...
@@ -43,6 +43,7 @@ MACRO(BUNDLE_PCRE2)
ENDFOREACH
()
FOREACH
(
v
""
"_DEBUG"
"_RELWITHDEBINFO"
"_RELEASE"
"_MINSIZEREL"
)
STRING
(
REPLACE
"/WX"
""
pcre2_flags
${
v
}
"
${
CMAKE_C_FLAGS
${
v
}}
"
)
SET
(
pcre2_flags
${
v
}
"
${
pcre2_flags
${
v
}}
-std=c99 "
)
IF
(
MSVC
)
# Suppress a warning
STRING
(
APPEND pcre2_flags
${
v
}
" /wd4244 "
)
...
...
@@ -53,8 +54,8 @@ MACRO(BUNDLE_PCRE2)
ExternalProject_Add
(
pcre2
PREFIX
"
${
dir
}
"
URL
"https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.
39/pcre2-10.39
.zip"
URL_MD5
e101c0ca9edb4b0af103bebe78ba52b0
URL
"https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.
40/pcre2-10.40
.zip"
URL_MD5
798698846982ce171d881ed0d7535c2a
INSTALL_COMMAND
""
CMAKE_ARGS
"-DCMAKE_WARN_DEPRECATED=FALSE"
...
...
mysql-test/suite/innodb_gis/r/rtree_split.result
View file @
57a9626f
...
...
@@ -61,10 +61,3 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1);
count(*)
57344
drop table t1;
#
# MDEV-27417 Spatial index tries to update
# change buffer bookkeeping page
#
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB;
INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366;
DROP TABLE t1;
mysql-test/suite/innodb_gis/r/rtree_temporary.result
0 → 100644
View file @
57a9626f
#
# MDEV-27417 Spatial index tries to update
# change buffer bookkeeping page
#
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB;
INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366;
DROP TABLE t1;
#
# MDEV-28478 Assertion mtr->get_log_mode() == MTR_LOG_NO_REDO
#
CREATE TEMPORARY TABLE t1 (c POINT NOT NULL,SPATIAL (c)) ENGINE=InnoDB;
INSERT INTO t1 SELECT POINT(0,0) FROM seq_1_to_366;
INSERT INTO t1 VALUES (POINT(1e-270,1e-130));
DROP TABLE t1;
mysql-test/suite/innodb_gis/t/rtree_split.test
View file @
57a9626f
...
...
@@ -73,11 +73,3 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1);
# Clean up.
drop
table
t1
;
--
echo
#
--
echo
# MDEV-27417 Spatial index tries to update
--
echo
# change buffer bookkeeping page
--
echo
#
CREATE
TEMPORARY
TABLE
t1
(
c
POINT
NOT
NULL
,
SPATIAL
(
c
))
ENGINE
=
InnoDB
;
INSERT
INTO
t1
SELECT
PointFromText
(
'POINT(0 0)'
)
FROM
seq_1_to_366
;
DROP
TABLE
t1
;
mysql-test/suite/innodb_gis/t/rtree_temporary.test
0 → 100644
View file @
57a9626f
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_sequence
.
inc
--
echo
#
--
echo
# MDEV-27417 Spatial index tries to update
--
echo
# change buffer bookkeeping page
--
echo
#
CREATE
TEMPORARY
TABLE
t1
(
c
POINT
NOT
NULL
,
SPATIAL
(
c
))
ENGINE
=
InnoDB
;
INSERT
INTO
t1
SELECT
PointFromText
(
'POINT(0 0)'
)
FROM
seq_1_to_366
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-28478 Assertion mtr->get_log_mode() == MTR_LOG_NO_REDO
--
echo
#
CREATE
TEMPORARY
TABLE
t1
(
c
POINT
NOT
NULL
,
SPATIAL
(
c
))
ENGINE
=
InnoDB
;
INSERT
INTO
t1
SELECT
POINT
(
0
,
0
)
FROM
seq_1_to_366
;
INSERT
INTO
t1
VALUES
(
POINT
(
1
e
-
270
,
1
e
-
130
));
DROP
TABLE
t1
;
sql/sql_i_s.h
View file @
57a9626f
...
...
@@ -158,10 +158,10 @@ class Longtext: public Type
};
class
Yes
no
:
public
Varchar
class
Yes
_or_empty
:
public
Varchar
{
public:
Yes
no
()
:
Varchar
(
3
)
{
}
Yes
_or_empty
()
:
Varchar
(
3
)
{
}
};
...
...
sql/sql_show.cc
View file @
57a9626f
...
...
@@ -9058,7 +9058,7 @@ ST_FIELD_INFO columns_fields_info[]=
Column
(
"ORDINAL_POSITION"
,
ULonglong
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
Column
(
"COLUMN_DEFAULT"
,
Longtext
(
MAX_FIELD_VARCHARLENGTH
),
NULLABLE
,
"Default"
,
OPEN_FRM_ONLY
),
Column
(
"IS_NULLABLE"
,
Yesno
(),
NOT_NULL
,
"Null"
,
OPEN_FRM_ONLY
),
Column
(
"IS_NULLABLE"
,
Yes_or_empty
(),
NOT_NULL
,
"Null"
,
OPEN_FRM_ONLY
),
Column
(
"DATA_TYPE"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
Column
(
"CHARACTER_MAXIMUM_LENGTH"
,
ULonglong
(),
NULLABLE
,
OPEN_FRM_ONLY
),
Column
(
"CHARACTER_OCTET_LENGTH"
,
ULonglong
(),
NULLABLE
,
OPEN_FRM_ONLY
),
...
...
@@ -9095,8 +9095,8 @@ ST_FIELD_INFO collation_fields_info[]=
Column
(
"COLLATION_NAME"
,
CSName
(),
NOT_NULL
,
"Collation"
),
Column
(
"CHARACTER_SET_NAME"
,
CSName
(),
NOT_NULL
,
"Charset"
),
Column
(
"ID"
,
SLonglong
(
MY_INT32_NUM_DECIMAL_DIGITS
),
NOT_NULL
,
"Id"
),
Column
(
"IS_DEFAULT"
,
Yesno
(),
NOT_NULL
,
"Default"
),
Column
(
"IS_COMPILED"
,
Yesno
(),
NOT_NULL
,
"Compiled"
),
Column
(
"IS_DEFAULT"
,
Yes_or_empty
(),
NOT_NULL
,
"Default"
),
Column
(
"IS_COMPILED"
,
Yes_or_empty
(),
NOT_NULL
,
"Compiled"
),
Column
(
"SORTLEN"
,
SLonglong
(
3
),
NOT_NULL
,
"Sortlen"
),
CEnd
()
};
...
...
@@ -9104,10 +9104,10 @@ ST_FIELD_INFO collation_fields_info[]=
ST_FIELD_INFO
applicable_roles_fields_info
[]
=
{
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"ROLE_NAME"
,
Varchar
(
USERNAME_CHAR_LENGTH
),
NOT_NULL
),
Column
(
"IS_GRANTABLE"
,
Yes
no
(),
NOT_NULL
),
Column
(
"IS_DEFAULT"
,
Yes
no
(),
NULLABLE
),
Column
(
"IS_GRANTABLE"
,
Yes
_or_empty
(),
NOT_NULL
),
Column
(
"IS_DEFAULT"
,
Yes
_or_empty
(),
NULLABLE
),
CEnd
()
};
...
...
@@ -9251,7 +9251,7 @@ ST_FIELD_INFO view_fields_info[]=
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
Column
(
"VIEW_DEFINITION"
,
Longtext
(
65535
),
NOT_NULL
,
OPEN_FRM_ONLY
),
Column
(
"CHECK_OPTION"
,
Varchar
(
8
),
NOT_NULL
,
OPEN_FRM_ONLY
),
Column
(
"IS_UPDATABLE"
,
Yesno
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
Column
(
"IS_UPDATABLE"
,
Yes_or_empty
(),
NOT_NULL
,
OPEN_FULL_TABLE
),
Column
(
"DEFINER"
,
Definer
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
Column
(
"SECURITY_TYPE"
,
Varchar
(
7
),
NOT_NULL
,
OPEN_FRM_ONLY
),
Column
(
"CHARACTER_SET_CLIENT"
,
CSName
(),
NOT_NULL
,
OPEN_FRM_ONLY
),
...
...
@@ -9263,46 +9263,46 @@ ST_FIELD_INFO view_fields_info[]=
ST_FIELD_INFO
user_privileges_fields_info
[]
=
{
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
),
Column
(
"IS_GRANTABLE"
,
Yes
no
(),
NOT_NULL
),
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
),
Column
(
"IS_GRANTABLE"
,
Yes
_or_empty
(),
NOT_NULL
),
CEnd
()
};
ST_FIELD_INFO
schema_privileges_fields_info
[]
=
{
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
),
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
),
Column
(
"IS_GRANTABLE"
,
Yes
no
(),
NOT_NULL
),
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
),
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
),
Column
(
"IS_GRANTABLE"
,
Yes
_or_empty
(),
NOT_NULL
),
CEnd
()
};
ST_FIELD_INFO
table_privileges_fields_info
[]
=
{
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
),
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
),
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
),
Column
(
"IS_GRANTABLE"
,
Yes
no
(),
NOT_NULL
),
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
),
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
),
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
),
Column
(
"IS_GRANTABLE"
,
Yes
_or_empty
(),
NOT_NULL
),
CEnd
()
};
ST_FIELD_INFO
column_privileges_fields_info
[]
=
{
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
),
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
),
Column
(
"COLUMN_NAME"
,
Name
(),
NOT_NULL
),
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
),
Column
(
"IS_GRANTABLE"
,
Yes
no
(),
NOT_NULL
),
Column
(
"GRANTEE"
,
Userhost
(),
NOT_NULL
),
Column
(
"TABLE_CATALOG"
,
Catalog
(),
NOT_NULL
),
Column
(
"TABLE_SCHEMA"
,
Name
(),
NOT_NULL
),
Column
(
"TABLE_NAME"
,
Name
(),
NOT_NULL
),
Column
(
"COLUMN_NAME"
,
Name
(),
NOT_NULL
),
Column
(
"PRIVILEGE_TYPE"
,
Name
(),
NOT_NULL
),
Column
(
"IS_GRANTABLE"
,
Yes
_or_empty
(),
NOT_NULL
),
CEnd
()
};
...
...
@@ -9443,7 +9443,7 @@ ST_FIELD_INFO sysvars_fields_info[]=
Column
(
"NUMERIC_MAX_VALUE"
,
Varchar
(
MY_INT64_NUM_DECIMAL_DIGITS
),
NULLABLE
),
Column
(
"NUMERIC_BLOCK_SIZE"
,
Varchar
(
MY_INT64_NUM_DECIMAL_DIGITS
),
NULLABLE
),
Column
(
"ENUM_VALUE_LIST"
,
Longtext
(
65535
),
NULLABLE
),
Column
(
"READ_ONLY"
,
Yes
no
(),
NOT_NULL
),
Column
(
"READ_ONLY"
,
Yes
_or_empty
(),
NOT_NULL
),
Column
(
"COMMAND_LINE_ARGUMENT"
,
Name
(),
NULLABLE
),
Column
(
"GLOBAL_VALUE_PATH"
,
Varchar
(
2048
),
NULLABLE
),
CEnd
()
...
...
storage/innobase/btr/btr0btr.cc
View file @
57a9626f
...
...
@@ -3530,17 +3530,9 @@ btr_compress(
}
if
(
mbr_changed
)
{
#ifdef UNIV_DEBUG
bool
success
=
rtr_update_mbr_field
(
&
cursor2
,
offsets2
,
&
father_cursor
,
merge_page
,
&
new_mbr
,
NULL
,
mtr
);
ut_ad
(
success
);
#else
rtr_update_mbr_field
(
&
cursor2
,
offsets2
,
&
father_cursor
,
merge_page
,
&
new_mbr
,
NULL
,
mtr
);
#endif
}
else
{
rtr_node_ptr_delete
(
&
father_cursor
,
mtr
);
}
...
...
storage/innobase/btr/btr0cur.cc
View file @
57a9626f
...
...
@@ -5811,7 +5811,6 @@ btr_cur_pessimistic_delete(
rec_t
*
father_rec
;
btr_cur_t
father_cursor
;
rec_offs
*
offsets
;
bool
upd_ret
;
ulint
len
;
rtr_page_get_father_block
(
NULL
,
heap
,
index
,
...
...
@@ -5825,17 +5824,8 @@ btr_cur_pessimistic_delete(
rtr_read_mbr
(
rec_get_nth_field
(
father_rec
,
offsets
,
0
,
&
len
),
&
father_mbr
);
upd_ret
=
rtr_update_mbr_field
(
&
father_cursor
,
offsets
,
NULL
,
page
,
&
father_mbr
,
next_rec
,
mtr
);
if
(
!
upd_ret
)
{
*
err
=
DB_ERROR
;
mem_heap_free
(
heap
);
return
(
FALSE
);
}
rtr_update_mbr_field
(
&
father_cursor
,
offsets
,
NULL
,
page
,
&
father_mbr
,
next_rec
,
mtr
);
ut_d
(
parent_latched
=
true
);
}
else
{
/* Otherwise, if we delete the leftmost node pointer
...
...
storage/innobase/gis/gis0rtree.cc
View file @
57a9626f
/*****************************************************************************
Copyright (c) 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 201
8, 2021
, MariaDB Corporation.
Copyright (c) 201
9, 2022
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -185,9 +185,8 @@ rtr_index_build_node_ptr(
}
/**************************************************************//**
Update the mbr field of a spatial index row.
@return true if update is successful */
bool
Update the mbr field of a spatial index row. */
void
rtr_update_mbr_field
(
/*=================*/
btr_cur_t
*
cursor
,
/*!< in/out: cursor pointed to rec.*/
...
...
@@ -535,8 +534,6 @@ rtr_update_mbr_field(
page_is_comp
(
page
))));
mem_heap_free
(
heap
);
return
(
true
);
}
/**************************************************************//**
...
...
@@ -1262,12 +1259,8 @@ rtr_ins_enlarge_mbr(
page
=
buf_block_get_frame
(
block
);
/* Update the mbr field of the rec. */
if
(
!
rtr_update_mbr_field
(
&
cursor
,
offsets
,
NULL
,
page
,
&
new_mbr
,
NULL
,
mtr
))
{
err
=
DB_ERROR
;
break
;
}
rtr_update_mbr_field
(
&
cursor
,
offsets
,
NULL
,
page
,
&
new_mbr
,
NULL
,
mtr
);
page_cursor
=
btr_cur_get_page_cur
(
&
cursor
);
block
=
page_cur_get_block
(
page_cursor
);
}
...
...
@@ -1577,7 +1570,7 @@ rtr_merge_mbr_changed(
/****************************************************************//**
Merge 2 mbrs and update the the mbr that cursor is on. */
dberr_t
void
rtr_merge_and_update_mbr
(
/*=====================*/
btr_cur_t
*
cursor
,
/*!< in/out: cursor */
...
...
@@ -1587,27 +1580,15 @@ rtr_merge_and_update_mbr(
page_t
*
child_page
,
/*!< in: the page. */
mtr_t
*
mtr
)
/*!< in: mtr */
{
dberr_t
err
=
DB_SUCCESS
;
rtr_mbr_t
new_mbr
;
bool
changed
=
false
;
ut_ad
(
dict_index_is_spatial
(
cursor
->
index
));
changed
=
rtr_merge_mbr_changed
(
cursor
,
cursor2
,
offsets
,
offsets2
,
&
new_mbr
);
/* Update the mbr field of the rec. And will delete the record
pointed by cursor2 */
if
(
changed
)
{
if
(
!
rtr_update_mbr_field
(
cursor
,
offsets
,
cursor2
,
child_page
,
&
new_mbr
,
NULL
,
mtr
))
{
err
=
DB_ERROR
;
}
if
(
rtr_merge_mbr_changed
(
cursor
,
cursor2
,
offsets
,
offsets2
,
&
new_mbr
))
{
rtr_update_mbr_field
(
cursor
,
offsets
,
cursor2
,
child_page
,
&
new_mbr
,
NULL
,
mtr
);
}
else
{
rtr_node_ptr_delete
(
cursor2
,
mtr
);
}
return
(
err
);
}
/*************************************************************//**
...
...
storage/innobase/include/buf0types.h
View file @
57a9626f
...
...
@@ -89,22 +89,25 @@ this must be equal to srv_page_size */
class
page_id_t
{
public:
/** Constructor from (space, page_no).
@param[in] space tablespace id
@param[in] page_no page number */
page_id_t
(
ulint
space
,
uint32_t
page_no
)
:
m_id
(
uint64_t
{
space
}
<<
32
|
page_no
)
{
ut_ad
(
space
<=
0xFFFFFFFFU
);
}
page_id_t
(
uint64_t
id
)
:
m_id
(
id
)
{}
bool
operator
==
(
const
page_id_t
&
rhs
)
const
{
return
m_id
==
rhs
.
m_id
;
}
bool
operator
!=
(
const
page_id_t
&
rhs
)
const
{
return
m_id
!=
rhs
.
m_id
;
}
bool
operator
<
(
const
page_id_t
&
rhs
)
const
{
return
m_id
<
rhs
.
m_id
;
}
bool
operator
>
(
const
page_id_t
&
rhs
)
const
{
return
m_id
>
rhs
.
m_id
;
}
bool
operator
<=
(
const
page_id_t
&
rhs
)
const
{
return
m_id
<=
rhs
.
m_id
;
}
bool
operator
>=
(
const
page_id_t
&
rhs
)
const
{
return
m_id
>=
rhs
.
m_id
;
}
constexpr
page_id_t
(
ulint
space
,
uint32_t
page_no
)
:
m_id
(
uint64_t
{
space
}
<<
32
|
page_no
)
{}
constexpr
page_id_t
(
uint64_t
id
)
:
m_id
(
id
)
{}
constexpr
bool
operator
==
(
const
page_id_t
&
rhs
)
const
{
return
m_id
==
rhs
.
m_id
;
}
constexpr
bool
operator
!=
(
const
page_id_t
&
rhs
)
const
{
return
m_id
!=
rhs
.
m_id
;
}
constexpr
bool
operator
<
(
const
page_id_t
&
rhs
)
const
{
return
m_id
<
rhs
.
m_id
;
}
constexpr
bool
operator
>
(
const
page_id_t
&
rhs
)
const
{
return
m_id
>
rhs
.
m_id
;
}
constexpr
bool
operator
<=
(
const
page_id_t
&
rhs
)
const
{
return
m_id
<=
rhs
.
m_id
;
}
constexpr
bool
operator
>=
(
const
page_id_t
&
rhs
)
const
{
return
m_id
>=
rhs
.
m_id
;
}
page_id_t
&
operator
--
()
{
ut_ad
(
page_no
());
m_id
--
;
return
*
this
;
}
page_id_t
&
operator
++
()
{
...
...
@@ -125,15 +128,16 @@ class page_id_t
/** Retrieve the tablespace id.
@return tablespace id */
uint32_t
space
()
const
{
return
static_cast
<
uint32_t
>
(
m_id
>>
32
);
}
constexpr
uint32_t
space
()
const
{
return
static_cast
<
uint32_t
>
(
m_id
>>
32
);
}
/** Retrieve the page number.
@return page number */
uint32_t
page_no
()
const
{
return
static_cast
<
uint32_t
>
(
m_id
);
}
constexpr
uint32_t
page_no
()
const
{
return
static_cast
<
uint32_t
>
(
m_id
);
}
/** Retrieve the fold value.
@return fold value */
ulint
fold
()
const
{
return
(
ulint
{
space
()}
<<
20
)
+
space
()
+
page_no
();
}
constexpr
ulint
fold
()
const
{
return
(
ulint
{
space
()}
<<
20
)
+
space
()
+
page_no
();
}
/** Reset the page number only.
@param[in] page_no page number */
...
...
@@ -142,7 +146,7 @@ class page_id_t
m_id
=
(
m_id
&
~
uint64_t
{
0
}
<<
32
)
|
page_no
;
}
ulonglong
raw
()
{
return
m_id
;
}
constexpr
ulonglong
raw
()
{
return
m_id
;
}
private:
/** The page identifier */
...
...
storage/innobase/include/gis0rtree.h
View file @
57a9626f
...
...
@@ -372,7 +372,7 @@ rtr_page_copy_rec_list_start_no_locks(
/****************************************************************//**
Merge 2 mbrs and update the the mbr that cursor is on. */
dberr_t
void
rtr_merge_and_update_mbr
(
/*=====================*/
btr_cur_t
*
cursor
,
/*!< in/out: cursor */
...
...
@@ -404,9 +404,8 @@ rtr_merge_mbr_changed(
/**************************************************************//**
Update the mbr field of a spatial index row.
@return true if successful */
bool
Update the mbr field of a spatial index row. */
void
rtr_update_mbr_field
(
/*=================*/
btr_cur_t
*
cursor
,
/*!< in: cursor pointed to rec.*/
...
...
storage/innobase/include/mtr0log.h
View file @
57a9626f
/*****************************************************************************
Copyright (c) 2019, 202
1
, MariaDB Corporation.
Copyright (c) 2019, 202
2
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -24,6 +24,9 @@ Mini-transaction log record encoding and decoding
#pragma once
#include "mtr0mtr.h"
/** The smallest invalid page identifier for persistent tablespaces */
constexpr
page_id_t
end_page_id
{
SRV_SPACE_ID_UPPER_BOUND
,
0
};
/** The minimum 2-byte integer (0b10xxxxxx xxxxxxxx) */
constexpr
uint32_t
MIN_2BYTE
=
1
<<
7
;
/** The minimum 3-byte integer (0b110xxxxx xxxxxxxx xxxxxxxx) */
...
...
@@ -388,6 +391,7 @@ inline byte *mtr_t::log_write(const page_id_t id, const buf_page_t *bpage,
type
<=
FILE_CHECKPOINT
,
"invalid type"
);
ut_ad
(
type
>=
FILE_CREATE
||
is_named_space
(
id
.
space
()));
ut_ad
(
!
bpage
||
bpage
->
id
()
==
id
);
ut_ad
(
id
<
end_page_id
);
constexpr
bool
have_len
=
type
!=
INIT_PAGE
&&
type
!=
FREE_PAGE
;
constexpr
bool
have_offset
=
type
==
WRITE
||
type
==
MEMSET
||
type
==
MEMMOVE
;
...
...
storage/innobase/row/row0ins.cc
View file @
57a9626f
...
...
@@ -2880,8 +2880,12 @@ row_ins_sec_index_entry_low(
rtr_init_rtr_info
(
&
rtr_info
,
false
,
&
cursor
,
index
,
false
);
rtr_info_update_btr
(
&
cursor
,
&
rtr_info
);
mtr_start
(
&
mtr
);
index
->
set_modified
(
mtr
);
mtr
.
start
();
if
(
index
->
table
->
is_temporary
())
{
mtr
.
set_log_mode
(
MTR_LOG_NO_REDO
);
}
else
{
index
->
set_modified
(
mtr
);
}
search_mode
&=
ulint
(
~
BTR_MODIFY_LEAF
);
search_mode
|=
BTR_MODIFY_TREE
;
err
=
btr_cur_search_to_nth_level
(
...
...
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