[MCOL-4588] insert select corrupts columnstore table catalog when not using cpimport Created: 2021-03-07  Updated: 2021-03-31

Status: Open
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 5.5.1
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: antoine Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

debian 9



 Description   

when performed without using cpimport, insert into ... select ... statements corrupt the columnstore table catalog. the columnstore plugin needs to be restarted for the table to work normally

-- 1. create a columnstore table
create table t(a int) engine=ColumnStore;
 
-- 2. fill table with insert .. select without using cpimport
set statement columnstore_use_import_for_batchinsert=off for
insert into t(a) 
select 1;
 
-- 3. t exists, seems to works fine
select count(*) from t;  /* returns 1 */
 
-- 4. when t is renamed, it turns out t was somehow corrupted
rename table t to t2;
select count(*) from t2;  /* returns  Error Code: 1815. Internal error: IDB-2006: 'mydb.t2' does not exist in Columnstore */
 
-- 5. after systemctl restart mariadb-columnstore, t2 works normally
select count(*) from t2;  /* returns 1 */

  • the problem does not appear when using columnstore_use_import_for_batchinsert=on (but using cpimport comes with its own issues, reported separately)
  • the problem does not appear with insert into ... values (). it is specifically about insert into ... select
  • the problem does not seem to be linked with the rename command. If the columnstore is restarted before step 4 then the rename actually works fine

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