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
d86bdc97
Commit
d86bdc97
authored
Oct 19, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add one more test
parent
6b5b6225
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
mysql-test/suite/innodb/r/instant_alter.result
mysql-test/suite/innodb/r/instant_alter.result
+25
-1
mysql-test/suite/innodb/t/instant_alter.test
mysql-test/suite/innodb/t/instant_alter.test
+7
-0
No files found.
mysql-test/suite/innodb/r/instant_alter.result
View file @
d86bdc97
...
...
@@ -515,6 +515,14 @@ INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t);
ALTER TABLE t1 ADD COLUMN a INT FIRST;
UPDATE t1 SET a = 0;
DROP TABLE t1;
CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
INSERT INTO t1 SET t = @x;
ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1;
ALTER TABLE t1 ADD COLUMN t TEXT;
SELECT * FROM t1;
i t
1 NULL
DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
...
...
@@ -976,6 +984,14 @@ INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t);
ALTER TABLE t1 ADD COLUMN a INT FIRST;
UPDATE t1 SET a = 0;
DROP TABLE t1;
CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
INSERT INTO t1 SET t = @x;
ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1;
ALTER TABLE t1 ADD COLUMN t TEXT;
SELECT * FROM t1;
i t
1 NULL
DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
...
...
@@ -1437,10 +1453,18 @@ INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t);
ALTER TABLE t1 ADD COLUMN a INT FIRST;
UPDATE t1 SET a = 0;
DROP TABLE t1;
CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
INSERT INTO t1 SET t = @x;
ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1;
ALTER TABLE t1 ADD COLUMN t TEXT;
SELECT * FROM t1;
i t
1 NULL
DROP TABLE t1;
disconnect analyze;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
7
2
7
8
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
mysql-test/suite/innodb/t/instant_alter.test
View file @
d86bdc97
...
...
@@ -390,6 +390,13 @@ ALTER TABLE t1 ADD COLUMN a INT FIRST;
UPDATE
t1
SET
a
=
0
;
DROP
TABLE
t1
;
eval
CREATE
TABLE
t1
(
t
TEXT
)
$engine
;
INSERT
INTO
t1
SET
t
=
@
x
;
ALTER
TABLE
t1
DROP
COLUMN
t
,
ADD
COLUMN
i
INT
NOT
NULL
DEFAULT
1
;
ALTER
TABLE
t1
ADD
COLUMN
t
TEXT
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
dec
$format
;
}
disconnect
analyze
;
...
...
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