[MCOL-1733] COMMENT='schema sync only' fails silently Created: 2018-09-20  Updated: 2018-09-20  Resolved: 2018-09-20

Status: Closed
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: 1.1.6
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: Sasha V Assignee: Andrew Hutchings (Inactive)
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

2PM system on Docker Ubuntu 18.04.1 LTS



 Description   

This works as expected:

create table t2 (c1 int) engine=columnstore;
Query OK, 0 rows affected (0.21 sec)
 
MariaDB [test]> select count(*) from t2;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.05 sec)
 
select * from calpontsys.systable where tablename='t2';
+-----------+--------+----------+------------+------------+------+------+-----------+-----------+-------------+---------------+
| tablename | schema | objectid | createdate | lastupdate | init | next | numofrows | avgrowlen | numofblocks | autoincrement |
+-----------+--------+----------+------------+------------+------+------+-----------+-----------+-------------+---------------+
| t2        | test   |     3292 | 2018-09-20 | NULL       | NULL | NULL |      NULL |      NULL |        NULL |             0 |
+-----------+--------+----------+------------+------------+------+------+-----------+-----------+-------------+---------------+
1 row in set (0.01 sec)

This does not work as expected:

create table t3 (c1 int) engine=columnstore COMMENT='schema sync only';
Query OK, 0 rows affected (0.01 sec)
 
MariaDB [test]> select count(*) from t3;
ERROR 1815 (HY000): Internal error: IDB-2006: 'test.t3' does not exist in Columnstore.
 
select * from calpontsys.systable where tablename='t3';
Empty set (0.02 sec)
 
show create table t3\G
*************************** 1. row ***************************
       Table: t3
Create Table: CREATE TABLE `t3` (
  `c1` int(11) DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=latin1 COMMENT='schema sync only'
1 row in set (0.00 sec)



 Comments   
Comment by Sasha V [ 2018-09-20 ]

Log file content:

tail  /var/log/mariadb/columnstore/debug.log 
 
Sep 20 17:38:47 mcs01 ddlpackageproc[81615]: 47.704102 |16|19|0| D 23 CAL0041: Start SQL statement: create table t2 (c1 int) engine=columnstore;|test|
Sep 20 17:38:47 mcs01 ddlpackageproc[81615]: 47.879091 |16|19|0| D 23 CAL0042: End SQL statement
Sep 20 17:38:54 mcs01 ExeMgr[81413]: 54.770135 |2147483664|0|0| D 16 CAL0041: Start SQL statement: select objectid,columnname from syscolumn where schema='test' and tablename='t2' --columnRIDs/FE; ||
Sep 20 17:38:54 mcs01 ExeMgr[81413]: 54.788877 |2147483664|0|0| D 16 CAL0042: End SQL statement
Sep 20 17:38:54 mcs01 ExeMgr[81413]: 54.810991 |16|0|0| D 16 CAL0041: Start SQL statement: select count(*) from t2; |test|
Sep 20 17:38:54 mcs01 ExeMgr[81413]: 54.816622 |16|0|0| D 16 CAL0042: End SQL statement
Sep 20 17:39:33 mcs01 ExeMgr[81413]: 33.473658 |2147483664|0|0| D 16 CAL0041: Start SQL statement: select objectid,columnname from syscolumn where schema='test' and tablename='t3' --columnRIDs/FE; ||
Sep 20 17:39:33 mcs01 ExeMgr[81413]: 33.485176 |2147483664|0|0| D 16 CAL0042: End SQL statement
Sep 20 17:47:08 mcs01 ExeMgr[81413]: 08.130390 |16|0|0| D 16 CAL0041: Start SQL statement: select * from calpontsys.systable; |test|
Sep 20 17:47:08 mcs01 ExeMgr[81413]: 08.137518 |16|0|0| D 16 CAL0042: End SQL statement
Sep 20 17:47:33 mcs01 ExeMgr[81413]: 33.070396 |16|0|0| D 16 CAL0041: Start SQL statement: select * from calpontsys.systable where tablename='t3'; |test|
Sep 20 17:47:33 mcs01 ExeMgr[81413]: 33.079733 |16|0|0| D 16 CAL0042: End SQL statement
Sep 20 17:47:55 mcs01 ExeMgr[81413]: 55.751921 |16|0|0| D 16 CAL0041: Start SQL statement: select * from calpontsys.systable where tablename='t2'; |test|
Sep 20 17:47:55 mcs01 ExeMgr[81413]: 55.764252 |16|0|0| D 16 CAL0042: End SQL statement

Comment by Andrew Hutchings (Inactive) [ 2018-09-20 ]

This is by design.

"schema sync only" is designed to create missing FRM files for ColumnStore tables that already exist. For instance when replicating a table between UM nodes or when a UM needs a manual repair. It is also used as part of the internal vtable process.

If you create a table as "schema sync only" and no such table exists inside ColumnStore then all you have is a FRM file. The table itself doesn't exist.

Generated at Thu Feb 08 02:30:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.