1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Bug#27069 set with identical elements are created(additional fix)

issue an error in strict mode
if enum|set column has duplicates members in 'create table'
This commit is contained in:
gluh@mysql.com/eagle.(none)
2007-04-10 15:01:04 +05:00
parent d8e6b38ec1
commit b80d373b6a
3 changed files with 33 additions and 8 deletions

View File

@@ -1386,4 +1386,9 @@ ERROR 01000: Data truncated for column 'a' at row 1
insert into t1 values ('2E3x');
ERROR 01000: Data truncated for column 'a' at row 1
drop table t1;
set sql_mode='traditional';
create table t1 (f1 set('a','a'));
ERROR HY000: Column 'f1' has duplicated value 'a' in SET
create table t1 (f1 enum('a','a'));
ERROR HY000: Column 'f1' has duplicated value 'a' in ENUM
End of 5.0 tests

View File

@@ -1249,4 +1249,13 @@ insert into t1 values ('2000a');
insert into t1 values ('2E3x');
drop table t1;
#
# Bug#27069 set with identical elements are created
#
set sql_mode='traditional';
--error 1291
create table t1 (f1 set('a','a'));
--error 1291
create table t1 (f1 enum('a','a'));
--echo End of 5.0 tests