mirror of
https://github.com/MariaDB/server.git
synced 2025-11-15 09:02:33 +03:00
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into zim.(none):/home/brian/mysql/mysql-5.0
This commit is contained in:
@@ -216,6 +216,25 @@ NDBCLUSTER_PORT=9350
|
||||
MYSQL_MANAGER_PW_FILE=$MYSQL_TEST_DIR/var/tmp/manager.pwd
|
||||
MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
|
||||
MYSQL_MANAGER_USER=root
|
||||
|
||||
#
|
||||
# To make it easier for different devs to work on the same host,
|
||||
# an environment variable can be used to control all ports. A small
|
||||
# number is to be used, 0 - 16 or similar.
|
||||
#
|
||||
if [ -n "$MTR_BUILD_THREAD" ] ; then
|
||||
MASTER_MYPORT=`expr $MTR_BUILD_THREAD '*' 40 + 8120`
|
||||
MYSQL_MANAGER_PORT=`expr $MASTER_MYPORT + 2`
|
||||
SLAVE_MYPORT=`expr $MASTER_MYPORT + 16`
|
||||
NDBCLUSTER_PORT=`expr $MASTER_MYPORT + 24`
|
||||
|
||||
echo "Using MTR_BUILD_THREAD = $MTR_BUILD_THREAD"
|
||||
echo "Using MASTER_MYPORT = $MASTER_MYPORT"
|
||||
echo "Using MYSQL_MANAGER_PORT = $MYSQL_MANAGER_PORT"
|
||||
echo "Using SLAVE_MYPORT = $SLAVE_MYPORT"
|
||||
echo "Using NDBCLUSTER_PORT = $NDBCLUSTER_PORT"
|
||||
fi
|
||||
|
||||
NO_SLAVE=0
|
||||
USER_TEST=
|
||||
FAILED_CASES=
|
||||
|
||||
@@ -760,3 +760,54 @@ call t_sysdate();
|
||||
@a != @b
|
||||
1
|
||||
drop procedure t_sysdate;
|
||||
select timestampdiff(month,'2004-09-11','2004-09-11');
|
||||
timestampdiff(month,'2004-09-11','2004-09-11')
|
||||
0
|
||||
select timestampdiff(month,'2004-09-11','2005-09-11');
|
||||
timestampdiff(month,'2004-09-11','2005-09-11')
|
||||
12
|
||||
select timestampdiff(month,'2004-09-11','2006-09-11');
|
||||
timestampdiff(month,'2004-09-11','2006-09-11')
|
||||
24
|
||||
select timestampdiff(month,'2004-09-11','2007-09-11');
|
||||
timestampdiff(month,'2004-09-11','2007-09-11')
|
||||
36
|
||||
select timestampdiff(month,'2005-09-11','2004-09-11');
|
||||
timestampdiff(month,'2005-09-11','2004-09-11')
|
||||
-12
|
||||
select timestampdiff(month,'2005-09-11','2003-09-11');
|
||||
timestampdiff(month,'2005-09-11','2003-09-11')
|
||||
-24
|
||||
select timestampdiff(month,'2004-02-28','2005-02-28');
|
||||
timestampdiff(month,'2004-02-28','2005-02-28')
|
||||
12
|
||||
select timestampdiff(month,'2004-02-29','2005-02-28');
|
||||
timestampdiff(month,'2004-02-29','2005-02-28')
|
||||
11
|
||||
select timestampdiff(month,'2004-02-28','2005-02-28');
|
||||
timestampdiff(month,'2004-02-28','2005-02-28')
|
||||
12
|
||||
select timestampdiff(month,'2004-03-29','2005-03-28');
|
||||
timestampdiff(month,'2004-03-29','2005-03-28')
|
||||
11
|
||||
select timestampdiff(month,'2003-02-28','2004-02-29');
|
||||
timestampdiff(month,'2003-02-28','2004-02-29')
|
||||
12
|
||||
select timestampdiff(month,'2003-02-28','2005-02-28');
|
||||
timestampdiff(month,'2003-02-28','2005-02-28')
|
||||
24
|
||||
select timestampdiff(month,'1999-09-11','2001-10-10');
|
||||
timestampdiff(month,'1999-09-11','2001-10-10')
|
||||
24
|
||||
select timestampdiff(month,'1999-09-11','2001-9-11');
|
||||
timestampdiff(month,'1999-09-11','2001-9-11')
|
||||
24
|
||||
select timestampdiff(year,'1999-09-11','2001-9-11');
|
||||
timestampdiff(year,'1999-09-11','2001-9-11')
|
||||
2
|
||||
select timestampdiff(year,'2004-02-28','2005-02-28');
|
||||
timestampdiff(year,'2004-02-28','2005-02-28')
|
||||
1
|
||||
select timestampdiff(year,'2004-02-29','2005-02-28');
|
||||
timestampdiff(year,'2004-02-29','2005-02-28')
|
||||
0
|
||||
|
||||
@@ -404,4 +404,28 @@ delimiter ;//
|
||||
call t_sysdate();
|
||||
drop procedure t_sysdate;
|
||||
|
||||
#
|
||||
# Bug #13534: timestampdiff() returned incorrect results across leap years
|
||||
#
|
||||
select timestampdiff(month,'2004-09-11','2004-09-11');
|
||||
select timestampdiff(month,'2004-09-11','2005-09-11');
|
||||
select timestampdiff(month,'2004-09-11','2006-09-11');
|
||||
select timestampdiff(month,'2004-09-11','2007-09-11');
|
||||
select timestampdiff(month,'2005-09-11','2004-09-11');
|
||||
select timestampdiff(month,'2005-09-11','2003-09-11');
|
||||
|
||||
select timestampdiff(month,'2004-02-28','2005-02-28');
|
||||
select timestampdiff(month,'2004-02-29','2005-02-28');
|
||||
select timestampdiff(month,'2004-02-28','2005-02-28');
|
||||
select timestampdiff(month,'2004-03-29','2005-03-28');
|
||||
select timestampdiff(month,'2003-02-28','2004-02-29');
|
||||
select timestampdiff(month,'2003-02-28','2005-02-28');
|
||||
|
||||
select timestampdiff(month,'1999-09-11','2001-10-10');
|
||||
select timestampdiff(month,'1999-09-11','2001-9-11');
|
||||
|
||||
select timestampdiff(year,'1999-09-11','2001-9-11');
|
||||
select timestampdiff(year,'2004-02-28','2005-02-28');
|
||||
select timestampdiff(year,'2004-02-29','2005-02-28');
|
||||
|
||||
# End of 5.0 tests
|
||||
|
||||
Reference in New Issue
Block a user