Skip to content

Commit

Permalink
Merge 10.3 into 10.4
Browse files Browse the repository at this point in the history
In is_eits_usable(), we disable an assertion that fails due to
MDEV-19334.
  • Loading branch information
dr-m committed Apr 25, 2019
2 parents 1599825 + acf6f92 commit e6bdf77
Show file tree
Hide file tree
Showing 88 changed files with 1,761 additions and 341 deletions.
2 changes: 1 addition & 1 deletion client/CMakeLists.txt
@@ -1,5 +1,5 @@
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2008, 2018, MariaDB Corporation
# Copyright (c) 2008, 2019, MariaDB Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 1 addition & 3 deletions extra/mariabackup/xtrabackup.cc
Expand Up @@ -1984,10 +1984,8 @@ static bool innodb_init()
}

if (err != DB_SUCCESS) {
msg("mariabackup: innodb_init() returned %d (%s).",
die("mariabackup: innodb_init() returned %d (%s).",
err, ut_strerr(err));
innodb_shutdown();
return(TRUE);
}

return(FALSE);
Expand Down
19 changes: 17 additions & 2 deletions man/mysql_install_db.1
@@ -1,6 +1,6 @@
'\" t
.\"
.TH "\FBMYSQL_INSTALL_DB\" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.TH "\FBMYSQL_INSTALL_DB\FR" "1" "4 April 2019" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
Expand Down Expand Up @@ -198,6 +198,21 @@ Must be given as first option\&.
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_install_db: defaults-group-suffix option
.\" defaults-group-suffix option: mysql_install_db
\fB\-\-defaults\-group\-suffix=\fR\fB\fIname\fR\fR
.sp
In addition to the given groups, also read groups with this suffix\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysql_install_db: force option
.\" force option: mysql_install_db
\fB\-\-force\fR
Expand Down Expand Up @@ -354,7 +369,7 @@ For internal use\&. This option is used for creating Windows distributions\&.
.SH "COPYRIGHT"
.br
.PP
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2019 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
Expand Down
68 changes: 68 additions & 0 deletions mysql-test/main/ctype_utf8.result
Expand Up @@ -11300,5 +11300,73 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
SET sql_mode=DEFAULT;
#
# MDEV-19239 ERROR 1300 (HY000): Invalid utf8 character string in 10.3.13-MariaDB
#
SET NAMES utf8;
SELECT
x.消息ID,
x.消息TITLE,
x.消息类型,
x.发送时间,
x.阅读时间,x.老师ID,
IF(x.四天内最近一次登录时间='2100-01-01 00:00:00','',x.四天内最近一次登录时间) 四天内最近一次登录时间
FROM (
SELECT
msg.*,
CASE
WHEN login.login_time BETWEEN msg.发送时间 AND DATE_ADD(msg.发送时间,INTERVAL 4 DAY)
THEN login.login_time
WHEN (login.login_time NOT BETWEEN msg.发送时间 AND DATE_ADD(msg.发送时间,INTERVAL 4 DAY)) AND login.login_time>0
THEN '2100-01-01 00:00:00' ELSE ''
END 四天内最近一次登录时间
FROM (
SELECT
me.id 消息ID,
me.title 消息TITLE,
CASE
WHEN me.type=1
THEN 'Interview Message'
WHEN me.type=2
THEN 'Orientation Message'
WHEN me.type=3
THEN 'Warning Message'
WHEN me.type=4
THEN 'Fail Message'
WHEN me.type=5
THEN 'FM Message'
WHEN me.type=6
THEN 'Training Message'
WHEN me.type=7
THEN 'TUrgent Message'
END 消息类型,
FROM_UNIXTIME(me.sending_time) 发送时间,
IF(tar.is_read=1,FROM_UNIXTIME(tar.read_time),'') 阅读时间,
tar.tid 老师ID
FROM ebk_message me
LEFT JOIN ebk_message_target tar
ON me.id=tar.msg_id
WHERE
FROM_UNIXTIME(me.sending_time,'%Y-%m-%d') BETWEEN 'start' AND 'end' AND me.status=1 AND tar.tid>0
GROUP BY
tar.tid,
me.sending_time,me.id) msg
LEFT JOIN (
SELECT tid,FROM_UNIXTIME(login_time) login_time
FROM ebk_teacher_login_log
WHERE FROM_UNIXTIME(login_time,'%Y-%m-%d') BETWEEN 'start' AND DATE_ADD('end',INTERVAL 4 DAY)
ORDER BY tid,FROM_UNIXTIME(login_time)) login
ON
msg.老师ID=login.tid
ORDER BY msg.消息ID,msg.发送时间,msg.老师ID,login_time) x
GROUP BY x.消息ID,x.发送时间,x.老师ID;
ERROR 42S02: Table 'test.ebk_message' doesn't exist
SET NAMES utf8;
CREATE TABLE t1 (x INT);
INSERT INTO t1 VALUES (1);
SELECT x AS 5天内最近一次登录时间 FROM t1;
5天内最近一次登录时间
1
DROP TABLE t1;
#
# End of 10.3 tests
#
75 changes: 75 additions & 0 deletions mysql-test/main/ctype_utf8.test
Expand Up @@ -2180,6 +2180,81 @@ DROP TABLE t1;
SET sql_mode=DEFAULT;


--echo #
--echo # MDEV-19239 ERROR 1300 (HY000): Invalid utf8 character string in 10.3.13-MariaDB
--echo #

#
# Test that the following query does not fail on "Invalid utf8 character string"
#

SET NAMES utf8;
--error ER_NO_SUCH_TABLE
SELECT
x.消息ID,
x.消息TITLE,
x.消息类型,
x.发送时间,
x.阅读时间,x.老师ID,
IF(x.四天内最近一次登录时间='2100-01-01 00:00:00','',x.四天内最近一次登录时间) 四天内最近一次登录时间
FROM (
SELECT
msg.*,
CASE
WHEN login.login_time BETWEEN msg.发送时间 AND DATE_ADD(msg.发送时间,INTERVAL 4 DAY)
THEN login.login_time
WHEN (login.login_time NOT BETWEEN msg.发送时间 AND DATE_ADD(msg.发送时间,INTERVAL 4 DAY)) AND login.login_time>0
THEN '2100-01-01 00:00:00' ELSE ''
END 四天内最近一次登录时间
FROM (
SELECT
me.id 消息ID,
me.title 消息TITLE,
CASE
WHEN me.type=1
THEN 'Interview Message'
WHEN me.type=2
THEN 'Orientation Message'
WHEN me.type=3
THEN 'Warning Message'
WHEN me.type=4
THEN 'Fail Message'
WHEN me.type=5
THEN 'FM Message'
WHEN me.type=6
THEN 'Training Message'
WHEN me.type=7
THEN 'TUrgent Message'
END 消息类型,
FROM_UNIXTIME(me.sending_time) 发送时间,
IF(tar.is_read=1,FROM_UNIXTIME(tar.read_time),'') 阅读时间,
tar.tid 老师ID
FROM ebk_message me
LEFT JOIN ebk_message_target tar
ON me.id=tar.msg_id
WHERE
FROM_UNIXTIME(me.sending_time,'%Y-%m-%d') BETWEEN 'start' AND 'end' AND me.status=1 AND tar.tid>0
GROUP BY
tar.tid,
me.sending_time,me.id) msg
LEFT JOIN (
SELECT tid,FROM_UNIXTIME(login_time) login_time
FROM ebk_teacher_login_log
WHERE FROM_UNIXTIME(login_time,'%Y-%m-%d') BETWEEN 'start' AND DATE_ADD('end',INTERVAL 4 DAY)
ORDER BY tid,FROM_UNIXTIME(login_time)) login
ON
msg.老师ID=login.tid
ORDER BY msg.消息ID,msg.发送时间,msg.老师ID,login_time) x
GROUP BY x.消息ID,x.发送时间,x.老师ID;


SET NAMES utf8;
CREATE TABLE t1 (x INT);
INSERT INTO t1 VALUES (1);
SELECT x AS 5天内最近一次登录时间 FROM t1;
DROP TABLE t1;


--echo #
--echo # End of 10.3 tests
--echo #
115 changes: 113 additions & 2 deletions mysql-test/main/func_hybrid_type.result
Expand Up @@ -3771,10 +3771,121 @@ t2 CREATE TABLE `t2` (
DROP TABLE t1, t2;
SET sql_mode=DEFAULT;
#
# End of 10.3 tests
# MDEV-17325 NULL-ability problems with LEAST() in combination with NO_ZERO_DATE and NO_ZERO_IN_DATE
#
SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
SELECT
LEAST('0000-00-00',DATE'2001-01-01') AS s1,
LEAST('0001-00-01',DATE'2001-01-01') AS s2,
LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3,
LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4,
LEAST(0,DATE'2001-01-01') AS i1,
LEAST(20010001,DATE'2001-01-01') AS i2,
LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3,
LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def s1 10 10 0 Y 128 0 63
def s2 10 10 0 Y 128 0 63
def s3 12 26 0 Y 128 0 63
def s4 12 26 0 Y 128 0 63
def i1 10 10 0 Y 128 0 63
def i2 10 10 0 Y 128 0 63
def i3 12 19 0 Y 128 0 63
def i4 12 19 0 Y 128 0 63
s1 s2 s3 s4 i1 i2 i3 i4
NULL NULL NULL NULL NULL NULL NULL NULL
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0001-00-01'
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
Warning 1292 Incorrect datetime value: '0001-00-01 00:00:00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '2001-00-01'
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
Warning 1292 Incorrect datetime value: '2001-00-01 00:00:00'
SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
CREATE TABLE t1 AS SELECT
LEAST('0000-00-00',DATE'2001-01-01') AS s1,
LEAST('0001-00-01',DATE'2001-01-01') AS s2,
LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3,
LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4,
LEAST(0,DATE'2001-01-01') AS i1,
LEAST(20010001,DATE'2001-01-01') AS i2,
LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3,
LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4;
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0001-00-01'
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
Warning 1292 Incorrect datetime value: '0001-00-01 00:00:00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '2001-00-01'
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
Warning 1292 Incorrect datetime value: '2001-00-01 00:00:00'
SELECT * FROM t1;
s1 s2 s3 s4 i1 i2 i3 i4
NULL NULL NULL NULL NULL NULL NULL NULL
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`s1` date DEFAULT NULL,
`s2` date DEFAULT NULL,
`s3` datetime DEFAULT NULL,
`s4` datetime DEFAULT NULL,
`i1` date DEFAULT NULL,
`i2` date DEFAULT NULL,
`i3` datetime DEFAULT NULL,
`i4` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30');
CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1;
SELECT * FROM t1;
c1
2001-01-01 00:00:00
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SET old_mode=ZERO_DATE_TIME_CAST;
CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1;
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00 10:20:30'
SELECT * FROM t1;
c1
NULL
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SET old_mode=DEFAULT;
SET timestamp=DEFAULT;
SET sql_mode=DEFAULT;
SET sql_mode='';
SELECT LEAST(999,TIME'10:20:30') AS c1;
c1
NULL
Warnings:
Warning 1292 Incorrect time value: '999'
CREATE TABLE t1 AS SELECT LEAST(999,TIME'10:20:30') AS c1;
Warnings:
Warning 1292 Incorrect time value: '999'
SELECT * FROM t1;
c1
NULL
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` time DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SET sql_mode=DEFAULT;
#
# Start of 10.4 tests
# End of 10.3 tests
#
#
# MDEV-17325 NULL-ability problems with LEAST() in combination with NO_ZERO_DATE and NO_ZERO_IN_DATE
Expand Down

0 comments on commit e6bdf77

Please sign in to comment.