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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ad1190ec
Commit
ad1190ec
authored
Jul 12, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gleb.loc:/home/uchum/work/bk/5.0-opt-29360
into gleb.loc:/home/uchum/work/bk/5.0-opt
parents
2f0e0017
0920c75b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
9 deletions
+49
-9
mysql-test/r/type_enum.result
mysql-test/r/type_enum.result
+20
-0
mysql-test/r/type_ranges.result
mysql-test/r/type_ranges.result
+0
-4
mysql-test/t/type_enum.test
mysql-test/t/type_enum.test
+18
-0
sql/field_conv.cc
sql/field_conv.cc
+11
-5
No files found.
mysql-test/r/type_enum.result
View file @
ad1190ec
...
@@ -1809,3 +1809,23 @@ f1
...
@@ -1809,3 +1809,23 @@ f1
drop table t1;
drop table t1;
CREATE TABLE t1 (c1 ENUM('a', '', 'b'));
INSERT INTO t1 (c1) VALUES ('b');
INSERT INTO t1 (c1) VALUES ('');
INSERT INTO t1 (c1) VALUES (0);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
INSERT INTO t1 (c1) VALUES ('');
SELECT c1 + 0, COUNT(c1) FROM t1 GROUP BY c1;
c1 + 0 COUNT(c1)
0 1
2 2
3 1
CREATE TABLE t2 SELECT * FROM t1;
SELECT c1 + 0 FROM t2;
c1 + 0
3
2
0
2
DROP TABLE t1,t2;
...
...
mysql-test/r/type_ranges.result
View file @
ad1190ec
...
@@ -208,10 +208,6 @@ options flags
...
@@ -208,10 +208,6 @@ options flags
one one
one one
drop table t2;
drop table t2;
create table t2 select * from t1;
create table t2 select * from t1;
Warnings:
Warning 1265 Data truncated for column 'options' at row 4
Warning 1265 Data truncated for column 'options' at row 5
Warning 1265 Data truncated for column 'options' at row 6
update t2 set string="changed" where auto=16;
update t2 set string="changed" where auto=16;
show full columns from t1;
show full columns from t1;
Field Type Collation Null Key Default Extra Privileges Comment
Field Type Collation Null Key Default Extra Privileges Comment
...
...
mysql-test/t/type_enum.test
View file @
ad1190ec
...
@@ -182,3 +182,21 @@ create table t1(f1 set('a','b'), index(f1));
...
@@ -182,3 +182,21 @@ create table t1(f1 set('a','b'), index(f1));
insert into t1 values(''),(''),('
a
'),('
b
');
insert into t1 values(''),(''),('
a
'),('
b
');
select * from t1 where f1='';
select * from t1 where f1='';
drop table t1;
drop table t1;
#
# Bug#29360: Confluence of the special 0 enum value with the normal empty string
# value during field to field copy.
#
CREATE TABLE t1 (c1 ENUM('
a
', '', '
b
'));
INSERT INTO t1 (c1) VALUES ('
b
');
INSERT INTO t1 (c1) VALUES ('');
INSERT INTO t1 (c1) VALUES (0);
INSERT INTO t1 (c1) VALUES ('
'
);
SELECT
c1
+
0
,
COUNT
(
c1
)
FROM
t1
GROUP
BY
c1
;
CREATE
TABLE
t2
SELECT
*
FROM
t1
;
SELECT
c1
+
0
FROM
t2
;
DROP
TABLE
t1
,
t2
;
...
...
sql/field_conv.cc
View file @
ad1190ec
...
@@ -790,7 +790,13 @@ int field_conv(Field *to,Field *from)
...
@@ -790,7 +790,13 @@ int field_conv(Field *to,Field *from)
blob
->
value
.
copy
();
blob
->
value
.
copy
();
return
blob
->
store
(
blob
->
value
.
ptr
(),
blob
->
value
.
length
(),
from
->
charset
());
return
blob
->
store
(
blob
->
value
.
ptr
(),
blob
->
value
.
length
(),
from
->
charset
());
}
}
if
((
from
->
result_type
()
==
STRING_RESULT
&&
if
(
from
->
real_type
()
==
FIELD_TYPE_ENUM
&&
to
->
real_type
()
==
FIELD_TYPE_ENUM
&&
from
->
val_int
()
==
0
)
{
((
Field_enum
*
)(
to
))
->
store_type
(
0
);
}
else
if
((
from
->
result_type
()
==
STRING_RESULT
&&
(
to
->
result_type
()
==
STRING_RESULT
||
(
to
->
result_type
()
==
STRING_RESULT
||
(
from
->
real_type
()
!=
FIELD_TYPE_ENUM
&&
(
from
->
real_type
()
!=
FIELD_TYPE_ENUM
&&
from
->
real_type
()
!=
FIELD_TYPE_SET
)))
||
from
->
real_type
()
!=
FIELD_TYPE_SET
)))
||
...
...
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