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
de158e94
Commit
de158e94
authored
Aug 05, 2005
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/mysql-4.1-bug-12266
parents
b9da4176
697836c7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
mysql-test/r/group_by.result
mysql-test/r/group_by.result
+7
-0
mysql-test/t/group_by.test
mysql-test/t/group_by.test
+10
-0
sql/item_timefunc.h
sql/item_timefunc.h
+6
-0
No files found.
mysql-test/r/group_by.result
View file @
de158e94
...
...
@@ -757,3 +757,10 @@ SELECT n+1 AS n FROM t1 GROUP BY n;
n
2
DROP TABLE t1;
create table t1 (f1 date);
insert into t1 values('2005-06-06');
insert into t1 values('2005-06-06');
select date(left(f1+0,8)) from t1 group by 1;
date(left(f1+0,8))
2005-06-06
drop table t1;
mysql-test/t/group_by.test
View file @
de158e94
...
...
@@ -590,4 +590,14 @@ INSERT INTO t1 VALUES (1);
SELECT
n
+
1
AS
n
FROM
t1
GROUP
BY
n
;
DROP
TABLE
t1
;
#
# Bug #12266 GROUP BY expression on DATE column produces result with
# reduced length
#
create
table
t1
(
f1
date
);
insert
into
t1
values
(
'2005-06-06'
);
insert
into
t1
values
(
'2005-06-06'
);
select
date
(
left
(
f1
+
0
,
8
))
from
t1
group
by
1
;
drop
table
t1
;
# End of 4.1 tests
sql/item_timefunc.h
View file @
de158e94
...
...
@@ -709,6 +709,12 @@ class Item_date_typecast :public Item_typecast_maybe_null
{
return
(
new
Field_date
(
maybe_null
,
name
,
t_arg
,
&
my_charset_bin
));
}
void
fix_length_and_dec
()
{
collation
.
set
(
&
my_charset_bin
);
max_length
=
10
;
maybe_null
=
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