github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/ddl/secondary_index_delete.sql (about)

     1  -- 3.a Drop table
     2  drop table if exists t1;
     3  create table t1(id int PRIMARY KEY,name VARCHAR(255),age int);
     4  create index idx1 on t1(name);
     5  insert into t1 values(1,"Abby", 24);
     6  insert into t1 values(2,"Dora", 25);
     7  show index from t1;
     8  drop table t1;
     9  select name, type, column_name from mo_catalog.mo_indexes mi where name="idx1";
    10  
    11  -- 3.b Delete a row
    12  drop table if exists t1;
    13  create table t1(id int PRIMARY KEY,name VARCHAR(255),age int);
    14  create index idx2 on t1(name,age);
    15  insert into t1 values(1,"Abby", 24);
    16  insert into t1 values(2,"Dora", 25);
    17  delete from t1 where id = 1;
    18  show index from t1;
    19  select name, type,column_name from mo_catalog.mo_indexes mi where name="idx2";
    20  
    21  
    22  -- 3.c Drop index
    23  drop table if exists t1;
    24  create table t1(id int PRIMARY KEY,name VARCHAR(255),age int);
    25  create index idx3 on t1(name);
    26  insert into t1 values(1,"Abby", 24);
    27  insert into t1 values(2,"Dora", 25);
    28  show index from t1;
    29  select name, type,column_name from mo_catalog.mo_indexes mi where name="idx3";
    30  show create table t1;
    31  DROP INDEX idx3 ON t1;
    32  show index from t1;
    33  select name, type,column_name from mo_catalog.mo_indexes mi where name="idx3";
    34  show create table t1;