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
3b229393
Commit
3b229393
authored
Oct 04, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the I_S.GLOBAL_STATUS counter innodb_instant_alter_column
parent
08e4d3fe
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
6 deletions
+15
-6
mysql-test/suite/innodb/r/instant_alter.result
mysql-test/suite/innodb/r/instant_alter.result
+0
-0
mysql-test/suite/innodb/t/instant_alter.test
mysql-test/suite/innodb/t/instant_alter.test
+7
-6
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+3
-0
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+2
-0
storage/innobase/include/srv0srv.h
storage/innobase/include/srv0srv.h
+3
-0
No files found.
mysql-test/suite/innodb/r/instant_alter.result
View file @
3b229393
No preview for this file type
mysql-test/suite/innodb/t/instant_alter.test
View file @
3b229393
...
...
@@ -18,6 +18,10 @@ SET time_zone='+03:00';
SET
@
saved_frequency
=
@@
GLOBAL
.
innodb_purge_rseg_truncate_frequency
;
SET
GLOBAL
innodb_purge_rseg_truncate_frequency
=
1
;
SET
@
old_instant
=
(
SELECT
variable_value
FROM
information_schema
.
global_status
WHERE
variable_name
=
'innodb_instant_alter_column'
);
let
$format
=
3
;
while
(
$format
)
{
let
$engine
=
`SELECT CONCAT('ENGINE=InnoDB ROW_FORMAT=',CASE $format
...
...
@@ -33,7 +37,6 @@ eval CREATE TABLE t1
INSERT
INTO
t1
(
id
,
c2
)
values
(
1
,
1
);
SELECT
*
FROM
t1
;
SET
GLOBAL
innodb_monitor_enable
=
module_ddl
;
--
enable_info
ALTER
TABLE
t1
ADD
COLUMN
(
d1
INT
,
d2
INT
UNSIGNED
DEFAULT
10
,
d3
VARCHAR
(
20
)
NOT
NULL
DEFAULT
'abcde'
,
...
...
@@ -252,9 +255,7 @@ DROP TABLE t1,t2,t3,big;
dec
$format
;
}
disconnect
analyze
;
SET
GLOBAL
innodb_monitor_disable
=
module_ddl
;
--
disable_warnings
SET
GLOBAL
innodb_monitor_enable
=
default
;
SET
GLOBAL
innodb_monitor_disable
=
default
;
--
enable_warnings
SELECT
variable_value
-@
old_instant
instants
FROM
information_schema
.
global_status
WHERE
variable_name
=
'innodb_instant_alter_column'
;
SET
GLOBAL
innodb_purge_rseg_truncate_frequency
=
@
saved_frequency
;
storage/innobase/handler/ha_innodb.cc
View file @
3b229393
...
...
@@ -1100,6 +1100,9 @@ static SHOW_VAR innodb_status_variables[]= {
{
"defragment_count"
,
(
char
*
)
&
export_vars
.
innodb_defragment_count
,
SHOW_LONG
},
{
"instant_alter_column"
,
(
char
*
)
&
export_vars
.
innodb_instant_alter_column
,
SHOW_LONG
},
/* Online alter table status variables */
{
"onlineddl_rowlog_rows"
,
(
char
*
)
&
export_vars
.
innodb_onlineddl_rowlog_rows
,
SHOW_LONG
},
...
...
storage/innobase/handler/handler0alter.cc
View file @
3b229393
...
...
@@ -50,6 +50,7 @@ Smart ALTER TABLE
#include "trx0roll.h"
#include "handler0alter.h"
#include "srv0mon.h"
#include "srv0srv.h"
#include "fts0priv.h"
#include "fts0plugin.h"
#include "pars0pars.h"
...
...
@@ -304,6 +305,7 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
}
new_table
=
old_table
;
export_vars
.
innodb_instant_alter_column
++
;
}
/** @return whether this is instant ALTER TABLE */
...
...
storage/innobase/include/srv0srv.h
View file @
3b229393
...
...
@@ -1007,6 +1007,9 @@ struct export_var_t{
ulint
innodb_defragment_count
;
/*!< Number of defragment
operations*/
/** Number of instant ALTER TABLE operations that affect columns */
ulong
innodb_instant_alter_column
;
ulint
innodb_onlineddl_rowlog_rows
;
/*!< Online alter rows */
ulint
innodb_onlineddl_rowlog_pct_used
;
/*!< Online alter percentage
of used row log buffer */
...
...
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