Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
6.2.2
-
None
Description
Build tests: 6.2.2-1 (#3379)
1. create table issue
After creating a table on the master, the table also got created on the slave as expected.
When select from the slave, I got the following.
ERROR 1815 (HY000): Internal error: MCS-2006: 'mytest.t' does not exist in Columnstore.
If creating a columnstore table on the slave is a required manual task when columnstore
table is used on the slave, then the create table statement should not be replicated.
If create table does get replicated by design as shown by the 'show create table' command
on the slave, then it should create the table entirely.
on master
{onformat}MariaDB [mytest]> create table t (c1 int) engine=columnstore;
Query OK, 0 rows affected (0.220 sec)
MariaDB [mytest]> show create table t;
------
| Table | Create Table |
------
| t | CREATE TABLE `t` (
`c1` int(11) DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=latin1 |
------
1 row in set (0.001 sec)
MariaDB [mytest]> select count from t;
----------
| count |
----------
| 0 |
----------
1 row in set (0.055 sec){onformat}
On slave
{onformat}MariaDB [mytest]> show create table t;
------
| Table | Create Table |
------
| t | CREATE TABLE `t` (
`c1` int(11) DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=latin1 |
------
1 row in set (0.001 sec)
MariaDB [mytest]> select count from t;
ERROR 1815 (HY000): Internal error: MCS-2006: 'mytest.t' does not exist in Columnstore.{onformat}
2. Assuming that create columnstore table on the slave is required, insert is not replicated
I created the same columnstore table on both master and slave, then inserted a row on the master, the row is not replicated. It is the same for LDI. I did select on the master to force insert cached to be flushed. I also check the replication on both master and slave to make sure replication is working.
3. Old data came back after droping and creating the same table
Before turning on insert cache, I had a orders table on both master and slave, with 1500000 rows in them. After turning on insert cache, I drop the orders table on the master. The drop table command got replicated to the slave. The orders table no longer shown on the slave. I then create the orders table on the master and it showed up on both master and slave. It does not have the issue #2 as reported above. Now the master has 0 rows and the slave has 1500000 rows.
It seems to me that when dropping the table on the master, only the table in the MariaDB schema was drop, but not in ColumnStore's system catalog and data files. When creating the table on the master again, it was only replicated to the MariaDB schema, connecting to the ColumnStore table again.