Commit 17b36879 authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

Merge from mysql-5.5-bugfixing to mysql-5.5-runtime.

parents a663eb50 f0d2765c
......@@ -2155,9 +2155,8 @@ sub environment_setup {
# mysqlhotcopy
# ----------------------------------------------------
my $mysqlhotcopy=
mtr_pl_maybe_exists("$bindir/scripts/mysqlhotcopy");
# Since mysqltest interprets the real path as "false" in an if,
# use 1 ("true") to indicate "not exists" so it can be tested for
mtr_pl_maybe_exists("$bindir/scripts/mysqlhotcopy") ||
mtr_pl_maybe_exists("$path_client_bindir/mysqlhotcopy");
if ($mysqlhotcopy)
{
$ENV{'MYSQLHOTCOPY'}= $mysqlhotcopy;
......
......@@ -1715,7 +1715,7 @@ drop table t1;
#
End of 5.1 tests
#
# Bug#55648: Server crash on MIX/MAX on maximum time value
# Bug#55648: Server crash on MIN/MAX on maximum time value
#
CREATE TABLE t1(c1 TIME NOT NULL);
INSERT INTO t1 VALUES('837:59:59');
......@@ -1725,3 +1725,13 @@ MAX(c1)
838:59:59
DROP TABLE t1;
# End of the bug#55648
#
# Bug#56120: Failed assertion on MIN/MAX on negative time value
#
CREATE TABLE t1(c1 TIME NOT NULL);
INSERT INTO t1 VALUES('-00:00:01');
SELECT MAX(c1),MIN(c1) FROM t1;
MAX(c1) MIN(c1)
-00:00:01 -00:00:01
DROP TABLE t1;
# End of the bug#56120
......@@ -432,8 +432,5 @@ Bug #47147: mysql client option --skip-column-names does not apply to vertical o
*************************** 1. row ***************************
1
Bug #54466 client 5.5 built from source lacks "pager" support
a
1
End of tests
Bug #54466 client 5.5 built from source lacks "pager" support
a
1
End of tests
......@@ -193,4 +193,4 @@ mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
mysqld-bin.000001 # Write_rows 2 # table_id: #
mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Query 2 # COMMIT
mysqld-bin.000001 # Query 2 # use `test`; drop table t2
mysqld-bin.000001 # Query 2 # use `test`; DROP TABLE `t2` /* generated by server */
......@@ -7,5 +7,5 @@ create table t1 (a int primary key, b int) engine=ndb;
insert into t1 values (1, 1);
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000001 # Query 1 # use `test`; drop table if exists t1
mysqld-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
drop database mysqltest;
......@@ -47,8 +47,8 @@ mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
mysqld-bin.000001 # Write_rows 1 # table_id: #
mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Query 1 # COMMIT
mysqld-bin.000001 # Query 1 # use `mysqltest`; drop table t1
mysqld-bin.000001 # Query 1 # use `mysqltest`; drop table t2
mysqld-bin.000001 # Query 1 # use `mysqltest`; DROP TABLE `t1` /* generated by server */
mysqld-bin.000001 # Query 1 # use `mysqltest`; DROP TABLE `t2` /* generated by server */
mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t1 (d int key, e int) engine=ndb
mysqld-bin.000001 # Query 1 # use `mysqltest`; create table t2 (d int key, e int) engine=ndb
mysqld-bin.000001 # Query 1 # BEGIN
......
......@@ -37,7 +37,7 @@ mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
mysqld-bin.000001 # Write_rows 1 # table_id: #
mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Query 1 # COMMIT
mysqld-bin.000001 # Query 1 # use `test`; DROP TABLE t2
mysqld-bin.000001 # Query 1 # use `test`; DROP TABLE `t2` /* generated by server */
SELECT inserts,updates,deletes,schemaops FROM
mysql.ndb_binlog_index WHERE epoch=<the_epoch>;
inserts updates deletes schemaops
......@@ -73,7 +73,7 @@ mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
mysqld-bin.000001 # Write_rows 2 # table_id: #
mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Query 2 # COMMIT
mysqld-bin.000001 # Query 2 # use `test`; drop table t1
mysqld-bin.000001 # Query 2 # use `test`; DROP TABLE `t1` /* generated by server */
SELECT inserts,updates,deletes,schemaops FROM
mysql.ndb_binlog_index WHERE epoch > <the_epoch> AND epoch <= <the_epoch2>;
inserts updates deletes schemaops
......
......@@ -25,7 +25,7 @@ master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table t1
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
......@@ -204,7 +204,7 @@ master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table t1
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
......@@ -240,7 +240,7 @@ slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
slave-bin.000001 # Write_rows # # table_id: #
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Query # # use `test`; drop table t1
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
slave-bin.000001 # Query # # BEGIN
slave-bin.000001 # Table_map # # table_id: # (test.t1)
......
......@@ -37,7 +37,7 @@ master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
**** On Master ****
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
INSERT INTO t1 VALUES (1,1), (2,2);
......@@ -72,7 +72,7 @@ master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
......@@ -86,4 +86,4 @@ master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE t1
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
......@@ -1086,7 +1086,7 @@ drop table t1;
--echo End of 5.1 tests
--echo #
--echo # Bug#55648: Server crash on MIX/MAX on maximum time value
--echo # Bug#55648: Server crash on MIN/MAX on maximum time value
--echo #
CREATE TABLE t1(c1 TIME NOT NULL);
INSERT INTO t1 VALUES('837:59:59');
......@@ -1095,3 +1095,12 @@ SELECT MAX(c1) FROM t1;
DROP TABLE t1;
--echo # End of the bug#55648
--echo #
--echo # Bug#56120: Failed assertion on MIN/MAX on negative time value
--echo #
CREATE TABLE t1(c1 TIME NOT NULL);
INSERT INTO t1 VALUES('-00:00:01');
SELECT MAX(c1),MIN(c1) FROM t1;
DROP TABLE t1;
--echo # End of the bug#56120
......@@ -425,11 +425,5 @@ drop table t1;
--echo
--exec $MYSQL --skip-column-names --vertical test -e "select 1 as a"
#
# Bug #54466 client 5.5 built from source lacks "pager" support
#
--echo Bug #54466 client 5.5 built from source lacks "pager" support
--exec $MYSQL --pager test -e "select 1 as a"
--echo
--echo End of tests
-- source include/not_windows.inc
# This test should work in embedded server after we fix mysqltest
-- source include/not_embedded.inc
#
# Testing the MySQL command line client(mysql)
#
#
# Bug #54466 client 5.5 built from source lacks "pager" support
#
--echo Bug #54466 client 5.5 built from source lacks "pager" support
--exec $MYSQL --pager test -e "select 1 as a"
--echo
--echo End of tests
......@@ -7510,9 +7510,14 @@ String *Item_cache_datetime::val_str(String *str)
return NULL;
if (cached_field_type == MYSQL_TYPE_TIME)
{
ulonglong time= int_value;
DBUG_ASSERT(time <= TIME_MAX_VALUE);
longlong time= int_value;
set_zero_time(&ltime, MYSQL_TIMESTAMP_TIME);
if (time < 0)
{
time= -time;
ltime.neg= TRUE;
}
DBUG_ASSERT(time <= TIME_MAX_VALUE);
ltime.second= time % 100;
time/= 100;
ltime.minute= time % 100;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment