Skip to content
Permalink
Browse files
Merge 10.4 into 10.5
  • Loading branch information
dr-m committed Aug 26, 2020
2 parents 8f8f2ae + 1e08e08 commit 97a4a38
Show file tree
Hide file tree
Showing 36 changed files with 504 additions and 232 deletions.
@@ -621,3 +621,9 @@ a b
1 3
2 4
drop table t1;
#
# MDEV-23467 SIGSEGV in fill_record/fill_record_n_invoke_before_triggers on INSERT DELAYED
#
create table t1 (a int, b int invisible);
insert delayed into t1 values (1);
drop table t1;
@@ -271,3 +271,11 @@ select a,b from t1;

#cleanup
drop table t1;

--echo #
--echo # MDEV-23467 SIGSEGV in fill_record/fill_record_n_invoke_before_triggers on INSERT DELAYED
--echo #
create table t1 (a int, b int invisible);
insert delayed into t1 values (1);
# cleanup
drop table t1;
@@ -2686,6 +2686,37 @@ SELECT * FROM t2;
f
bar
DROP TABLE t1, t2;
#
# MDEV-18335: Assertion `!error || error == 137' failed in subselect_rowid_merge_engine::init
#
CREATE TABLE t1 (i1 int,v1 varchar(1),KEY (v1,i1));
INSERT INTO t1 VALUES
(9,'y'),(4,'q'),(0,null),(0,'p'),(null,'j');
CREATE TABLE t2 (pk int);
INSERT INTO t2 VALUES (1),(2);
CREATE TABLE t3 (v2 varchar(1));
INSERT INTO t3 VALUES
('p'),('j'),('y'),('q');
CREATE TABLE t4 (v2 varchar(1));
INSERT INTO t4 VALUES
('a'),('a'),('b'),('b'),('c'),('c'),
('d'),('d'),('e'),('e'),('f'),('f'),
('g'),('g'),('h'),('h'),('i'),('i'),
('j'),('j'),('k'),('k'),('l'),('l'),
('m'),('m'),('n'),('n'),('o'),('o'),
('p'),('p'),('q'),('q'),('r'),('r'),
('s'),('s'),('t'),('t'),('u'),('u'),('v'),('v'),
('w'),('w'),('x'),('x'), (NULL),(NULL);
SET @save_join_cache_level=@@join_cache_level;
SET join_cache_level=0;
select 1
from t2 join t1 on
('i','w') not in (select t1.v1,t4.v2 from t4,t1,t3 where t3.v2 = t1.v1) LIMIT ROWS EXAMINED 500;
1
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 3020 rows, which exceeds LIMIT ROWS EXAMINED (500). The query result may be incomplete
SET join_cache_level= @save_join_cache_level;
DROP TABLE t1,t2,t3,t4;
# End of 10.2 tests
#
# MDEV-19134: EXISTS() slower if ORDER BY is defined
@@ -2201,6 +2201,42 @@ SELECT * FROM t2;

DROP TABLE t1, t2;

--echo #
--echo # MDEV-18335: Assertion `!error || error == 137' failed in subselect_rowid_merge_engine::init
--echo #

CREATE TABLE t1 (i1 int,v1 varchar(1),KEY (v1,i1));
INSERT INTO t1 VALUES
(9,'y'),(4,'q'),(0,null),(0,'p'),(null,'j');

CREATE TABLE t2 (pk int);
INSERT INTO t2 VALUES (1),(2);

CREATE TABLE t3 (v2 varchar(1));
INSERT INTO t3 VALUES
('p'),('j'),('y'),('q');

CREATE TABLE t4 (v2 varchar(1));
INSERT INTO t4 VALUES
('a'),('a'),('b'),('b'),('c'),('c'),
('d'),('d'),('e'),('e'),('f'),('f'),
('g'),('g'),('h'),('h'),('i'),('i'),
('j'),('j'),('k'),('k'),('l'),('l'),
('m'),('m'),('n'),('n'),('o'),('o'),
('p'),('p'),('q'),('q'),('r'),('r'),
('s'),('s'),('t'),('t'),('u'),('u'),('v'),('v'),
('w'),('w'),('x'),('x'), (NULL),(NULL);

SET @save_join_cache_level=@@join_cache_level;
SET join_cache_level=0;

select 1
from t2 join t1 on
('i','w') not in (select t1.v1,t4.v2 from t4,t1,t3 where t3.v2 = t1.v1) LIMIT ROWS EXAMINED 500;
SET join_cache_level= @save_join_cache_level;

DROP TABLE t1,t2,t3,t4;

--echo # End of 10.2 tests

--echo #
@@ -0,0 +1,18 @@
connection node_2;
connection node_1;
ROLLBACK AND CHAIN;
CREATE TABLE t1(a int not null primary key) engine=innodb;
INSERT INTO t1 values (1);
BEGIN;
INSERT INTO t1 values (2);
ROLLBACK AND CHAIN;
SELECT * FROM t1;
a
1
connection node_2;
SET SESSION wsrep_sync_wait=15;
SELECT * FROM t1;
a
1
connection node_1;
DROP TABLE t1;
@@ -0,0 +1,19 @@
--source include/galera_cluster.inc

ROLLBACK AND CHAIN;

CREATE TABLE t1(a int not null primary key) engine=innodb;
INSERT INTO t1 values (1);

BEGIN;
INSERT INTO t1 values (2);
ROLLBACK AND CHAIN;

SELECT * FROM t1;

--connection node_2
SET SESSION wsrep_sync_wait=15;
SELECT * FROM t1;

--connection node_1
DROP TABLE t1;
@@ -5,15 +5,15 @@
--source include/galera_cluster.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc

--let $node_1 = node_1
--let $node_2 = node_2
--source include/auto_increment_offset_save.inc

--let $galera_connection_name = node_1_ctrl
--let $galera_server_number = 1
--source include/galera_connect.inc

#
# Run UPDATE on node_1 and make it block before table locks are taken.
# This should block FTWRL.
@@ -23,10 +23,10 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT);
INSERT INTO t1 VALUES (1, 1);
SET DEBUG_SYNC = "before_lock_tables_takes_lock SIGNAL sync_point_reached WAIT_FOR sync_point_continue";
--send UPDATE t1 SET f2 = 2 WHERE f1 = 1

--connection node_1_ctrl
SET DEBUG_SYNC = "now WAIT_FOR sync_point_reached";

#
# Restart node_2, force SST.
#
@@ -40,19 +40,19 @@ SET DEBUG_SYNC = "now WAIT_FOR sync_point_reached";
# If the bug is present, FTWRL times out on node_1 in couple of
# seconds and node_2 fails to join.
--sleep 10

--connection node_1_ctrl
SET DEBUG_SYNC = "now SIGNAL sync_point_continue";

--connection node_1
--reap
SET DEBUG_SYNC = "RESET";

--connection node_2
--enable_reconnect
--source include/wait_until_connected_again.inc

--connection node_1
DROP TABLE t1;

--source include/auto_increment_offset_restore.inc
@@ -1,2 +1,21 @@
##############################################################################
#
# List the test cases that are to be disabled temporarily.
#
# Separate the test case name and the comment with ':'.
#
# <testcasename> : MDEV-<xxxx> <comment>
#
# Do not use any TAB characters for whitespace.
#
##############################################################################

galera_ipv6_mariabackup : MDEV-23573 Could not open '../galera/include/have_mariabackup.inc'
galera_ipv6_mariabackup_section : MDEV-23574 Could not open '../galera/include/have_mariabackup.inc'
galera_ipv6_mysqldump : MDEV-23576 WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
galera_ipv6_rsyn : MDEV-23581 WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
galera_ipv6_rsync_section : MDEV-23580 WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
galera_ipv6_xtrabackup-v2 : MDEV-23575 WSREP_SST: [ERROR] innobackupex not in path
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
galera_slave_options_do :MDEV-8798
galera_slave_options_ignore : MDEV-8798
@@ -168,7 +168,6 @@ PRIMARY KEY (store_id),
UNIQUE KEY idx_unique_manager (manager_staff_id),
CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB;
SET FOREIGN_KEY_CHECKS=DEFAULT;
LOCK TABLE staff WRITE;
UNLOCK TABLES;
DROP TABLES staff, store;
@@ -136,7 +136,6 @@ CREATE TABLE store (
UNIQUE KEY idx_unique_manager (manager_staff_id),
CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB;
SET FOREIGN_KEY_CHECKS=DEFAULT;

LOCK TABLE staff WRITE;
UNLOCK TABLES;
@@ -7,7 +7,7 @@ SET @@session.foreign_key_checks = 1;
SET @@session.foreign_key_checks = DEFAULT;
SELECT @@session.foreign_key_checks;
@@session.foreign_key_checks
0
1
'#---------------------FN_DYNVARS_032_02-------------------------#'
SET foreign_key_checks = 1;
SELECT @@foreign_key_checks;
@@ -7,7 +7,7 @@ SET @@session.unique_checks= 1;
SET @@session.unique_checks= DEFAULT;
SELECT @@session.unique_checks;
@@session.unique_checks
0
1
'#--------------------FN_DYNVARS_005_04-------------------------#'
SET @@session.unique_checks =1;
SELECT @@session.unique_checks;
@@ -186,4 +186,13 @@ SELECT @@global.system_versioning_asof;
@@global.system_versioning_asof
2002-01-01 00:00:00.000000
SET @@global.system_versioning_asof= DEFAULT;
#
# MDEV-23562 Assertion `time_type == MYSQL_TIMESTAMP_DATETIME' failed upon SELECT from versioned table
#
CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
SET system_versioning_asof= DATE(NOW());
SELECT * FROM t1;
a
DROP TABLE t1;
SET system_versioning_asof= DEFAULT;
# End of 10.4 tests
@@ -138,4 +138,14 @@ SET @@global.system_versioning_asof= timestamp'2001-12-31 23:59:59.9999999';
SELECT @@global.system_versioning_asof;
SET @@global.system_versioning_asof= DEFAULT;

--echo #
--echo # MDEV-23562 Assertion `time_type == MYSQL_TIMESTAMP_DATETIME' failed upon SELECT from versioned table
--echo #

CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
SET system_versioning_asof= DATE(NOW());
SELECT * FROM t1;
DROP TABLE t1;
SET system_versioning_asof= DEFAULT;

--echo # End of 10.4 tests
@@ -5892,9 +5892,7 @@ Item *Field_temporal::get_equal_const_item_datetime(THD *thd,
See comments about truncation in the same place in
Field_time::get_equal_const_item().
*/
return new (thd->mem_root) Item_datetime_literal(thd,
dt.get_mysql_time(),
decimals());
return new (thd->mem_root) Item_datetime_literal(thd, &dt, decimals());
}
break;
case ANY_SUBST:
@@ -5906,7 +5904,7 @@ Item *Field_temporal::get_equal_const_item_datetime(THD *thd,
if (!dt.is_valid_datetime())
return NULL;
return new (thd->mem_root)
Item_datetime_literal_for_invalid_dates(thd, dt.get_mysql_time(),
Item_datetime_literal_for_invalid_dates(thd, &dt,
dt.get_mysql_time()->
second_part ?
TIME_SECOND_PART_DIGITS : 0);
@@ -6246,7 +6244,7 @@ Item *Field_time::get_equal_const_item(THD *thd, const Context &ctx,
(assuming CURRENT_DATE is '2015-08-30'
*/
return new (thd->mem_root) Item_time_literal(thd, tm.get_mysql_time(),
return new (thd->mem_root) Item_time_literal(thd, &tm,
tm.get_mysql_time()->
second_part ?
TIME_SECOND_PART_DIGITS :
@@ -6275,8 +6273,7 @@ Item *Field_time::get_equal_const_item(THD *thd, const Context &ctx,
decimals());
if (!tm.is_valid_time())
return NULL;
return new (thd->mem_root) Item_time_literal(thd, tm.get_mysql_time(),
decimals());
return new (thd->mem_root) Item_time_literal(thd, &tm, decimals());
}
break;
}
@@ -6842,12 +6839,12 @@ Item *Field_newdate::get_equal_const_item(THD *thd, const Context &ctx,
*/
if (!dt.hhmmssff_is_zero())
return new (thd->mem_root)
Item_datetime_literal_for_invalid_dates(thd, dt.get_mysql_time(),
Item_datetime_literal_for_invalid_dates(thd, &dt,
dt.get_mysql_time()->
second_part ?
TIME_SECOND_PART_DIGITS : 0);
return new (thd->mem_root)
Item_date_literal_for_invalid_dates(thd, Date(&dt).get_mysql_time());
Date d(&dt);
return new (thd->mem_root) Item_date_literal_for_invalid_dates(thd, &d);
}
break;
case IDENTITY_SUBST:
@@ -6862,8 +6859,8 @@ Item *Field_newdate::get_equal_const_item(THD *thd, const Context &ctx,
Datetime dt(thd, const_item, Datetime::Options(TIME_CONV_NONE, thd));
if (!dt.is_valid_datetime())
return NULL;
return new (thd->mem_root)
Item_date_literal(thd, Date(&dt).get_mysql_time());
Date d(&dt);
return new (thd->mem_root) Item_date_literal(thd, &d);
}
break;
}
@@ -1619,9 +1619,8 @@ class ha_partition :public handler
return h;
}

ha_rows part_records(void *_part_elem)
ha_rows part_records(partition_element *part_elem)
{
partition_element *part_elem= reinterpret_cast<partition_element *>(_part_elem);
DBUG_ASSERT(m_part_info);
uint32 sub_factor= m_part_info->num_subparts ? m_part_info->num_subparts : 1;
uint32 part_id= part_elem->id * sub_factor;

0 comments on commit 97a4a38

Please sign in to comment.