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
88b0e989
Commit
88b0e989
authored
Jun 14, 2006
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rurik.mysql.com:/home/igor/tmp_merge
into rurik.mysql.com:/home/igor/dev/mysql-5.1-0
parents
2b02a2aa
60620b31
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
9 deletions
+29
-9
VC++Files/client/mysql.dsp
VC++Files/client/mysql.dsp
+4
-0
VC++Files/client/mysql_ia64.dsp
VC++Files/client/mysql_ia64.dsp
+4
-0
configure.in
configure.in
+1
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+8
-4
mysql-test/r/sysdate_is_now.result
mysql-test/r/sysdate_is_now.result
+1
-1
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+7
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+3
-3
sql/item_timefunc.h
sql/item_timefunc.h
+1
-0
No files found.
VC++Files/client/mysql.dsp
View file @
88b0e989
...
@@ -144,6 +144,10 @@ SOURCE=.\readline.cpp
...
@@ -144,6 +144,10 @@ SOURCE=.\readline.cpp
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=..\mysys\my_conio.c
# End Source File
# Begin Source File
SOURCE=.\sql_string.cpp
SOURCE=.\sql_string.cpp
# End Source File
# End Source File
# End Target
# End Target
...
...
VC++Files/client/mysql_ia64.dsp
View file @
88b0e989
...
@@ -130,6 +130,10 @@ SOURCE=.\readline.cpp
...
@@ -130,6 +130,10 @@ SOURCE=.\readline.cpp
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=..\mysys\my_conio.c
# End Source File
# Begin Source File
SOURCE=.\sql_string.cpp
SOURCE=.\sql_string.cpp
# End Source File
# End Source File
# End Target
# End Target
...
...
configure.in
View file @
88b0e989
...
@@ -15,7 +15,7 @@ DOT_FRM_VERSION=6
...
@@ -15,7 +15,7 @@ DOT_FRM_VERSION=6
# See the libtool docs for information on how to do shared lib versions.
# See the libtool docs for information on how to do shared lib versions.
SHARED_LIB_MAJOR_VERSION
=
15
SHARED_LIB_MAJOR_VERSION
=
15
SHARED_LIB_VERSION
=
$SHARED_LIB_MAJOR_VERSION
:0:0
SHARED_LIB_VERSION
=
$SHARED_LIB_MAJOR_VERSION
:0:0
}
# Set all version vars based on $VERSION. How do we do this more elegant ?
# Set all version vars based on $VERSION. How do we do this more elegant ?
# Remember that regexps needs to quote [ and ] since this is run through m4
# Remember that regexps needs to quote [ and ] since this is run through m4
MYSQL_NO_DASH_VERSION
=
`
echo
$VERSION
|
sed
-e
"s|[[a-z]]*-.*
$|
|"
`
MYSQL_NO_DASH_VERSION
=
`
echo
$VERSION
|
sed
-e
"s|[[a-z]]*-.*
$|
|"
`
...
...
mysql-test/r/func_time.result
View file @
88b0e989
...
@@ -7,20 +7,20 @@ period_add("9602",-12) period_diff(199505,"9404")
...
@@ -7,20 +7,20 @@ period_add("9602",-12) period_diff(199505,"9404")
199502 13
199502 13
select now()-now(),weekday(curdate())-weekday(now()),unix_timestamp()-unix_timestamp(now());
select now()-now(),weekday(curdate())-weekday(now()),unix_timestamp()-unix_timestamp(now());
now()-now() weekday(curdate())-weekday(now()) unix_timestamp()-unix_timestamp(now())
now()-now() weekday(curdate())-weekday(now()) unix_timestamp()-unix_timestamp(now())
0 0 0
0
.000000
0 0
select from_unixtime(unix_timestamp("1994-03-02 10:11:12")),from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s"),from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0;
select from_unixtime(unix_timestamp("1994-03-02 10:11:12")),from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s"),from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0;
from_unixtime(unix_timestamp("1994-03-02 10:11:12")) from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s") from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0
from_unixtime(unix_timestamp("1994-03-02 10:11:12")) from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s") from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0
1994-03-02 10:11:12 1994-03-02 10:11:12 19940302101112
1994-03-02 10:11:12 1994-03-02 10:11:12 19940302101112
.000000
select sec_to_time(9001),sec_to_time(9001)+0,time_to_sec("15:12:22"),
select sec_to_time(9001),sec_to_time(9001)+0,time_to_sec("15:12:22"),
sec_to_time(time_to_sec("0:30:47")/6.21);
sec_to_time(time_to_sec("0:30:47")/6.21);
sec_to_time(9001) sec_to_time(9001)+0 time_to_sec("15:12:22") sec_to_time(time_to_sec("0:30:47")/6.21)
sec_to_time(9001) sec_to_time(9001)+0 time_to_sec("15:12:22") sec_to_time(time_to_sec("0:30:47")/6.21)
02:30:01 23001 54742 00:04:57
02:30:01 23001
.000000
54742 00:04:57
select sec_to_time(time_to_sec('-838:59:59'));
select sec_to_time(time_to_sec('-838:59:59'));
sec_to_time(time_to_sec('-838:59:59'))
sec_to_time(time_to_sec('-838:59:59'))
-838:59:59
-838:59:59
select now()-curdate()*1000000-curtime();
select now()-curdate()*1000000-curtime();
now()-curdate()*1000000-curtime()
now()-curdate()*1000000-curtime()
0
0
.000000
select strcmp(current_timestamp(),concat(current_date()," ",current_time()));
select strcmp(current_timestamp(),concat(current_date()," ",current_time()));
strcmp(current_timestamp(),concat(current_date()," ",current_time()))
strcmp(current_timestamp(),concat(current_date()," ",current_time()))
0
0
...
@@ -751,6 +751,10 @@ select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
...
@@ -751,6 +751,10 @@ select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
monthname(str_to_date(null, '%m')) monthname(str_to_date(null, '%m')) monthname(str_to_date(1, '%m')) monthname(str_to_date(0, '%m'))
monthname(str_to_date(null, '%m')) monthname(str_to_date(null, '%m')) monthname(str_to_date(1, '%m')) monthname(str_to_date(0, '%m'))
NULL NULL January NULL
NULL NULL January NULL
select now() - now() + 0, curtime() - curtime() + 0,
sec_to_time(1) + 0, from_unixtime(1) + 0;
now() - now() + 0 curtime() - curtime() + 0 sec_to_time(1) + 0 from_unixtime(1) + 0
0.000000 0.000000 1.000000 19700101030001.000000
End of 4.1 tests
End of 4.1 tests
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
...
...
mysql-test/r/sysdate_is_now.result
View file @
88b0e989
set timestamp=1;
set timestamp=1;
SELECT sleep(1),NOW()-SYSDATE() as zero;
SELECT sleep(1),NOW()-SYSDATE() as zero;
sleep(1) zero
sleep(1) zero
0 0
0 0
.000000
mysql-test/t/func_time.test
View file @
88b0e989
...
@@ -367,6 +367,13 @@ select last_day('2005-01-00');
...
@@ -367,6 +367,13 @@ select last_day('2005-01-00');
select
monthname
(
str_to_date
(
null
,
'%m'
)),
monthname
(
str_to_date
(
null
,
'%m'
)),
select
monthname
(
str_to_date
(
null
,
'%m'
)),
monthname
(
str_to_date
(
null
,
'%m'
)),
monthname
(
str_to_date
(
1
,
'%m'
)),
monthname
(
str_to_date
(
0
,
'%m'
));
monthname
(
str_to_date
(
1
,
'%m'
)),
monthname
(
str_to_date
(
0
,
'%m'
));
#
# Bug #16546
#
select
now
()
-
now
()
+
0
,
curtime
()
-
curtime
()
+
0
,
sec_to_time
(
1
)
+
0
,
from_unixtime
(
1
)
+
0
;
--
echo
End
of
4.1
tests
--
echo
End
of
4.1
tests
explain
extended
select
timestampdiff
(
SQL_TSI_WEEK
,
'2001-02-01'
,
'2001-05-01'
)
as
a1
,
explain
extended
select
timestampdiff
(
SQL_TSI_WEEK
,
'2001-02-01'
,
'2001-05-01'
)
as
a1
,
...
...
sql/item_timefunc.cc
View file @
88b0e989
...
@@ -1367,7 +1367,7 @@ void Item_func_curtime::fix_length_and_dec()
...
@@ -1367,7 +1367,7 @@ void Item_func_curtime::fix_length_and_dec()
{
{
TIME
ltime
;
TIME
ltime
;
decimals
=
0
;
decimals
=
DATETIME_DEC
;
collation
.
set
(
&
my_charset_bin
);
collation
.
set
(
&
my_charset_bin
);
store_now_in_TIME
(
&
ltime
);
store_now_in_TIME
(
&
ltime
);
value
=
TIME_to_ulonglong_time
(
&
ltime
);
value
=
TIME_to_ulonglong_time
(
&
ltime
);
...
@@ -1414,7 +1414,7 @@ String *Item_func_now::val_str(String *str)
...
@@ -1414,7 +1414,7 @@ String *Item_func_now::val_str(String *str)
void
Item_func_now
::
fix_length_and_dec
()
void
Item_func_now
::
fix_length_and_dec
()
{
{
decimals
=
0
;
decimals
=
DATETIME_DEC
;
collation
.
set
(
&
my_charset_bin
);
collation
.
set
(
&
my_charset_bin
);
store_now_in_TIME
(
&
ltime
);
store_now_in_TIME
(
&
ltime
);
...
@@ -1761,7 +1761,7 @@ void Item_func_from_unixtime::fix_length_and_dec()
...
@@ -1761,7 +1761,7 @@ void Item_func_from_unixtime::fix_length_and_dec()
{
{
thd
=
current_thd
;
thd
=
current_thd
;
collation
.
set
(
&
my_charset_bin
);
collation
.
set
(
&
my_charset_bin
);
decimals
=
0
;
decimals
=
DATETIME_DEC
;
max_length
=
MAX_DATETIME_WIDTH
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
MAX_DATETIME_WIDTH
*
MY_CHARSET_BIN_MB_MAXLEN
;
maybe_null
=
1
;
maybe_null
=
1
;
thd
->
time_zone_used
=
1
;
thd
->
time_zone_used
=
1
;
...
...
sql/item_timefunc.h
View file @
88b0e989
...
@@ -638,6 +638,7 @@ public:
...
@@ -638,6 +638,7 @@ public:
{
{
collation
.
set
(
&
my_charset_bin
);
collation
.
set
(
&
my_charset_bin
);
maybe_null
=
1
;
maybe_null
=
1
;
decimals
=
DATETIME_DEC
;
max_length
=
MAX_TIME_WIDTH
*
MY_CHARSET_BIN_MB_MAXLEN
;
max_length
=
MAX_TIME_WIDTH
*
MY_CHARSET_BIN_MB_MAXLEN
;
}
}
enum_field_types
field_type
()
const
{
return
MYSQL_TYPE_TIME
;
}
enum_field_types
field_type
()
const
{
return
MYSQL_TYPE_TIME
;
}
...
...
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