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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3845a89b
Commit
3845a89b
authored
Feb 07, 2014
by
Igor Babaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
cfbc545d
50b9e30b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
mysql-test/suite/vcol/r/vcol_misc.result
mysql-test/suite/vcol/r/vcol_misc.result
+5
-0
mysql-test/suite/vcol/t/vcol_misc.test
mysql-test/suite/vcol/t/vcol_misc.test
+7
-0
sql/item.h
sql/item.h
+5
-1
No files found.
mysql-test/suite/vcol/r/vcol_misc.result
View file @
3845a89b
...
...
@@ -316,4 +316,9 @@ ERROR HY000: The value specified for computed column 'd' in table 't1' ignored
INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
ERROR HY000: The value specified for computed column 'd' in table 't1' ignored
drop table t1;
#
# MDEV-5611: self-referencing virtual column
#
create table t1 (a int, b int as (b is null) virtual);
ERROR HY000: A computed column cannot be based on a computed column
# end of 5.3 tests
mysql-test/suite/vcol/t/vcol_misc.test
View file @
3845a89b
...
...
@@ -275,4 +275,11 @@ UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a
INSERT
INTO
`test`
.
`t1`
(
`a`
,
`b`
,
`c`
,
`d`
)
VALUES
(
'1'
,
'a'
,
NULL
,
'a'
);
drop
table
t1
;
--
echo
#
--
echo
# MDEV-5611: self-referencing virtual column
--
echo
#
--
error
ER_VCOL_BASED_ON_VCOL
create
table
t1
(
a
int
,
b
int
as
(
b
is
null
)
virtual
);
--
echo
# end of 5.3 tests
sql/item.h
View file @
3845a89b
...
...
@@ -1877,7 +1877,11 @@ public:
tab
->
merge_keys
.
merge
(
field
->
part_of_key
);
if
(
tab
->
read_set
)
bitmap_fast_test_and_set
(
tab
->
read_set
,
field
->
field_index
);
if
(
field
->
vcol_info
)
/*
Do not mark a self-referecing virtual column.
Such virtual columns are reported as invalid.
*/
if
(
field
->
vcol_info
&&
tab
->
vcol_set
)
tab
->
mark_virtual_col
(
field
);
}
}
...
...
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