Skip to content

Commit

Permalink
Merge 10.2 into 10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgs committed Jul 16, 2019
2 parents aa96e56 + d2f094d commit 0f83c88
Show file tree
Hide file tree
Showing 155 changed files with 6,012 additions and 2,225 deletions.
11 changes: 1 addition & 10 deletions cmake/cpack_rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,8 @@ SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_SUMMARY})
SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL})
SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_SUMMARY}
It is GPL v2 licensed, which means you can use the it free of charge under the
conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
MariaDB documentation can be found at https://mariadb.com/kb
MariaDB bug reports should be submitted through https://jira.mariadb.org
")
SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")

SET(CPACK_RPM_shared_PACKAGE_VENDOR "MariaDB Corporation Ab")
SET(CPACK_RPM_shared_PACKAGE_LICENSE "LGPLv2.1")
Expand Down
6 changes: 6 additions & 0 deletions cmake/misc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ ELSE()
SET(__msg1_${id} ${hash} CACHE INTERNAL "")
ENDFUNCTION()
ENDIF()

MACRO(SET_IF_UNSET VAR VAL)
IF(NOT DEFINED ${VAR})
SET(${VAR} ${VAL})
ENDIF()
ENDMACRO()
25 changes: 14 additions & 11 deletions cmake/mysql_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,27 @@ string(TOUPPER ${SERVER_MATURITY} SERVER_MATURITY)
SET(SERVER_MATURITY_LEVEL MariaDB_PLUGIN_MATURITY_${SERVER_MATURITY})

SET(MYSQL_TCP_PORT_DEFAULT 0)
IF(NOT MYSQL_TCP_PORT)
SET(MYSQL_TCP_PORT 3306)
ENDIF()
SET_IF_UNSET(MYSQL_TCP_PORT 3306)

IF(NOT COMPILATION_COMMENT)
SET(COMPILATION_COMMENT "Source distribution")
ENDIF()
SET_IF_UNSET(COMPILATION_COMMENT "Source distribution")

INCLUDE(package_name)
IF(NOT CPACK_PACKAGE_FILE_NAME)
GET_PACKAGE_FILE_NAME(CPACK_PACKAGE_FILE_NAME)
ENDIF()

IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION}")
ENDIF()
SET(CPACK_PACKAGE_CONTACT "MariaDB Developers <maria-developers@lists.launchpad.net>")
SET(CPACK_PACKAGE_VENDOR "MariaDB Foundation")
SET_IF_UNSET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION}")
SET_IF_UNSET(CPACK_PACKAGE_CONTACT "MariaDB Developers <maria-developers@lists.launchpad.net>")
SET_IF_UNSET(CPACK_PACKAGE_VENDOR "MariaDB Foundation")
SET_IF_UNSET(CPACK_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}
It is GPL v2 licensed, which means you can use the it free of charge under the
conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
MariaDB documentation can be found at https://mariadb.com/kb
MariaDB bug reports should be submitted through https://jira.mariadb.org
")
SET(CPACK_SOURCE_GENERATOR "TGZ")

# Definitions for windows version resources
Expand Down
8 changes: 2 additions & 6 deletions cmake/systemd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,9 @@ MACRO(CHECK_SYSTEMD)
ENDIF()
ENDIF()
IF(HAVE_DLOPEN)
SET(LIBSYSTEMD ${LIBSYSTEMD_LIBRARIES})
#SET(CMAKE_REQUIRED_FLAGS ${LIBSYSTEMD_CFLAGS})
SET(MYSQLD_LINK_FLAGS "${MYSQLD_LINK_FLAGS} ${LIBSYSTEMD_LDFLAGS}")
SET(LIBSYSTEMD ${LIBSYSTEMD_LDFLAGS} ${LIBSYSTEMD_LIBRARIES})
ELSE()
SET(LIBSYSTEMD ${LIBSYSTEMD_STATIC_LIBRARIES})
#SET(CMAKE_REQUIRED_FLAGS ${LIBSYSTEMD_STATIC_CFLAGS})
SET(MYSQLD_LINK_FLAGS "${MYSQLD_LINK_FLAGS} ${LIBSYSTEMD_STATIC_LDFLAGS}")
SET(LIBSYSTEMD ${LIBSYSTEMD_STATIC_LDFLAGS} ${LIBSYSTEMD_STATIC_LIBRARIES})
ENDIF()
ELSE()
SET(LIBSYSTEMD systemd)
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)

Package: mariadb-client-core-10.3
Architecture: any
Depends: mariadb-common (>= ${source:Version}),
Depends: mariadb-common (>= ${source:Version}), libmariadb3,
${misc:Depends},
${shlibs:Depends}
Conflicts: mariadb-client-10.0,
Expand Down
2 changes: 1 addition & 1 deletion extra/yassl/taocrypt/src/des.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void BasicDES::SetKey(const byte* key, word32 /*length*/, CipherDir dir)
byte *const pc1m = buffer; /* place to modify pc1 into */
byte *const pcr = pc1m + 56; /* place to rotate pc1 into */
byte *const ks = pcr + 56;
register int i,j,l;
int i,j,l;
int m;

for (j = 0; j < 56; j++) { /* convert pc1 to bits of key */
Expand Down
14 changes: 14 additions & 0 deletions mysql-test/include/force_restart.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ==== Purpose ====
#
# Tell mtr that all servers must be restarted after the test has
# finished.
#
# ==== Usage ====
#
# --source include/force_restart.inc
#

--let $_force_restart_datadir= `SELECT @@datadir`
--append_file $_force_restart_datadir/mtr/force_restart
1
EOF
69 changes: 69 additions & 0 deletions mysql-test/include/wait_condition_with_debug.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# include/wait_condition_with_debug.inc
#
# SUMMARY
#
# Waits until the passed statement returns true, or the operation
# times out. If the operation times out, the additional error
# statement will be executed.
#
# USAGE
#
# let $wait_condition=
# SELECT c = 3 FROM t;
# let $wait_condition_on_error_output= select count(*) from t;
# [let $explicit_default_wait_timeout= N] # to override the default reset
# --source include/wait_condition_with_debug.inc
#
# OR
#
# let $wait_timeout= 60; # Override default 30 seconds with 60.
# let $wait_condition=
# SELECT c = 3 FROM t;
# let $wait_condition_on_error_output= select count(*) from t;
# --source include/wait_condition_with_debug.inc
# --echo Executed the test condition $wait_condition_reps times
#
#
# EXAMPLE
# events_bugs.test, events_time_zone.test
#

let $wait_counter= 300;
if ($wait_timeout)
{
let $wait_counter= `SELECT $wait_timeout * 10`;
}
# Reset $wait_timeout so that its value won't be used on subsequent
# calls, and default will be used instead.
if ($explicit_default_wait_timeout)
{
--let $wait_timeout= $explicit_default_wait_timeout
}
if (!$explicit_default_wait_timeout)
{
--let $wait_timeout= 0
}

# Keep track of how many times the wait condition is tested
# This is used by some tests (e.g., main.status)
let $wait_condition_reps= 0;
while ($wait_counter)
{
--error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR,ER_LOCK_DEADLOCK
let $success= `$wait_condition`;
inc $wait_condition_reps;
if ($success)
{
let $wait_counter= 0;
}
if (!$success)
{
real_sleep 0.1;
dec $wait_counter;
}
}
if (!$success)
{
echo Timeout in wait_condition.inc for $wait_condition;
--eval $wait_condition_on_error_output
}
7 changes: 7 additions & 0 deletions mysql-test/lib/My/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,13 @@ sub new {
# Skip comment
next;
}
# Correctly process Replication Filter when they are defined
# with connection name.
elsif ( $line =~ /^([\w]+.[\w]+)\s*=\s*(.*)\s*/){
my $option= $1;
my $value= $2;
$self->insert($group_name, $option, $value);
}
else {
croak "Unexpected line '$line' found in '$path'";
}
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/repair_symlink-5543.result
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
insert t1 values (1);
# Some systems fail with errcode 40, when doing openat, while others
# don't have openat and fail with errcode 20.
# Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
# while others don't have openat and fail with errcode 20.
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair error 20 for record at pos 0
Expand Down
8 changes: 4 additions & 4 deletions mysql-test/main/repair_symlink-5543.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR';
insert t1 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD
--echo # Some systems fail with errcode 40, when doing openat, while others
--echo # don't have openat and fail with errcode 20.
--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /40/20/ /".*"/"<errmsg>"/
--echo # Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
--echo # while others don't have openat and fail with errcode 20.
--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0/20/ /".*"/"<errmsg>"/
repair table t1;
drop table t1;

--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
insert t2 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD
--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /40/20/ /".*"/"<errmsg>"/
--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0/20/ /".*"/"<errmsg>"/
repair table t2;
drop table t2;

Expand Down
14 changes: 14 additions & 0 deletions mysql-test/main/sp.result
Original file line number Diff line number Diff line change
Expand Up @@ -8328,6 +8328,20 @@ UNION
SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.PARAMETERS;
DROP FUNCTION f;
DROP VIEW v;
#
# MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store,
# Assertion `field_handlers == 0 || field_pos < field_count'
#
CREATE TABLE t1 (ct time);
INSERT INTO t1 VALUES ('16:11:28');
CREATE FUNCTION f1 () RETURNS varchar(100)
BEGIN
DECLARE xxx varchar(100);
ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
RETURN xxx;
END|
ERROR 0A000: Not allowed to return a result set from a function
drop table t1;
#End of 10.1 tests
#
# MDEV-11081: CURSOR for query with GROUP BY
Expand Down
20 changes: 20 additions & 0 deletions mysql-test/main/sp.test
Original file line number Diff line number Diff line change
Expand Up @@ -9835,6 +9835,26 @@ SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.PARAMETERS;
DROP FUNCTION f;
DROP VIEW v;

--echo #
--echo # MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store,
--echo # Assertion `field_handlers == 0 || field_pos < field_count'
--echo #

CREATE TABLE t1 (ct time);
INSERT INTO t1 VALUES ('16:11:28');

DELIMITER |;
--error ER_SP_NO_RETSET
CREATE FUNCTION f1 () RETURNS varchar(100)
BEGIN
DECLARE xxx varchar(100);
ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
RETURN xxx;
END|

DELIMITER ;|
drop table t1;

--echo #End of 10.1 tests

--echo #
Expand Down
10 changes: 10 additions & 0 deletions mysql-test/main/type_datetime.result
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,16 @@ a
00:01:00
DROP TABLE t1;
#
# MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
#
CREATE TABLE t1 (i INT, d DATETIME);
INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
ExtractValue('foo','bar') i MIN(d)
NULL 1981-09-24 01:04:47
3 1976-12-14 13:21:07
DROP TABLE t1;
#
# End of 10.1 tests
#
#
Expand Down
10 changes: 10 additions & 0 deletions mysql-test/main/type_datetime.test
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,16 @@ SELECT 1 FROM t1 WHERE 20160101 > SOME (SELECT CAST(a AS DATETIME) FROM t1);
SELECT * FROM t1 WHERE 20160101 > CAST(a AS DATETIME);
DROP TABLE t1;


--echo #
--echo # MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
--echo #

CREATE TABLE t1 (i INT, d DATETIME);
INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
DROP TABLE t1;

--echo #
--echo # End of 10.1 tests
--echo #
Expand Down
Loading

0 comments on commit 0f83c88

Please sign in to comment.