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
cbc18a76
Commit
cbc18a76
authored
Dec 12, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_2023/mysql-4.0
parents
8c7f319f
5bbc3afd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
mysql-test/r/type_enum.result
mysql-test/r/type_enum.result
+10
-0
mysql-test/t/type_enum.test
mysql-test/t/type_enum.test
+11
-0
sql/field.cc
sql/field.cc
+2
-2
No files found.
mysql-test/r/type_enum.result
View file @
cbc18a76
...
...
@@ -1636,3 +1636,13 @@ t1 CREATE TABLE `t1` (
`a` enum('','a','b') NOT NULL default 'b'
) TYPE=MyISAM
drop table t1;
create table t1 (a enum ('0','1'));
insert into t1 set a='foobar';
select * from t1;
a
update t1 set a = replace(a,'x','y');
select * from t1;
a
drop table t1;
mysql-test/t/type_enum.test
View file @
cbc18a76
...
...
@@ -21,3 +21,14 @@ drop table t1;
create
table
t1
(
a
enum
(
' '
,
'a'
,
'b '
)
not
null
default
'b '
);
show
create
table
t1
;
drop
table
t1
;
#
# Tests of wrong enum values (bug #2023)
#
create
table
t1
(
a
enum
(
'0'
,
'1'
));
insert
into
t1
set
a
=
'foobar'
;
select
*
from
t1
;
update
t1
set
a
=
replace
(
a
,
'x'
,
'y'
);
select
*
from
t1
;
drop
table
t1
;
\ No newline at end of file
sql/field.cc
View file @
cbc18a76
...
...
@@ -4721,7 +4721,7 @@ String *Field_enum::val_str(String *val_buffer __attribute__((unused)),
{
uint
tmp
=
(
uint
)
Field_enum
::
val_int
();
if
(
!
tmp
||
tmp
>
typelib
->
count
)
val_ptr
->
length
(
0
);
val_ptr
->
set
((
char
*
)
""
,
0
);
else
val_ptr
->
set
((
const
char
*
)
typelib
->
type_names
[
tmp
-
1
],
(
uint
)
strlen
(
typelib
->
type_names
[
tmp
-
1
]));
...
...
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