diff options
author | Jacob Mathew <jacob.mathew@mariadb.com> | 2017-04-17 15:32:44 -0700 |
---|---|---|
committer | Jacob Mathew <jacob.mathew@mariadb.com> | 2017-04-17 15:32:44 -0700 |
commit | 38af34bb2143f2a7ce82d2e241d8995f419a7f29 (patch) | |
tree | 5ed8c6f563fc896182e6ba0745f593902e841a11 /mysql-test/t/check_constraint.test | |
parent | 3a50fd9d2f7af4b24a262c20e24e598f481b3e11 (diff) | |
download | mariadb-git-38af34bb2143f2a7ce82d2e241d8995f419a7f29.tar.gz |
MDEV-11117 CHECK constraint fails on intermediate step of ALTERbb-10.2-MDEV-11117
Fixed the bug by failing the statement with an error message that explains
that an auto-increment column may not be used in an expression for a
check constraint.
Added a test case in check_constraint.test.
Updated existing tests and results.
Diffstat (limited to 'mysql-test/t/check_constraint.test')
-rw-r--r-- | mysql-test/t/check_constraint.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/check_constraint.test b/mysql-test/t/check_constraint.test index 437463ee457..c70a208f774 100644 --- a/mysql-test/t/check_constraint.test +++ b/mysql-test/t/check_constraint.test @@ -88,6 +88,12 @@ alter table t1 drop column a; drop table t1; # +# MDEV-11117 CHECK constraint fails on intermediate step of ALTER +# +-- error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1( c1 int auto_increment primary key, check( c1 > 0 or c1 is null ) ); + +# # MDEV-12421 Check constraint with query crashes server and renders DB unusable # --error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED |