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
1aee4d9e
Commit
1aee4d9e
authored
Sep 09, 2008
by
Mats Kindahl
Browse files
Options
Browse Files
Download
Plain Diff
Merging with 5.1-5.1.29-rc
parents
69a8281c
f81c25e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
mysql-test/r/type_set.result
mysql-test/r/type_set.result
+10
-0
mysql-test/t/type_set.test
mysql-test/t/type_set.test
+19
-0
sql/handler.cc
sql/handler.cc
+2
-2
No files found.
mysql-test/r/type_set.result
View file @
1aee4d9e
...
...
@@ -93,4 +93,14 @@ c
1,2,3
64
DROP TABLE t1;
CREATE TABLE t1 (
set_unique_utf8 set ('a','b','c','d','e','f','g','h','i','j','k','l',
'm','n','o','p','q','r','s','t','u','v','w','x',
'y','z') CHARACTER SET utf8,
unique (set_unique_utf8)
);
INSERT INTO t1 ( set_unique_utf8 ) VALUES ( '' );
INSERT INTO t1 ( set_unique_utf8 ) VALUES ( '' );
ERROR 23000: Duplicate entry '' for key 'set_unique_utf8'
DROP TABLE t1;
End of 5.0 tests
mysql-test/t/type_set.test
View file @
1aee4d9e
...
...
@@ -75,4 +75,23 @@ INSERT INTO t1 VALUES(9223372036854775808);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
#
# Bug #38701: Crash in String::append when inserting duplicate empty strings
# an uft8 SET col
#
CREATE
TABLE
t1
(
set_unique_utf8
set
(
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
,
'g'
,
'h'
,
'i'
,
'j'
,
'k'
,
'l'
,
'm'
,
'n'
,
'o'
,
'p'
,
'q'
,
'r'
,
's'
,
't'
,
'u'
,
'v'
,
'w'
,
'x'
,
'y'
,
'z'
)
CHARACTER
SET
utf8
,
unique
(
set_unique_utf8
)
);
INSERT
INTO
t1
(
set_unique_utf8
)
VALUES
(
''
);
--
error
ER_DUP_ENTRY
INSERT
INTO
t1
(
set_unique_utf8
)
VALUES
(
''
);
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
sql/handler.cc
View file @
1aee4d9e
...
...
@@ -2496,7 +2496,7 @@ void handler::print_keydup_error(uint key_nr, const char *msg)
str
.
append
(
STRING_WITH_LEN
(
"..."
));
}
my_printf_error
(
ER_DUP_ENTRY
,
msg
,
MYF
(
0
),
str
.
c_ptr
(),
table
->
key_info
[
key_nr
].
name
);
MYF
(
0
),
str
.
c_ptr
_safe
(),
table
->
key_info
[
key_nr
].
name
);
}
}
...
...
@@ -2564,7 +2564,7 @@ void handler::print_error(int error, myf errflag)
str
.
append
(
STRING_WITH_LEN
(
"..."
));
}
my_error
(
ER_FOREIGN_DUPLICATE_KEY
,
MYF
(
0
),
table_share
->
table_name
.
str
,
str
.
c_ptr
(),
key_nr
+
1
);
str
.
c_ptr
_safe
(),
key_nr
+
1
);
DBUG_VOID_RETURN
;
}
textno
=
ER_DUP_KEY
;
...
...
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