Commit 85971707 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Added test for MDEV#4953.

parent 2f90221a
#
# 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
--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 @@ class ha_partition :public handler
}
#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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment