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
1773116f
Commit
1773116f
authored
Nov 23, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ST_AsText() to get textual result
parent
84ee7a10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
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
+13
-13
No files found.
mysql-test/suite/innodb/r/instant_alter.result
View file @
1773116f
No preview for this file type
mysql-test/suite/innodb/t/instant_alter.test
View file @
1773116f
...
@@ -56,7 +56,7 @@ eval CREATE TABLE t1
...
@@ -56,7 +56,7 @@ eval CREATE TABLE t1
SPATIAL
INDEX
(
c3
))
$engine
;
SPATIAL
INDEX
(
c3
))
$engine
;
INSERT
INTO
t1
(
id
,
c2
)
values
(
1
,
1
);
INSERT
INTO
t1
(
id
,
c2
)
values
(
1
,
1
);
SELECT
*
FROM
t1
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
FROM
t1
;
--
enable_info
--
enable_info
ALTER
TABLE
t1
ADD
COLUMN
(
ALTER
TABLE
t1
ADD
COLUMN
(
...
@@ -68,7 +68,7 @@ ALTER TABLE t1 ADD INDEX(d3);
...
@@ -68,7 +68,7 @@ ALTER TABLE t1 ADD INDEX(d3);
BEGIN
;
BEGIN
;
UPDATE
t1
SET
d3
=
''
;
UPDATE
t1
SET
d3
=
''
;
ROLLBACK
;
ROLLBACK
;
SELECT
*
FROM
t1
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
d1
,
d2
,
d3
,
d4
FROM
t1
;
INSERT
INTO
t1
(
id
)
VALUES
(
2
),(
3
),(
4
),(
5
),(
6
);
INSERT
INTO
t1
(
id
)
VALUES
(
2
),(
3
),(
4
),(
5
),(
6
);
--
enable_info
--
enable_info
...
@@ -80,7 +80,7 @@ CHANGE d4 dfour TIMESTAMP NOT NULL DEFAULT now();
...
@@ -80,7 +80,7 @@ CHANGE d4 dfour TIMESTAMP NOT NULL DEFAULT now();
UPDATE
t1
SET
d3
=
'foo'
WHERE
id
=
2
;
UPDATE
t1
SET
d3
=
'foo'
WHERE
id
=
2
;
UPDATE
t1
SET
d3
=
DEFAULT
WHERE
id
=
4
;
UPDATE
t1
SET
d3
=
DEFAULT
WHERE
id
=
4
;
INSERT
INTO
t1
SET
id
=
7
;
INSERT
INTO
t1
SET
id
=
7
;
SELECT
*
FROM
t1
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
d1
,
d2
,
d3
,
dfour
FROM
t1
;
CHECK
TABLE
t1
;
CHECK
TABLE
t1
;
# add virtual columns
# add virtual columns
...
@@ -106,9 +106,9 @@ UPDATE t1 SET d3 = 'xxxxx' WHERE id = 2;
...
@@ -106,9 +106,9 @@ UPDATE t1 SET d3 = 'xxxxx' WHERE id = 2;
# transaction rollback
# transaction rollback
BEGIN
;
BEGIN
;
UPDATE
t1
SET
d3
=
'xxxxx'
WHERE
id
=
3
;
UPDATE
t1
SET
d3
=
'xxxxx'
WHERE
id
=
3
;
SELECT
*
FROM
t1
WHERE
id
=
3
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
d1
,
d2
,
d3
,
dfour
,
e1
,
e2
,
e3
,
d5
,
d6
,
d7
FROM
t1
WHERE
id
=
3
;
ROLLBACK
;
ROLLBACK
;
SELECT
*
FROM
t1
WHERE
id
=
3
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
d1
,
d2
,
d3
,
dfour
,
e1
,
e2
,
e3
,
d5
,
d6
,
d7
FROM
t1
WHERE
id
=
3
;
# NULL to NULL, no change
# NULL to NULL, no change
BEGIN
;
BEGIN
;
...
@@ -116,9 +116,9 @@ UPDATE t1 SET d7 = NULL WHERE ID = 5;
...
@@ -116,9 +116,9 @@ UPDATE t1 SET d7 = NULL WHERE ID = 5;
ROLLBACK
;
ROLLBACK
;
BEGIN
;
BEGIN
;
UPDATE
t1
SET
d7
=
NULL
,
d6
=
10
WHERE
id
=
5
;
UPDATE
t1
SET
d7
=
NULL
,
d6
=
10
WHERE
id
=
5
;
SELECT
*
FROM
t1
WHERE
id
=
5
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
d1
,
d2
,
d3
,
dfour
,
e1
,
e2
,
e3
,
d5
,
d6
,
d7
FROM
t1
WHERE
id
=
5
;
ROLLBACK
;
ROLLBACK
;
SELECT
*
FROM
t1
WHERE
id
=
5
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
d1
,
d2
,
d3
,
dfour
,
e1
,
e2
,
e3
,
d5
,
d6
,
d7
FROM
t1
WHERE
id
=
5
;
# add virtual stored columns; not instant
# add virtual stored columns; not instant
--
enable_info
--
enable_info
...
@@ -128,7 +128,7 @@ ALTER TABLE t1 ADD COLUMN (f1 VARCHAR(20) AS (concat('x', e2)) STORED);
...
@@ -128,7 +128,7 @@ ALTER TABLE t1 ADD COLUMN (f1 VARCHAR(20) AS (concat('x', e2)) STORED);
ALTER
TABLE
t1
ADD
COLUMN
(
d8
VARCHAR
(
20
)
DEFAULT
'omnopq'
);
ALTER
TABLE
t1
ADD
COLUMN
(
d8
VARCHAR
(
20
)
DEFAULT
'omnopq'
);
--
disable_info
--
disable_info
SELECT
*
FROM
t1
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
d1
,
d2
,
d3
,
dfour
,
e1
,
e2
,
e3
,
d5
,
d6
,
d7
,
f1
,
d8
FROM
t1
;
SHOW
CREATE
TABLE
t1
;
SHOW
CREATE
TABLE
t1
;
--
enable_info
--
enable_info
...
@@ -160,7 +160,7 @@ COMMIT;
...
@@ -160,7 +160,7 @@ COMMIT;
--
enable_info
--
enable_info
ALTER
TABLE
t2
ADD
COLUMN
d1
VARCHAR
(
2000
)
DEFAULT
REPEAT
(
'asdf'
,
500
);
ALTER
TABLE
t2
ADD
COLUMN
d1
VARCHAR
(
2000
)
DEFAULT
REPEAT
(
'asdf'
,
500
);
--
disable_info
--
disable_info
SELECT
*
FROM
t2
;
SELECT
id
,
c1
,
ST_AsText
(
p
)
p
,
d1
FROM
t2
;
# inplace update, rollback
# inplace update, rollback
BEGIN
;
BEGIN
;
...
@@ -206,17 +206,17 @@ eval CREATE TABLE t3
...
@@ -206,17 +206,17 @@ eval CREATE TABLE t3
SPATIAL
INDEX
(
c3
))
SPATIAL
INDEX
(
c3
))
$engine
;
$engine
;
INSERT
INTO
t3
(
id
,
c2
)
VALUES
(
1
,
1
),(
2
,
2
),(
3
,
3
);
INSERT
INTO
t3
(
id
,
c2
)
VALUES
(
1
,
1
),(
2
,
2
),(
3
,
3
);
SELECT
*
FROM
t3
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
FROM
t3
;
--
enable_info
--
enable_info
ALTER
TABLE
t3
ADD
COLUMN
ALTER
TABLE
t3
ADD
COLUMN
(
c4
DATETIME
DEFAULT
current_timestamp
(),
(
c4
DATETIME
DEFAULT
current_timestamp
(),
c5
TIMESTAMP
NOT
NULL
DEFAULT
current_timestamp
(),
c5
TIMESTAMP
NOT
NULL
DEFAULT
current_timestamp
(),
c6
POINT
);
c6
POINT
);
SELECT
*
FROM
t3
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
c4
,
c5
,
c6
FROM
t3
;
ALTER
TABLE
t3
ADD
COLUMN
c7
TIME
NOT
NULL
DEFAULT
current_timestamp
();
ALTER
TABLE
t3
ADD
COLUMN
c7
TIME
NOT
NULL
DEFAULT
current_timestamp
();
ALTER
TABLE
t3
ADD
COLUMN
c8
DATE
NOT
NULL
DEFAULT
current_timestamp
();
ALTER
TABLE
t3
ADD
COLUMN
c8
DATE
NOT
NULL
DEFAULT
current_timestamp
();
--
disable_info
--
disable_info
SELECT
*
FROM
t3
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
c4
,
c5
,
c6
,
c7
,
c8
FROM
t3
;
--
enable_info
--
enable_info
ALTER
TABLE
t3
ADD
COLUMN
t
TEXT
CHARSET
utf8
ALTER
TABLE
t3
ADD
COLUMN
t
TEXT
CHARSET
utf8
...
@@ -230,7 +230,7 @@ ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
...
@@ -230,7 +230,7 @@ ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE
b
b
BLOB
NOT
NULL
DEFAULT
'binary line of business'
;
CHANGE
b
b
BLOB
NOT
NULL
DEFAULT
'binary line of business'
;
--
disable_info
--
disable_info
INSERT
INTO
t3
SET
id
=
5
,
c2
=
9
;
INSERT
INTO
t3
SET
id
=
5
,
c2
=
9
;
SELECT
*
FROM
t3
;
SELECT
id
,
c2
,
ST_AsText
(
c3
)
c3
,
c4
,
c5
,
c6
,
c7
,
c8
,
phrase
,
b
FROM
t3
;
--
enable_info
--
enable_info
ALTER
TABLE
t3
DROP
c3
,
DROP
c7
;
ALTER
TABLE
t3
DROP
c3
,
DROP
c7
;
--
disable_info
--
disable_info
...
...
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