Skip to content

Commit

Permalink
Merge 10.5 into 10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Mar 20, 2021
2 parents e8113f7 + e7ddf46 commit 1055cf9
Show file tree
Hide file tree
Showing 16 changed files with 126 additions and 326 deletions.
11 changes: 10 additions & 1 deletion extra/mariabackup/xtrabackup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA

#ifdef __linux__
# include <sys/prctl.h>
#include <sys/resource.h>
# include <sys/resource.h>
#endif

#ifdef __APPLE__
# include "libproc.h"
#endif

#ifdef __FreeBSD__
# include <sys/sysctl.h>
#endif


#include <btr0sea.h>
#include <dict0priv.h>
Expand Down Expand Up @@ -6687,6 +6691,11 @@ static int get_exepath(char *buf, size_t size, const char *argv0)
buf[ret] = 0;
return 0;
}
#elif defined(__FreeBSD__)
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
if (sysctl(mib, 4, buf, &size, NULL, 0) == 0) {
return 0;
}
#endif

return my_realpath(buf, argv0, 0);
Expand Down
36 changes: 35 additions & 1 deletion mysql-test/main/func_group.result
Original file line number Diff line number Diff line change
Expand Up @@ -2460,7 +2460,38 @@ count(*)+sleep(0)
2
drop table t1;
#
# Start of 10.3 tests
# MDEV-25112: MIN/MAX optimization for query containing BETWEEN in WHERE
#
create table t1 (a int) engine=myisam;
insert into t1 values (267), (273), (287), (303), (308);
select max(a) from t1 where a < 303 and (a between 267 AND 287);
max(a)
287
explain select max(a) from t1 where a < 303 and (a between 267 AND 287);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
select min(a) from t1 where a > 267 and (a between 273 AND 303);
min(a)
273
explain select min(a) from t1 where a > 267 and (a between 273 AND 303);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
create index idx on t1(a);
select max(a) from t1 where a < 303 and (a between 267 AND 287);
max(a)
287
explain select max(a) from t1 where a < 303 and (a between 267 AND 287);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
select min(a) from t1 where a > 267 and (a between 273 AND 303);
min(a)
273
explain select min(a) from t1 where a > 267 and (a between 273 AND 303);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
drop table t1;
#
# End of 10.2 tests
#
#
# MDEV-9408 CREATE TABLE SELECT MAX(int_column) creates different columns for table vs view
Expand Down Expand Up @@ -2492,3 +2523,6 @@ t2 CREATE TABLE `t2` (
DROP TABLE t2;
DROP VIEW v1;
DROP TABLE t1;
#
# End of 10.3 tests
#
32 changes: 31 additions & 1 deletion mysql-test/main/func_group.test
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,33 @@ select count(*)+sleep(0) from t1;
drop table t1;

--echo #
--echo # Start of 10.3 tests
--echo # MDEV-25112: MIN/MAX optimization for query containing BETWEEN in WHERE
--echo #

create table t1 (a int) engine=myisam;
insert into t1 values (267), (273), (287), (303), (308);

let $q1=
select max(a) from t1 where a < 303 and (a between 267 AND 287);
let $q2=
select min(a) from t1 where a > 267 and (a between 273 AND 303);

eval $q1;
eval explain $q1;
eval $q2;
eval explain $q2;

create index idx on t1(a);

eval $q1;
eval explain $q1;
eval $q2;
eval explain $q2;

drop table t1;

--echo #
--echo # End of 10.2 tests
--echo #

--echo #
Expand All @@ -1730,3 +1756,7 @@ DROP TABLE t2;

DROP VIEW v1;
DROP TABLE t1;

--echo #
--echo # End of 10.3 tests
--echo #
249 changes: 24 additions & 225 deletions mysql-test/suite/engines/funcs/r/rpl_000015.result
Original file line number Diff line number Diff line change
Expand Up @@ -7,241 +7,40 @@ master-bin.000001 329
connection slave;
include/stop_slave.inc
reset slave;
show slave status;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry #
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 0
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_SSL_Crl
Master_SSL_Crlpath
Using_Gtid No
Gtid_IO_Pos
Replicate_Do_Domain_Ids
Replicate_Ignore_Domain_Ids
Parallel_Mode optimistic
SQL_Delay 0
SQL_Remaining_Delay NULL
Slave_SQL_Running_State
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
Slave_IO_Running = 'No'
Slave_SQL_Running = 'No'
Last_SQL_Errno = '0'
Last_SQL_Error = ''
Exec_Master_Log_Pos = '0'
change master to master_host='127.0.0.1';
show slave status;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry #
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 0
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_SSL_Crl
Master_SSL_Crlpath
Using_Gtid No
Gtid_IO_Pos
Replicate_Do_Domain_Ids
Replicate_Ignore_Domain_Ids
Parallel_Mode optimistic
SQL_Delay 0
SQL_Remaining_Delay NULL
Slave_SQL_Running_State
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
change master to master_host='127.0.0.1',master_user='root',
Slave_IO_Running = 'No'
Slave_SQL_Running = 'No'
Last_SQL_Errno = '0'
Last_SQL_Error = ''
Exec_Master_Log_Pos = '0'
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
show slave status;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry #
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 0
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_SSL_Crl
Master_SSL_Crlpath
Using_Gtid No
Gtid_IO_Pos
Replicate_Do_Domain_Ids
Replicate_Ignore_Domain_Ids
Parallel_Mode optimistic
SQL_Delay 0
SQL_Remaining_Delay NULL
Slave_SQL_Running_State
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
include/start_slave.inc
show slave status;
Slave_IO_State Waiting for master to send event
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 329
Relay_Log_File slave-relay-bin.000002
Relay_Log_Pos 629
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 329
Relay_Log_Space 938
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_SSL_Crl
Master_SSL_Crlpath
Using_Gtid No
Gtid_IO_Pos
Replicate_Do_Domain_Ids
Replicate_Ignore_Domain_Ids
Parallel_Mode optimistic
SQL_Delay 0
SQL_Remaining_Delay NULL
Slave_SQL_Running_State Slave has read all relay log; waiting for more updates
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
Slave_IO_Running = 'Yes'
Slave_SQL_Running = 'Yes'
Last_SQL_Errno = '0'
Last_SQL_Error = ''
Exec_Master_Log_Pos = '329'
connection master;
drop table if exists t1;
create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
connection slave;
connection slave;
SELECT * FROM t1 ORDER BY n;
n 10
n 45
n 90
n
10
45
90
connection master;
SELECT * FROM t1 ORDER BY n;
n 10
n 45
n 90
n
10
45
90
drop table t1;
connection slave;
include/rpl_end.inc
Loading

0 comments on commit 1055cf9

Please sign in to comment.