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
668d09cc
Commit
668d09cc
authored
Mar 06, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in DATE_FORMAT when used with GROUP BY
parent
c1ab560c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
5 deletions
+26
-5
Build-tools/Do-compile
Build-tools/Do-compile
+1
-1
Docs/manual.texi
Docs/manual.texi
+3
-0
mysql-test/r/type_date.result
mysql-test/r/type_date.result
+4
-0
mysql-test/t/type_date.test
mysql-test/t/type_date.test
+13
-0
scripts/mysqlhotcopy.sh
scripts/mysqlhotcopy.sh
+2
-2
sql/item_timefunc.cc
sql/item_timefunc.cc
+1
-1
sql/item_timefunc.h
sql/item_timefunc.h
+1
-0
sql/table.cc
sql/table.cc
+1
-1
No files found.
Build-tools/Do-compile
View file @
668d09cc
...
...
@@ -7,7 +7,7 @@ $opt_tmp=$opt_version_suffix="";
$opt_help
=
$opt_Information
=
$opt_delete
=
$opt_debug
=
$opt_stage
=
$opt_rsh_mail
=
$opt_no_test
=
$opt_no_perl
=
$opt_with_low_memory
=
$opt_fast_benchmark
=
$opt_static_client
=
$opt_static_server
=
$opt_static_perl
=
$opt_sur
=
$opt_with_small_disk
=
$opt_local_perl
=
$opt_tcpip
=
$opt_build_thread
=
$opt_no_mysqltest
=
$opt_use_old_distribution
=
$opt_enable_shared
=
$opt_no_crash_me
=
$opt_no_strip
=
0
;
$opt_innodb
=
$opt_bdb
=
0
;
GetOptions
("
Information
","
help
","
distribution=s
","
user=s
","
result=s
","
delete
","
no-test
","
no-mysqltest
","
perl-files=s
","
debug
","
config-options=s
","
config-env=s
","
stage=i
","
rsh-mail
","
with-low-memory
","
fast-benchmark
","
tmp=s
","
static-client
","
static-server
","
static-perl
","
no-perl
","
local-perl
","
perl-options=s
","
sur
","
with-small-disk
","
dbd-options=s
","
tcpip
","
suffix=s
","
build-thread=i
","
innodb
","
bdb
","
use-old-distribution
","
enable-shared
","
no-crash-me
","
no-strip
","
version-suffix=s
",
"
with-other-libc=s) || usage();
GetOptions
("
Information
","
help
","
distribution=s
","
user=s
","
result=s
","
delete
","
no-test
","
no-mysqltest
","
perl-files=s
","
debug
","
config-options=s
","
config-env=s
","
stage=i
","
rsh-mail
","
with-low-memory
","
fast-benchmark
","
tmp=s
","
static-client
","
static-server
","
static-perl
","
no-perl
","
local-perl
","
perl-options=s
","
sur
","
with-small-disk
","
dbd-options=s
","
tcpip
","
suffix=s
","
build-thread=i
","
innodb
","
bdb
","
use-old-distribution
","
enable-shared
","
no-crash-me
","
no-strip
","
version-suffix=s
",
"
with-other-libc=s
"
)
||
usage
();
usage
()
if
(
$opt_help
||
$opt_Information
);
usage
()
if
(
!
$opt_distribution
);
...
...
Docs/manual.texi
View file @
668d09cc
...
...
@@ -46898,6 +46898,9 @@ Fixed binary builds to use @code{--enable-local-infile}.
Update source to work with new @code{bison} version.
@item
Updated shell scripts to new agree with new POSIX standard.
@item
Fixed bug where @code{DATE_FORMAT()} returned empty string when used
with @code{GROUP BY}.
@end itemize
@node News-3.23.49, News-3.23.48, News-3.23.50, News-3.23.x
mysql-test/r/type_date.result
View file @
668d09cc
...
...
@@ -18,3 +18,7 @@ s
date_add(date,INTERVAL 1 DAY) date_add(date,INTERVAL 1 SECOND)
2000-08-11 2000-08-10 00:00:01
2000-08-12 2000-08-11 00:00:01
DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT))
Wed, 06 March 2002 10:11:12 GMT-0800
DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT))
Wed, 06 March 2002 10:11:12 GMT-0800 Wed, 06 March 2002 10:11:12 GMT-0800
mysql-test/t/type_date.test
View file @
668d09cc
...
...
@@ -62,3 +62,16 @@ create table t1 (date date);
insert
into
t1
values
(
"2000-08-10"
),(
"2000-08-11"
);
select
date_add
(
date
,
INTERVAL
1
DAY
),
date_add
(
date
,
INTERVAL
1
SECOND
)
from
t1
;
drop
table
t1
;
#
# Test problem with DATE_FORMAT
#
CREATE
TABLE
t1
(
AFIELD
INT
);
INSERT
INTO
t1
VALUES
(
1
);
CREATE
TABLE
t2
(
GMT
VARCHAR
(
32
));
INSERT
INTO
t2
VALUES
(
'GMT-0800'
);
SELECT
DATE_FORMAT
(
"2002-03-06 10:11:12"
,
CONCAT
(
'%a, %d %M %Y %H:%i:%s '
,
t2
.
GMT
))
FROM
t1
,
t2
GROUP
BY
t1
.
AFIELD
;
INSERT
INTO
t1
VALUES
(
1
);
SELECT
DATE_FORMAT
(
"2002-03-06 10:11:12"
,
CONCAT
(
'%a, %d %M %Y %H:%i:%s '
,
t2
.
GMT
)),
DATE_FORMAT
(
"2002-03-06 10:11:12"
,
CONCAT
(
'%a, %d %M %Y %H:%i:%s '
,
t2
.
GMT
))
FROM
t1
,
t2
GROUP
BY
t1
.
AFIELD
;
drop
table
t1
,
t2
;
scripts/mysqlhotcopy.sh
View file @
668d09cc
...
...
@@ -37,7 +37,7 @@ WARNING: THIS PROGRAM IS STILL IN BETA. Comments/patches welcome.
# Documentation continued at end of file
my
$VERSION
=
"1.1
4
"
;
my
$VERSION
=
"1.1
5
"
;
my
$opt_tmpdir
=
$ENV
{
TMPDIR
}
||
"/tmp"
;
...
...
@@ -562,7 +562,7 @@ sub copy_files {
# add recursive option for scp
push @cp,
"-r"
if
$^
O
=
~ /m^
(
solaris|linux|freebsd
)
$/
&&
$method
=
~ /^scp
\b
/
;
my @non_raid
=
grep
{
$_
!
~ m:
\d\d
/
:
}
@
$files
;
my @non_raid
=
grep
{
!
m:/
\d
{
2
}
/[^/]+
$
:
}
@
$files
;
# add files to copy and the destination directory
safe_system
(
@cp, @non_raid,
$target
)
;
...
...
sql/item_timefunc.cc
View file @
668d09cc
...
...
@@ -672,7 +672,7 @@ String *Item_func_date_format::val_str(String *str)
else
size
=
format_length
(
format
);
if
(
format
==
str
)
str
=&
str_value
;
// Save result here
str
=&
value
;
// Save result here
if
(
str
->
alloc
(
size
))
{
null_value
=
1
;
...
...
sql/item_timefunc.h
View file @
668d09cc
...
...
@@ -297,6 +297,7 @@ class Item_func_date_format :public Item_str_func
{
int
fixed_length
;
const
bool
date_or_time
;
String
value
;
public:
Item_func_date_format
(
Item
*
a
,
Item
*
b
,
bool
date_or_time_arg
)
:
Item_str_func
(
a
,
b
),
date_or_time
(
date_or_time_arg
)
{}
...
...
sql/table.cc
View file @
668d09cc
...
...
@@ -601,7 +601,7 @@ int closefrm(register TABLE *table)
}
delete
table
->
file
;
table
->
file
=
0
;
/* For easyer errorchecking */
hash_free
(
&
outparam
->
name_hash
);
hash_free
(
&
table
->
name_hash
);
free_root
(
&
table
->
mem_root
,
MYF
(
0
));
DBUG_RETURN
(
error
);
}
...
...
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