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
4c77ef36
Commit
4c77ef36
authored
Mar 28, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compilation w/o partitioning
parent
ae6355f5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
31 deletions
+36
-31
sql/partition_info.cc
sql/partition_info.cc
+16
-15
sql/sql_base.cc
sql/sql_base.cc
+13
-13
sql/sql_table.cc
sql/sql_table.cc
+2
-2
sql/vtmd.cc
sql/vtmd.cc
+5
-1
No files found.
sql/partition_info.cc
View file @
4c77ef36
...
...
@@ -856,21 +856,6 @@ bool partition_info::has_unique_name(partition_element *element)
DBUG_RETURN
(
TRUE
);
}
bool
partition_info
::
vers_init_info
(
THD
*
thd
)
{
part_type
=
VERSIONING_PARTITION
;
list_of_part_fields
=
TRUE
;
column_list
=
TRUE
;
num_columns
=
1
;
vers_info
=
new
(
thd
->
mem_root
)
Vers_part_info
;
if
(
!
vers_info
)
{
mem_alloc_error
(
sizeof
(
Vers_part_info
));
return
true
;
}
return
false
;
}
void
partition_info
::
vers_set_hist_part
(
THD
*
thd
)
{
if
(
vers_info
->
limit
)
...
...
@@ -2747,6 +2732,22 @@ bool check_partition_dirs(partition_info *part_info)
#endif
/* WITH_PARTITION_STORAGE_ENGINE */
bool
partition_info
::
vers_init_info
(
THD
*
thd
)
{
part_type
=
VERSIONING_PARTITION
;
list_of_part_fields
=
TRUE
;
column_list
=
TRUE
;
num_columns
=
1
;
vers_info
=
new
(
thd
->
mem_root
)
Vers_part_info
;
if
(
!
vers_info
)
{
mem_alloc_error
(
sizeof
(
Vers_part_info
));
return
true
;
}
return
false
;
}
bool
partition_info
::
error_if_requires_values
()
const
{
switch
(
part_type
)
{
...
...
sql/sql_base.cc
View file @
4c77ef36
...
...
@@ -1470,6 +1470,16 @@ open_table_get_mdl_lock(THD *thd, Open_table_context *ot_ctx,
return
FALSE
;
}
/* Set all [named] partitions as used. */
static
int
set_partitions_as_used
(
TABLE_LIST
*
tl
,
TABLE
*
t
)
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
if
(
t
->
part_info
)
return
t
->
file
->
change_partitions_to_open
(
tl
->
partition_names
);
#endif
return
0
;
}
/**
Open a base table.
...
...
@@ -1612,12 +1622,7 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
table
=
best_table
;
table
->
query_id
=
thd
->
query_id
;
DBUG_PRINT
(
"info"
,(
"Using locked table"
));
if
(
table
->
part_info
)
{
/* Set all [named] partitions as used. */
part_names_error
=
table
->
file
->
change_partitions_to_open
(
table_list
->
partition_names
);
}
part_names_error
=
set_partitions_as_used
(
table_list
,
table
);
goto
reset
;
}
/*
...
...
@@ -1902,12 +1907,7 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
{
DBUG_ASSERT
(
table
->
file
!=
NULL
);
MYSQL_REBIND_TABLE
(
table
->
file
);
if
(
table
->
part_info
)
{
/* Set all [named] partitions as used. */
part_names_error
=
table
->
file
->
change_partitions_to_open
(
table_list
->
partition_names
);
}
part_names_error
=
set_partitions_as_used
(
table_list
,
table
);
}
else
{
...
...
@@ -1921,7 +1921,7 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
HA_OPEN_KEYFILE
|
HA_TRY_READ_ONLY
,
EXTRA_RECORD
,
thd
->
open_options
,
table
,
FALSE
,
table_list
->
partition_names
);
IF_PARTITIONING
(
table_list
->
partition_names
,
0
)
);
if
(
error
)
{
...
...
sql/sql_table.cc
View file @
4c77ef36
...
...
@@ -9205,7 +9205,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db, const LEX_CSTRING *n
if
(
table_list
->
table
->
versioned
(
VERS_TRX_ID
)
&&
alter_info
->
requested_algorithm
==
Alter_info
::
ALTER_TABLE_ALGORITHM_DEFAULT
&&
!
table_list
->
table
->
s
->
partition_info_str
)
IF_PARTITIONING
(
!
table_list
->
table
->
s
->
partition_info_str
,
1
)
)
{
// Changle default ALGORITHM to COPY for INNODB
alter_info
->
requested_algorithm
=
Alter_info
::
ALTER_TABLE_ALGORITHM_COPY
;
...
...
sql/vtmd.cc
View file @
4c77ef36
...
...
@@ -35,12 +35,16 @@ VTMD_table::create(THD *thd)
return
true
;
Reprepare_observer
*
reprepare_observer
=
thd
->
m_reprepare_observer
;
partition_info
*
work_part_info
=
thd
->
work_part_info
;
thd
->
m_reprepare_observer
=
NULL
;
#ifdef WITH_PARTITION_STORAGE_ENGINE
partition_info
*
work_part_info
=
thd
->
work_part_info
;
thd
->
work_part_info
=
NULL
;
#endif
bool
rc
=
mysql_create_like_table
(
thd
,
&
table
,
&
src_table
,
&
create_info
);
thd
->
m_reprepare_observer
=
reprepare_observer
;
#ifdef WITH_PARTITION_STORAGE_ENGINE
thd
->
work_part_info
=
work_part_info
;
#endif
return
rc
;
}
...
...
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