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
bec93d48
Commit
bec93d48
authored
May 06, 2005
by
ramil@ram-book.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for bug #4082: Integer lengths cause truncation with DISTINCT CONCAT and InnoDB
parent
6a476984
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
6 deletions
+21
-6
mysql-test/r/create.result
mysql-test/r/create.result
+4
-4
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+6
-0
mysql-test/r/type_float.result
mysql-test/r/type_float.result
+1
-1
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+9
-0
sql/item.cc
sql/item.cc
+1
-1
No files found.
mysql-test/r/create.result
View file @
bec93d48
...
...
@@ -413,7 +413,7 @@ explain t2;
Field Type Null Key Default Extra
a int(11) YES NULL
b bigint(11) 0
c bigint(1
0
) 0
c bigint(1
1
) 0
d date YES NULL
e char(1)
f datetime YES NULL
...
...
@@ -432,11 +432,11 @@ Table Create Table
t2 CREATE TABLE `t2` (
`ifnull(a,a)` tinyint(4) default NULL,
`ifnull(b,b)` smallint(6) default NULL,
`ifnull(c,c)` mediumint(
9
) default NULL,
`ifnull(c,c)` mediumint(
8
) default NULL,
`ifnull(d,d)` int(11) default NULL,
`ifnull(e,e)` bigint(20) default NULL,
`ifnull(f,f)` float(
3
,2) default NULL,
`ifnull(g,g)` double(
4
,3) default NULL,
`ifnull(f,f)` float(
24
,2) default NULL,
`ifnull(g,g)` double(
53
,3) default NULL,
`ifnull(h,h)` decimal(5,4) default NULL,
`ifnull(i,i)` year(4) default NULL,
`ifnull(j,j)` date default NULL,
...
...
mysql-test/r/innodb.result
View file @
bec93d48
...
...
@@ -1637,3 +1637,9 @@ ERROR 42S21: Duplicate column name 'c1'
alter table t1 add key (c1,c1,c2);
ERROR 42S21: Duplicate column name 'c1'
drop table t1;
create table t1(a int(1) , b int(1)) engine=innodb;
insert into t1 values ('1111', '3333');
select distinct concat(a, b) from t1;
concat(a, b)
11113333
drop table t1;
mysql-test/r/type_float.result
View file @
bec93d48
...
...
@@ -92,7 +92,7 @@ show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`col1` double default NULL,
`col2` double(
22
,5) default NULL,
`col2` double(
53
,5) default NULL,
`col3` double default NULL,
`col4` double default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
...
...
mysql-test/t/innodb.test
View file @
bec93d48
...
...
@@ -1168,3 +1168,12 @@ alter table t1 add key (c1,c2,c1);
--
error
1060
alter
table
t1
add
key
(
c1
,
c1
,
c2
);
drop
table
t1
;
#
# Bug #4082: integer truncation
#
create
table
t1
(
a
int
(
1
)
,
b
int
(
1
))
engine
=
innodb
;
insert
into
t1
values
(
'1111'
,
'3333'
);
select
distinct
concat
(
a
,
b
)
from
t1
;
drop
table
t1
;
sql/item.cc
View file @
bec93d48
...
...
@@ -554,7 +554,7 @@ void Item_field::set_field(Field *field_par)
{
field
=
result_field
=
field_par
;
// for easy coding with fields
maybe_null
=
field
->
maybe_null
();
max_length
=
field_par
->
field_length
;
max_length
=
field_par
->
max_length
()
;
decimals
=
field
->
decimals
();
table_name
=
field_par
->
table_name
;
field_name
=
field_par
->
field_name
;
...
...
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