Skip to content

Commit

Permalink
Merge mariadb-10.4.14
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Aug 10, 2020
2 parents 2b9c531 + ddffcad commit 101ddc5
Show file tree
Hide file tree
Showing 182 changed files with 2,842 additions and 1,041 deletions.
1 change: 0 additions & 1 deletion cmake/os/WindowsCache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ SET(HAVE_BACKTRACE_SYMBOLS CACHE INTERNAL "")
SET(HAVE_BACKTRACE_SYMBOLS_FD CACHE INTERNAL "")
SET(HAVE_BFILL CACHE INTERNAL "")
SET(HAVE_BSD_SIGNALS CACHE INTERNAL "")
SET(HAVE_BSS_START CACHE INTERNAL "")
SET(HAVE_CLOCK_GETTIME CACHE INTERNAL "")
SET(HAVE_COMPRESS CACHE INTERNAL "")
SET(HAVE_CRYPT CACHE INTERNAL "")
Expand Down
1 change: 0 additions & 1 deletion config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@
/* Symbols we may use */
#cmakedefine HAVE_SYS_ERRLIST 1
/* used by stacktrace functions */
#cmakedefine HAVE_BSS_START 1
#cmakedefine HAVE_BACKTRACE 1
#cmakedefine HAVE_BACKTRACE_SYMBOLS 1
#cmakedefine HAVE_BACKTRACE_SYMBOLS_FD 1
Expand Down
8 changes: 0 additions & 8 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -797,14 +797,6 @@ CHECK_CXX_SOURCE_COMPILES("
HAVE_ABI_CXA_DEMANGLE)
ENDIF()

CHECK_C_SOURCE_COMPILES("
int main(int argc, char **argv)
{
extern char *__bss_start;
return __bss_start ? 1 : 0;
}"
HAVE_BSS_START)

CHECK_C_SOURCE_COMPILES("
int main()
{
Expand Down
2 changes: 1 addition & 1 deletion libmariadb
1 change: 1 addition & 0 deletions libmysqld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_explain.cc ../sql/sql_explain.h
../sql/sql_analyze_stmt.cc ../sql/sql_analyze_stmt.h
../sql/compat56.cc
../sql/sql_schema.cc
../sql/sql_type.cc ../sql/sql_type.h
../sql/sql_mode.cc
../sql/sql_type_json.cc
Expand Down
4 changes: 3 additions & 1 deletion man/mysql_upgrade.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'\" t
.\"
.TH "\FBMYSQL_UPGRADE\FR" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
.TH "\FBMYSQL_UPGRADE\FR" "1" "20 July 2020" "MariaDB 10\&.4" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
Expand Down Expand Up @@ -165,6 +165,8 @@ in the data directory\&. This is used to quickly check whether all tables have b
\fB\-\-force\fR
option\&.
.PP
For this reason, \fBmysql_upgrade\fR needs to be run as a user with write access to the data directory\&.
.PP
If you install MariaDB from RPM packages on Linux, you must install the server and client RPMs\&.
\fBmysql_upgrade\fR
is included in the server RPM but requires the client RPM because the latter includes
Expand Down
1 change: 0 additions & 1 deletion mysql-test/main/disabled.def
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 chang
file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing
partition_open_files_limit : open_files_limit check broken by MDEV-18360
main.upgrade_MDEV-19650 : MDEV-23358 fails with result difference
4 changes: 2 additions & 2 deletions mysql-test/main/func_group.result
Original file line number Diff line number Diff line change
Expand Up @@ -1186,13 +1186,13 @@ i count(*) std(e1/e2)
3 4 0.00000000
select std(s1/s2) from bug22555;
std(s1/s2)
0.21325764
0.21328517
select std(o1/o2) from bug22555;
std(o1/o2)
0.2132576358664934
select std(e1/e2) from bug22555;
std(e1/e2)
0.21325764
0.21328517
set @saved_div_precision_increment=@@div_precision_increment;
set div_precision_increment=19;
select i, count(*), std(s1/s2) from bug22555 group by i order by i;
Expand Down
13 changes: 13 additions & 0 deletions mysql-test/main/grant5.result
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ ERROR HY000: Table 'procs_priv' was not locked with LOCK TABLES
REVOKE PROCESS ON *.* FROM u;
ERROR HY000: Table 'db' was not locked with LOCK TABLES
DROP TABLE t1;
create database mysqltest1;
use mysqltest1;
create table t1(id int);
insert t1 values(2);
create user u1@localhost;
grant select on mysqltest1.t1 to u1@localhost;
grant update on mysqltest1.* to u1@localhost;
connect u1, localhost, u1;
update mysqltest1.t1 set id=1 where id=2;
connection default;
disconnect u1;
drop user u1@localhost;
drop database mysqltest1;
#
# MDEV-20076: SHOW GRANTS does not quote role names properly
#
Expand Down
21 changes: 21 additions & 0 deletions mysql-test/main/grant5.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,27 @@ REVOKE EXECUTE ON PROCEDURE sp FROM u;
REVOKE PROCESS ON *.* FROM u;
DROP TABLE t1;

#
# MDEV-23010 UPDATE privilege at Database and Table level fail to update with SELECT command denied to user
#
create database mysqltest1;
use mysqltest1;
create table t1(id int);
insert t1 values(2);
create user u1@localhost;
grant select on mysqltest1.t1 to u1@localhost;
grant update on mysqltest1.* to u1@localhost;
connect u1, localhost, u1;
update mysqltest1.t1 set id=1 where id=2;
connection default;
disconnect u1;
drop user u1@localhost;
drop database mysqltest1;

#
# End of 10.1 tests
#

--echo #
--echo # MDEV-20076: SHOW GRANTS does not quote role names properly
--echo #
Expand Down
10 changes: 10 additions & 0 deletions mysql-test/main/lowercase_fs_off.result
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,13 @@ show triggers like '%T1%';
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
drop table t1;
set GLOBAL sql_mode=default;
#
# MDEV-19632 Replication aborts with ER_SLAVE_CONVERSION_FAILED upon CREATE ... SELECT in ORACLE mode
#
# Compatibility schema names respect the filesystem case sensitivity
CREATE TABLE t1 (a MARIADB_SCHEMA.date);
ERROR HY000: Unknown data type: 'MARIADB_SCHEMA.date'
CREATE TABLE t1 (a Mariadb_schema.date);
ERROR HY000: Unknown data type: 'Mariadb_schema.date'
CREATE TABLE t1 (a mariadb_schema.date);
DROP TABLE t1;
15 changes: 15 additions & 0 deletions mysql-test/main/lowercase_fs_off.test
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,18 @@ let $datadir= `select @@datadir`;
remove_file $datadir/mysql_upgrade_info;

set GLOBAL sql_mode=default;


--echo #
--echo # MDEV-19632 Replication aborts with ER_SLAVE_CONVERSION_FAILED upon CREATE ... SELECT in ORACLE mode
--echo #

--echo # Compatibility schema names respect the filesystem case sensitivity

--error ER_UNKNOWN_ERROR
CREATE TABLE t1 (a MARIADB_SCHEMA.date);
--error ER_UNKNOWN_ERROR
CREATE TABLE t1 (a Mariadb_schema.date);

CREATE TABLE t1 (a mariadb_schema.date);
DROP TABLE t1;
2 changes: 1 addition & 1 deletion mysql-test/main/parser_precedence.result
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ select 4 - 3 * 2, (4 - 3) * 2, 4 - (3 * 2);
Testing that / is left associative
select 15 / 5 / 3, (15 / 5) / 3, 15 / (5 / 3);
15 / 5 / 3 (15 / 5) / 3 15 / (5 / 3)
1.00000000 1.00000000 9.0000
1.00000000 1.00000000 8.9998
Testing that / has precedence over |
select 105 / 5 | 2, (105 / 5) | 2, 105 / (5 | 2);
105 / 5 | 2 (105 / 5) | 2 105 / (5 | 2)
Expand Down
40 changes: 40 additions & 0 deletions mysql-test/main/partition.result
Original file line number Diff line number Diff line change
Expand Up @@ -2763,5 +2763,45 @@ SELECT 1 FROM t1 WHERE a XOR 'a';
1
DROP TABLE t1;
#
# Bug #25207522: INCORRECT ORDER-BY BEHAVIOR ON A PARTITIONED TABLE
# WITH A COMPOSITE PREFIX INDEX
#
create table t1(id int unsigned not null,
data varchar(2) default null,
key data_idx (data(1),id)
) default charset=utf8
partition by range (id) (
partition p10 values less than (10),
partition p20 values less than (20)
);
insert t1 values (6, 'ab'), (4, 'ab'), (5, 'ab'), (16, 'ab'), (14, 'ab'), (15, 'ab'), (5, 'ac'), (15, 'aa') ;
select id from t1 where data = 'ab' order by id;
id
4
5
6
14
15
16
drop table t1;
create table t1(id int unsigned not null,
data text default null,
key data_idx (data(1),id)
) default charset=utf8
partition by range (id) (
partition p10 values less than (10),
partition p20 values less than (20)
);
insert t1 values (6, 'ab'), (4, 'ab'), (5, 'ab'), (16, 'ab'), (14, 'ab'), (15, 'ab'), (5, 'ac'), (15, 'aa') ;
select id from t1 where data = 'ab' order by id;
id
4
5
6
14
15
16
drop table t1;
#
# End of 10.1 tests
#
28 changes: 28 additions & 0 deletions mysql-test/main/partition.test
Original file line number Diff line number Diff line change
Expand Up @@ -2973,6 +2973,34 @@ CREATE TABLE t1(a BINARY(80)) PARTITION BY KEY(a) PARTITIONS 3;
SELECT 1 FROM t1 WHERE a XOR 'a';
DROP TABLE t1;

--echo #
--echo # Bug #25207522: INCORRECT ORDER-BY BEHAVIOR ON A PARTITIONED TABLE
--echo # WITH A COMPOSITE PREFIX INDEX
--echo #
create table t1(id int unsigned not null,
data varchar(2) default null,
key data_idx (data(1),id)
) default charset=utf8
partition by range (id) (
partition p10 values less than (10),
partition p20 values less than (20)
);
insert t1 values (6, 'ab'), (4, 'ab'), (5, 'ab'), (16, 'ab'), (14, 'ab'), (15, 'ab'), (5, 'ac'), (15, 'aa') ;
select id from t1 where data = 'ab' order by id;
drop table t1;

create table t1(id int unsigned not null,
data text default null,
key data_idx (data(1),id)
) default charset=utf8
partition by range (id) (
partition p10 values less than (10),
partition p20 values less than (20)
);
insert t1 values (6, 'ab'), (4, 'ab'), (5, 'ab'), (16, 'ab'), (14, 'ab'), (15, 'ab'), (5, 'ac'), (15, 'aa') ;
select id from t1 where data = 'ab' order by id;
drop table t1;

--echo #
--echo # End of 10.1 tests
--echo #
35 changes: 34 additions & 1 deletion mysql-test/main/stat_tables_partition.result
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,38 @@ ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SET use_stat_tables = DEFAULT;
DROP TABLE t1;
#
# MDEV-21472: ALTER TABLE ... ANALYZE PARTITION ... with EITS reads and locks all rows
#
CREATE TABLE t1 (
id int(11) auto_increment primary key,
c1 int(11) DEFAULT NULL
) PARTITION BY RANGE (id) (
PARTITION p0 VALUES LESS THAN (4),
PARTITION p1 VALUES LESS THAN MAXVALUE
);
insert into t1(c1) values (1),(1),(1),(1), (1),(1),(1),(1);
insert into t1(c1) select c1 from t1;
insert into t1(c1) select c1 from t1;
select count(*) from t1;
count(*)
32
select count(*) from t1 where id <4;
count(*)
3
flush status;
set session use_stat_tables='preferably';
# Must NOT show "Engine-independent statistics collected":
alter table t1 analyze partition p0;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Should not have Handler_read_rnd_next=34
show session status like 'Handler_read_rnd%';
Variable_name Value
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 34
drop table t1;
SET use_stat_tables = DEFAULT;
30 changes: 28 additions & 2 deletions mysql-test/main/stat_tables_partition.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,33 @@ CREATE TABLE t1 (pk int PRIMARY KEY, a bit(1), INDEX idx(a)
INSERT INTO t1 VALUES (1,1),(2,0),(3,0),(4,1);

ANALYZE TABLE t1;
DROP TABLE t1;

SET use_stat_tables = DEFAULT;
--echo #
--echo # MDEV-21472: ALTER TABLE ... ANALYZE PARTITION ... with EITS reads and locks all rows
--echo #
CREATE TABLE t1 (
id int(11) auto_increment primary key,
c1 int(11) DEFAULT NULL
) PARTITION BY RANGE (id) (
PARTITION p0 VALUES LESS THAN (4),
PARTITION p1 VALUES LESS THAN MAXVALUE
);

DROP TABLE t1;
insert into t1(c1) values (1),(1),(1),(1), (1),(1),(1),(1);
insert into t1(c1) select c1 from t1;
insert into t1(c1) select c1 from t1;

select count(*) from t1;
select count(*) from t1 where id <4;
flush status;
set session use_stat_tables='preferably';

--echo # Must NOT show "Engine-independent statistics collected":
alter table t1 analyze partition p0;

--echo # Should not have Handler_read_rnd_next=34
show session status like 'Handler_read_rnd%';
drop table t1;

SET use_stat_tables = DEFAULT;
24 changes: 24 additions & 0 deletions mysql-test/main/subselect4.result
Original file line number Diff line number Diff line change
Expand Up @@ -2585,6 +2585,30 @@ e 2
o 6
DROP TABLE t1, t2;
#
# MDEV-19232: Floating point precision / value comparison problem
#
CREATE TABLE t1 (region varchar(60), area decimal(10,0), population decimal(11,0));
INSERT INTO t1 VALUES ('Central America and the Caribbean',91,11797);
INSERT INTO t1 VALUES ('Central America and the Caribbean',442,66422);
SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='subquery_cache=on';
SELECT
population, area, population/area,
cast(population/area as DECIMAL(20,9)) FROM t1 LIMIT 1;
population area population/area cast(population/area as DECIMAL(20,9))
11797 91 129.6374 129.637400000
SELECT * FROM t1 A
WHERE population/area = (SELECT MAX(population/area) from t1 B where A.region = B.region);
region area population
Central America and the Caribbean 442 66422
SET optimizer_switch='subquery_cache=off';
SELECT * FROM t1 A
WHERE population/area = (SELECT MAX(population/area) from t1 B where A.region = B.region);
region area population
Central America and the Caribbean 442 66422
SET @@optimizer_switch= @save_optimizer_switch;
DROP TABLE t1;
#
# MDEV-22852: SIGSEGV in sortlength (optimized builds)
#
SET @save_optimizer_switch=@@optimizer_switch;
Expand Down
26 changes: 26 additions & 0 deletions mysql-test/main/subselect4.test
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,32 @@ EXPLAIN EXTENDED SELECT * FROM t1 where ( t1.l1 < ANY (SELECT MAX(t2.v1) FROM t
SELECT * FROM t1 where ( t1.l1 < ANY (SELECT MAX(t2.v1) FROM t2));
DROP TABLE t1, t2;

--echo #
--echo # MDEV-19232: Floating point precision / value comparison problem
--echo #

CREATE TABLE t1 (region varchar(60), area decimal(10,0), population decimal(11,0));
INSERT INTO t1 VALUES ('Central America and the Caribbean',91,11797);
INSERT INTO t1 VALUES ('Central America and the Caribbean',442,66422);

SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='subquery_cache=on';

SELECT
population, area, population/area,
cast(population/area as DECIMAL(20,9)) FROM t1 LIMIT 1;

SELECT * FROM t1 A
WHERE population/area = (SELECT MAX(population/area) from t1 B where A.region = B.region);

SET optimizer_switch='subquery_cache=off';
SELECT * FROM t1 A
WHERE population/area = (SELECT MAX(population/area) from t1 B where A.region = B.region);

SET @@optimizer_switch= @save_optimizer_switch;

DROP TABLE t1;

--echo #
--echo # MDEV-22852: SIGSEGV in sortlength (optimized builds)
--echo #
Expand Down
Loading

0 comments on commit 101ddc5

Please sign in to comment.