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
56f64f79
Commit
56f64f79
authored
May 09, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TokuDB: enable online alter for partitioned tabled
parent
fca2b1a7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
6 deletions
+8
-6
storage/tokudb/ha_tokudb_alter_56.cc
storage/tokudb/ha_tokudb_alter_56.cc
+5
-1
storage/tokudb/mysql-test/tokudb_alter_table/r/ai_part.result
...age/tokudb/mysql-test/tokudb_alter_table/r/ai_part.result
+2
-2
storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_part.result
...e/tokudb/mysql-test/tokudb_alter_table/r/hcad_part.result
+1
-1
storage/tokudb/mysql-test/tokudb_alter_table/t/ai_part.test
storage/tokudb/mysql-test/tokudb_alter_table/t/ai_part.test
+0
-1
storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_part.test
...age/tokudb/mysql-test/tokudb_alter_table/t/hcad_part.test
+0
-1
No files found.
storage/tokudb/ha_tokudb_alter_56.cc
View file @
56f64f79
...
...
@@ -219,6 +219,9 @@ static bool change_type_is_supported(TABLE *table, TABLE *altered_table, Alter_i
static
ulong
fix_handler_flags
(
THD
*
thd
,
TABLE
*
table
,
TABLE
*
altered_table
,
Alter_inplace_info
*
ha_alter_info
)
{
ulong
handler_flags
=
ha_alter_info
->
handler_flags
;
// This is automatically supported, hide the flag from later checks
handler_flags
&=
~
Alter_inplace_info
::
ALTER_PARTITIONED
;
// workaround for fill_alter_inplace_info bug (#5193)
// the function erroneously sets the ADD_INDEX and DROP_INDEX flags for a column addition that does not
// change the keys. the following code turns the ADD_INDEX and DROP_INDEX flags so that we can do hot
...
...
@@ -728,7 +731,8 @@ bool ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_i
if
(
commit
)
{
#if (50613 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799)
(50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \
(100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099)
if
(
ha_alter_info
->
group_commit_ctx
)
{
ha_alter_info
->
group_commit_ctx
=
NULL
;
}
...
...
storage/tokudb/mysql-test/tokudb_alter_table/r/ai_part.result
View file @
56f64f79
...
...
@@ -13,13 +13,13 @@ foo CREATE TABLE `foo` (
/*!50100 PARTITION BY HASH (a)
PARTITIONS 2 */
ALTER TABLE foo ADD KEY(b);
ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
SHOW CREATE TABLE foo;
Table Create Table
foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`)
PRIMARY KEY (`a`),
KEY `b` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY HASH (a)
PARTITIONS 2 */
...
...
storage/tokudb/mysql-test/tokudb_alter_table/r/hcad_part.result
View file @
56f64f79
...
...
@@ -12,12 +12,12 @@ foo CREATE TABLE `foo` (
/*!50100 PARTITION BY HASH (a)
PARTITIONS 2 */
ALTER TABLE foo ADD COLUMN c INT;
ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
SHOW CREATE TABLE foo;
Table Create Table
foo CREATE TABLE `foo` (
`a` int(11) NOT NULL DEFAULT '0',
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY HASH (a)
...
...
storage/tokudb/mysql-test/tokudb_alter_table/t/ai_part.test
View file @
56f64f79
...
...
@@ -8,7 +8,6 @@ SET SESSION tokudb_disable_slow_alter=1;
CREATE
TABLE
foo
(
a
INT
,
b
INT
,
PRIMARY
KEY
(
a
))
PARTITION
BY
HASH
(
a
)
PARTITIONS
2
;
INSERT
INTO
foo
VALUES
(
1
,
0
),(
2
,
0
);
SHOW
CREATE
TABLE
foo
;
--
error
1112
ALTER
TABLE
foo
ADD
KEY
(
b
);
SHOW
CREATE
TABLE
foo
;
...
...
storage/tokudb/mysql-test/tokudb_alter_table/t/hcad_part.test
View file @
56f64f79
...
...
@@ -7,7 +7,6 @@ DROP TABLE IF EXISTS foo;
SET
SESSION
tokudb_disable_slow_alter
=
1
;
CREATE
TABLE
foo
(
a
INT
,
b
INT
,
PRIMARY
KEY
(
a
))
PARTITION
BY
HASH
(
a
)
PARTITIONS
2
;
SHOW
CREATE
TABLE
foo
;
--
error
1112
ALTER
TABLE
foo
ADD
COLUMN
c
INT
;
SHOW
CREATE
TABLE
foo
;
...
...
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