Added test for MDEV#4953.
This commit is contained in:
parent
2f90221ad4
commit
8597170772
23
mysql-test/suite/galera/r/partition.result
Normal file
23
mysql-test/suite/galera/r/partition.result
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# MDEV#4953 Galera: DELETE from a partitioned table is not replicated
|
||||
#
|
||||
USE test;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
|
||||
INSERT INTO t1 VALUES (1,100), (2,200);
|
||||
SELECT * FROM t1;
|
||||
pk i
|
||||
2 200
|
||||
1 100
|
||||
DELETE FROM t1;
|
||||
SELECT * FROM t1;
|
||||
pk i
|
||||
|
||||
# On node_1
|
||||
SELECT * FROM t1;
|
||||
pk i
|
||||
|
||||
# On node_2
|
||||
SELECT * FROM t1;
|
||||
pk i
|
||||
DROP TABLE t1;
|
||||
# End of test
|
31
mysql-test/suite/galera/t/partition.test
Normal file
31
mysql-test/suite/galera/t/partition.test
Normal file
@ -0,0 +1,31 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_partition.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV#4953 Galera: DELETE from a partitioned table is not replicated
|
||||
--echo #
|
||||
|
||||
USE test;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
|
||||
INSERT INTO t1 VALUES (1,100), (2,200);
|
||||
SELECT * FROM t1;
|
||||
|
||||
DELETE FROM t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_1
|
||||
--connection node_1
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_2
|
||||
--connection node_2
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/galera_end.inc
|
||||
--echo # End of test
|
@ -1284,17 +1284,8 @@ public:
|
||||
}
|
||||
#ifdef WITH_WSREP
|
||||
virtual int wsrep_db_type() const;
|
||||
#if 0
|
||||
// TODO: Verify : https://mariadb.atlassian.net/browse/MDEV-4953
|
||||
void wsrep_reset_files()
|
||||
{
|
||||
for (uint i=0; i < m_tot_parts; i++)
|
||||
m_file[i]->ha_start_of_new_statement();
|
||||
}
|
||||
#endif
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
|
||||
friend int cmp_key_rowid_part_id(void *ptr, uchar *ref1, uchar *ref2);
|
||||
};
|
||||
|
||||
|
@ -4019,14 +4019,6 @@ void TABLE::init(THD *thd, TABLE_LIST *tl)
|
||||
insert_values= 0;
|
||||
fulltext_searched= 0;
|
||||
file->ft_handler= 0;
|
||||
#if 0
|
||||
#ifdef WITH_WSREP
|
||||
if (file->ht->db_type == DB_TYPE_PARTITION_DB)
|
||||
{
|
||||
((ha_partition*)file)->wsrep_reset_files();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
reginfo.impossible_range= 0;
|
||||
created= TRUE;
|
||||
cond_selectivity= 1.0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user