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
3fb22596
Commit
3fb22596
authored
Aug 27, 2024
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
is_partition(), is_temporary_name() fix
Return true for temporary partitions.
parent
79459c7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+2
-3
storage/innobase/include/dict0mem.h
storage/innobase/include/dict0mem.h
+6
-1
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
3fb22596
...
...
@@ -262,15 +262,14 @@ void set_my_errno(int err)
/** Checks whether the file name belongs to a partition of a table.
@param[in] file_name file name
@return pointer to the end of the table name part of the file name, or NULL */
static
char
*
is_partition
(
/*=========*/
char
*
file_name
)
c
onst
c
har
*
file_name
)
{
/* We look for pattern #P# to see if the table is partitioned
MariaDB table. */
return
strstr
(
file_name
,
table_name_t
::
part_suffix
);
return
strstr
(
const_cast
<
char
*>
(
file_name
)
,
table_name_t
::
part_suffix
);
}
...
...
storage/innobase/include/dict0mem.h
View file @
3fb22596
...
...
@@ -1816,6 +1816,9 @@ typedef enum {
DICT_FRM_INCONSISTENT_KEYS
=
3
/*!< Key count mismatch */
}
dict_frm_t
;
char
*
is_partition
(
const
char
*
file_name
);
/** Data structure for a database table. Most fields will be
zero-initialized in dict_table_t::create(). */
struct
dict_table_t
{
...
...
@@ -1867,7 +1870,9 @@ struct dict_table_t {
which denotes temporary or intermediate tables in MariaDB. */
static
bool
is_temporary_name
(
const
char
*
name
)
{
return
strstr
(
name
,
"/#sql"
);
return
strstr
(
name
,
"/#sql"
)
||
(
is_partition
(
name
)
&&
0
==
memcmp
(
name
+
strlen
(
name
)
-
5
,
"#TMP#"
,
5
));
}
/** @return whether instant ALTER TABLE is in effect */
...
...
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