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

     1  drop database if exists db6;
     2  create database db6;
     3  use db6;
     4  drop table if exists t1;
     5  create table t1(
     6  deptno int unsigned,
     7  dname varchar(15),
     8  loc varchar(50),
     9  unique key(deptno)
    10  );
    11  select
    12  `idx`.`name`,
    13  `idx`.`type`,
    14  `idx`.`name`,
    15  `idx`.`is_visible`,
    16  `idx`.`hidden`,
    17  `idx`.`comment`,
    18  `tbl`.`relname`,
    19  `idx`.`column_name`,
    20  `idx`.`ordinal_position`,
    21  `idx`.`options`
    22  from
    23  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
    24  where  `tbl`.`relname` = 't1' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
    25  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
    26  deptno    UNIQUE    deptno    1    0        t1    deptno    1    null
    27  select
    28  table_schema,
    29  table_name,
    30  non_unique,
    31  index_schema,
    32  index_name,
    33  seq_in_index,
    34  column_name,
    35  index_comment
    36  from
    37  information_schema.statistics where table_schema = 'db6' and table_name = 't1';
    38  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
    39  db6    t1    0    db6    deptno    1    deptno    
    40  drop table if exists t2;
    41  create table t2(
    42  empno int unsigned auto_increment,
    43  ename varchar(15),
    44  job varchar(10),
    45  mgr int unsigned ,
    46  hiredate date,
    47  sal decimal(7,2),
    48  comm decimal(7,2),
    49  deptno int unsigned,
    50  primary key(empno)
    51  );
    52  select
    53  `idx`.`name`,
    54  `idx`.`type`,
    55  `idx`.`name`,
    56  `idx`.`is_visible`,
    57  `idx`.`hidden`,
    58  `idx`.`comment`,
    59  `tbl`.`relname`,
    60  `idx`.`column_name`,
    61  `idx`.`ordinal_position`,
    62  `idx`.`options`
    63  from
    64  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
    65  where  `tbl`.`relname` = 't2' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
    66  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
    67  PRIMARY    PRIMARY    PRIMARY    1    0        t2    empno    1    null
    68  select
    69  table_schema,
    70  table_name,
    71  non_unique,
    72  index_schema,
    73  index_name,
    74  seq_in_index,
    75  column_name,
    76  index_comment
    77  from
    78  information_schema.statistics where table_schema = 'db6' and table_name = 't2';
    79  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
    80  db6    t2    0    db6    PRIMARY    1    empno    
    81  drop table if exists t3;
    82  create table t3(
    83  empno int unsigned,
    84  ename varchar(15),
    85  job varchar(10),
    86  mgr int unsigned ,
    87  hiredate date,
    88  sal decimal(7,2),
    89  comm decimal(7,2),
    90  deptno int unsigned,
    91  unique key(empno, ename)
    92  );
    93  select
    94  `idx`.`name`,
    95  `idx`.`type`,
    96  `idx`.`name`,
    97  `idx`.`is_visible`,
    98  `idx`.`hidden`,
    99  `idx`.`comment`,
   100  `tbl`.`relname`,
   101  `idx`.`column_name`,
   102  `idx`.`ordinal_position`,
   103  `idx`.`options`
   104  from
   105  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   106  where  `tbl`.`relname` = 't3' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   107  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   108  empno    UNIQUE    empno    1    0        t3    empno    1    null
   109  empno    UNIQUE    empno    1    0        t3    ename    2    null
   110  select
   111  table_schema,
   112  table_name,
   113  non_unique,
   114  index_schema,
   115  index_name,
   116  seq_in_index,
   117  column_name,
   118  index_comment
   119  from
   120  information_schema.statistics where table_schema = 'db6' and table_name = 't3';
   121  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   122  db6    t3    0    db6    empno    1    empno    
   123  db6    t3    0    db6    empno    2    ename    
   124  drop table if exists t4;
   125  create table t4(
   126  empno int unsigned,
   127  ename varchar(15),
   128  job varchar(10),
   129  mgr int unsigned ,
   130  hiredate date,
   131  sal decimal(7,2),
   132  comm decimal(7,2),
   133  deptno int unsigned,
   134  index(empno, ename, job)
   135  );
   136  select
   137  `idx`.`name`,
   138  `idx`.`type`,
   139  `idx`.`name`,
   140  `idx`.`is_visible`,
   141  `idx`.`hidden`,
   142  `idx`.`comment`,
   143  `tbl`.`relname`,
   144  `idx`.`column_name`,
   145  `idx`.`ordinal_position`,
   146  `idx`.`options`
   147  from
   148  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   149  where  `tbl`.`relname` = 't4' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   150  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   151  empno    MULTIPLE    empno    1    0        t4    empno    1    null
   152  empno    MULTIPLE    empno    1    0        t4    ename    2    null
   153  empno    MULTIPLE    empno    1    0        t4    job    3    null
   154  select
   155  table_schema,
   156  table_name,
   157  non_unique,
   158  index_schema,
   159  index_name,
   160  seq_in_index,
   161  column_name,
   162  index_comment
   163  from
   164  information_schema.statistics where table_schema = 'db6' and table_name = 't4';
   165  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   166  db6    t4    1    db6    empno    1    empno    
   167  db6    t4    1    db6    empno    2    ename    
   168  db6    t4    1    db6    empno    3    job    
   169  drop table if exists t5;
   170  create table t5(
   171  empno int unsigned,
   172  ename varchar(15),
   173  job varchar(10),
   174  mgr int unsigned ,
   175  hiredate date,
   176  sal decimal(7,2),
   177  comm decimal(7,2),
   178  deptno int unsigned,
   179  primary key(empno, ename)
   180  );
   181  select
   182  `idx`.`name`,
   183  `idx`.`type`,
   184  `idx`.`name`,
   185  `idx`.`is_visible`,
   186  `idx`.`hidden`,
   187  `idx`.`comment`,
   188  `tbl`.`relname`,
   189  `idx`.`column_name`,
   190  `idx`.`ordinal_position`,
   191  `idx`.`options`
   192  from
   193  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   194  where  `tbl`.`relname` = 't5' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   195  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   196  PRIMARY    PRIMARY    PRIMARY    1    0        t5    empno    1    null
   197  PRIMARY    PRIMARY    PRIMARY    1    0        t5    ename    2    null
   198  select
   199  table_schema,
   200  table_name,
   201  non_unique,
   202  index_schema,
   203  index_name,
   204  seq_in_index,
   205  column_name,
   206  index_comment
   207  from
   208  information_schema.statistics where table_schema = 'db6' and table_name = 't5';
   209  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   210  db6    t5    0    db6    PRIMARY    1    empno    
   211  db6    t5    0    db6    PRIMARY    2    ename    
   212  drop table if exists t6;
   213  create table t6(
   214  empno int unsigned,
   215  ename varchar(15),
   216  job varchar(10),
   217  mgr int unsigned ,
   218  hiredate date,
   219  sal decimal(7,2),
   220  comm decimal(7,2),
   221  deptno int unsigned
   222  );
   223  select
   224  `idx`.`name`,
   225  `idx`.`type`,
   226  `idx`.`name`,
   227  `idx`.`is_visible`,
   228  `idx`.`hidden`,
   229  `idx`.`comment`,
   230  `tbl`.`relname`,
   231  `idx`.`column_name`,
   232  `idx`.`ordinal_position`,
   233  `idx`.`options`
   234  from
   235  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   236  where  `tbl`.`relname` = 't6' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   237  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   238  select
   239  table_schema,
   240  table_name,
   241  non_unique,
   242  index_schema,
   243  index_name,
   244  seq_in_index,
   245  column_name,
   246  index_comment
   247  from
   248  information_schema.statistics where table_schema = 'db6' and table_name = 't6';
   249  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   250  drop table if exists t7;
   251  create table t7(
   252  col1 int unsigned,
   253  col2 varchar(15),
   254  col3 varchar(10),
   255  col4 int unsigned,
   256  col5 date,
   257  col6 decimal(7,2),
   258  col7 decimal(7,2),
   259  col8 int unsigned,
   260  unique index(col1,col2),
   261  unique index(col3,col6)
   262  );
   263  select
   264  `idx`.`name`,
   265  `idx`.`type`,
   266  `idx`.`name`,
   267  `idx`.`is_visible`,
   268  `idx`.`hidden`,
   269  `idx`.`comment`,
   270  `tbl`.`relname`,
   271  `idx`.`column_name`,
   272  `idx`.`ordinal_position`,
   273  `idx`.`options`
   274  from
   275  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   276  where  `tbl`.`relname` = 't7' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   277  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   278  col1    UNIQUE    col1    1    0        t7    col1    1    null
   279  col1    UNIQUE    col1    1    0        t7    col2    2    null
   280  col3    UNIQUE    col3    1    0        t7    col3    1    null
   281  col3    UNIQUE    col3    1    0        t7    col6    2    null
   282  select
   283  table_schema,
   284  table_name,
   285  non_unique,
   286  index_schema,
   287  index_name,
   288  seq_in_index,
   289  column_name,
   290  index_comment
   291  from
   292  information_schema.statistics where table_schema = 'db6' and table_name = 't7';
   293  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   294  db6    t7    0    db6    col1    1    col1    
   295  db6    t7    0    db6    col1    2    col2    
   296  db6    t7    0    db6    col3    1    col3    
   297  db6    t7    0    db6    col3    2    col6    
   298  drop table if exists t8;
   299  create table t8(
   300  empno int unsigned primary key,
   301  ename varchar(15),
   302  job varchar(10),
   303  mgr int unsigned ,
   304  hiredate date,
   305  sal decimal(7,2),
   306  comm decimal(7,2),
   307  deptno int unsigned,
   308  unique key(empno, ename)
   309  );
   310  select
   311  `idx`.`name`,
   312  `idx`.`type`,
   313  `idx`.`name`,
   314  `idx`.`is_visible`,
   315  `idx`.`hidden`,
   316  `idx`.`comment`,
   317  `tbl`.`relname`,
   318  `idx`.`column_name`,
   319  `idx`.`ordinal_position`,
   320  `idx`.`options`
   321  from
   322  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   323  where  `tbl`.`relname` = 't8' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   324  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   325  empno    UNIQUE    empno    1    0        t8    empno    1    null
   326  empno    UNIQUE    empno    1    0        t8    ename    2    null
   327  PRIMARY    PRIMARY    PRIMARY    1    0        t8    empno    1    null
   328  select
   329  table_schema,
   330  table_name,
   331  non_unique,
   332  index_schema,
   333  index_name,
   334  seq_in_index,
   335  column_name,
   336  index_comment
   337  from
   338  information_schema.statistics where table_schema = 'db6' and table_name = 't8';
   339  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   340  db6    t8    0    db6    empno    1    empno    
   341  db6    t8    0    db6    empno    2    ename    
   342  db6    t8    0    db6    PRIMARY    1    empno    
   343  drop table if exists t9;
   344  create table t9(id int PRIMARY KEY,name VARCHAR(255),age int);
   345  insert into t9 values(1,"Abby", 24);
   346  insert into t9 values(2,"Bob", 25);
   347  insert into t9 values(3,"Carol", 23);
   348  insert into t9 values(4,"Dora", 29);
   349  select
   350  `idx`.`name`,
   351  `idx`.`type`,
   352  `idx`.`name`,
   353  `idx`.`is_visible`,
   354  `idx`.`hidden`,
   355  `idx`.`comment`,
   356  `tbl`.`relname`,
   357  `idx`.`column_name`,
   358  `idx`.`ordinal_position`,
   359  `idx`.`options`
   360  from
   361  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   362  where  `tbl`.`relname` = 't9' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   363  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   364  PRIMARY    PRIMARY    PRIMARY    1    0        t9    id    1    null
   365  create unique index idx on t9(name);
   366  select
   367  `idx`.`name`,
   368  `idx`.`type`,
   369  `idx`.`name`,
   370  `idx`.`is_visible`,
   371  `idx`.`hidden`,
   372  `idx`.`comment`,
   373  `tbl`.`relname`,
   374  `idx`.`column_name`,
   375  `idx`.`ordinal_position`,
   376  `idx`.`options`
   377  from
   378  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   379  where  `tbl`.`relname` = 't9' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   380  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   381  PRIMARY    PRIMARY    PRIMARY    1    0        t9    id    1    null
   382  idx    UNIQUE    idx    1    0        t9    name    1    null
   383  select
   384  table_schema,
   385  table_name,
   386  non_unique,
   387  index_schema,
   388  index_name,
   389  seq_in_index,
   390  column_name,
   391  index_comment
   392  from
   393  information_schema.statistics where table_schema = 'db6' and table_name = 't9';
   394  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   395  db6    t9    0    db6    PRIMARY    1    id    
   396  db6    t9    0    db6    idx    1    name    
   397  select * from t9;
   398  id    name    age
   399  1    Abby    24
   400  2    Bob    25
   401  3    Carol    23
   402  4    Dora    29
   403  drop table t9;
   404  drop table if exists t10;
   405  create table t10 (
   406  col1 bigint primary key,
   407  col2 varchar(25),
   408  col3 float,
   409  col4 varchar(50)
   410  );
   411  select
   412  `idx`.`name`,
   413  `idx`.`type`,
   414  `idx`.`name`,
   415  `idx`.`is_visible`,
   416  `idx`.`hidden`,
   417  `idx`.`comment`,
   418  `tbl`.`relname`,
   419  `idx`.`column_name`,
   420  `idx`.`ordinal_position`,
   421  `idx`.`options`
   422  from
   423  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   424  where  `tbl`.`relname` = 't10' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   425  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   426  PRIMARY    PRIMARY    PRIMARY    1    0        t10    col1    1    null
   427  create unique index idx on t10(col2) comment 'create varchar index';
   428  select
   429  `idx`.`name`,
   430  `idx`.`type`,
   431  `idx`.`name`,
   432  `idx`.`is_visible`,
   433  `idx`.`hidden`,
   434  `idx`.`comment`,
   435  `tbl`.`relname`,
   436  `idx`.`column_name`,
   437  `idx`.`ordinal_position`,
   438  `idx`.`options`
   439  from
   440  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   441  where  `tbl`.`relname` = 't10' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   442  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   443  PRIMARY    PRIMARY    PRIMARY    1    0        t10    col1    1    null
   444  idx    UNIQUE    idx    1    0    create varchar index    t10    col2    1    null
   445  select
   446  table_schema,
   447  table_name,
   448  non_unique,
   449  index_schema,
   450  index_name,
   451  seq_in_index,
   452  column_name,
   453  index_comment
   454  from
   455  information_schema.statistics where table_schema = 'db6' and table_name = 't10';
   456  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   457  db6    t10    0    db6    PRIMARY    1    col1    
   458  db6    t10    0    db6    idx    1    col2    create varchar index
   459  insert into t10 values(1,"Abby", 24,'zbcvdf');
   460  insert into t10 values(2,"Bob", 25,'zbcvdf');
   461  insert into t10 values(3,"Carol", 23,'zbcvdf');
   462  insert into t10 values(4,"Dora", 29,'zbcvdf');
   463  select * from t10;
   464  col1    col2    col3    col4
   465  1    Abby    24.0    zbcvdf
   466  2    Bob    25.0    zbcvdf
   467  3    Carol    23.0    zbcvdf
   468  4    Dora    29.0    zbcvdf
   469  drop table t10;
   470  drop table if exists t11;
   471  create table t11(a int, b int,c varchar(20));
   472  select
   473  `idx`.`name`,
   474  `idx`.`type`,
   475  `idx`.`name`,
   476  `idx`.`is_visible`,
   477  `idx`.`hidden`,
   478  `idx`.`comment`,
   479  `tbl`.`relname`,
   480  `idx`.`column_name`,
   481  `idx`.`ordinal_position`,
   482  `idx`.`options`
   483  from
   484  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   485  where  `tbl`.`relname` = 't11' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   486  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   487  create index x11 ON t11(a) comment 'xxxxxxx';
   488  create index x12 ON t11(b, c) comment 'yyyyyyyyy';
   489  select
   490  `idx`.`name`,
   491  `idx`.`type`,
   492  `idx`.`name`,
   493  `idx`.`is_visible`,
   494  `idx`.`hidden`,
   495  `idx`.`comment`,
   496  `tbl`.`relname`,
   497  `idx`.`column_name`,
   498  `idx`.`ordinal_position`,
   499  `idx`.`options`
   500  from
   501  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   502  where  `tbl`.`relname` = 't11' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   503  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   504  x11    MULTIPLE    x11    1    0    xxxxxxx    t11    a    1    null
   505  x12    MULTIPLE    x12    1    0    yyyyyyyyy    t11    b    1    null
   506  x12    MULTIPLE    x12    1    0    yyyyyyyyy    t11    c    2    null
   507  select
   508  table_schema,
   509  table_name,
   510  non_unique,
   511  index_schema,
   512  index_name,
   513  seq_in_index,
   514  column_name,
   515  index_comment
   516  from
   517  information_schema.statistics where table_schema = 'db6' and table_name = 't11';
   518  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   519  db6    t11    1    db6    x11    1    a    xxxxxxx
   520  db6    t11    1    db6    x12    1    b    yyyyyyyyy
   521  db6    t11    1    db6    x12    2    c    yyyyyyyyy
   522  drop index x11 on t11;
   523  drop index x12 on t11;
   524  select
   525  `idx`.`name`,
   526  `idx`.`type`,
   527  `idx`.`name`,
   528  `idx`.`is_visible`,
   529  `idx`.`hidden`,
   530  `idx`.`comment`,
   531  `tbl`.`relname`,
   532  `idx`.`column_name`,
   533  `idx`.`ordinal_position`,
   534  `idx`.`options`
   535  from
   536  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   537  where  `tbl`.`relname` = 't11' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   538  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   539  drop table t11;
   540  select
   541  table_schema,
   542  table_name,
   543  non_unique,
   544  index_schema,
   545  index_name,
   546  seq_in_index,
   547  column_name,
   548  index_comment
   549  from
   550  information_schema.statistics where table_schema = 'db6' and table_name = 't11';
   551  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   552  drop table if exists t12;
   553  create table t12(a int, b int,c varchar(20), primary key(a));
   554  create index idx_1 on t12(a, b) comment 'xxxxxxx';
   555  select
   556  `idx`.`name`,
   557  `idx`.`type`,
   558  `idx`.`name`,
   559  `idx`.`is_visible`,
   560  `idx`.`hidden`,
   561  `idx`.`comment`,
   562  `tbl`.`relname`,
   563  `idx`.`column_name`,
   564  `idx`.`ordinal_position`,
   565  `idx`.`options`
   566  from
   567  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   568  where  `tbl`.`relname` = 't12' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   569  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   570  PRIMARY    PRIMARY    PRIMARY    1    0        t12    a    1    null
   571  idx_1    MULTIPLE    idx_1    1    0    xxxxxxx    t12    a    1    null
   572  idx_1    MULTIPLE    idx_1    1    0    xxxxxxx    t12    b    2    null
   573  select
   574  table_schema,
   575  table_name,
   576  non_unique,
   577  index_schema,
   578  index_name,
   579  seq_in_index,
   580  column_name,
   581  index_comment
   582  from
   583  information_schema.statistics where table_schema = 'db6' and table_name = 't12';
   584  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   585  db6    t12    0    db6    PRIMARY    1    a    
   586  db6    t12    1    db6    idx_1    1    a    xxxxxxx
   587  db6    t12    1    db6    idx_1    2    b    xxxxxxx
   588  create index idx_1 on t12(a, b);
   589  duplicate key name 'idx_1'
   590  select
   591  `idx`.`name`,
   592  `idx`.`type`,
   593  `idx`.`name`,
   594  `idx`.`is_visible`,
   595  `idx`.`hidden`,
   596  `idx`.`comment`,
   597  `tbl`.`relname`,
   598  `idx`.`column_name`,
   599  `idx`.`ordinal_position`,
   600  `idx`.`options`
   601  from
   602  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   603  where  `tbl`.`relname` = 't12' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   604  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   605  PRIMARY    PRIMARY    PRIMARY    1    0        t12    a    1    null
   606  idx_1    MULTIPLE    idx_1    1    0    xxxxxxx    t12    a    1    null
   607  idx_1    MULTIPLE    idx_1    1    0    xxxxxxx    t12    b    2    null
   608  select
   609  table_schema,
   610  table_name,
   611  non_unique,
   612  index_schema,
   613  index_name,
   614  seq_in_index,
   615  column_name,
   616  index_comment
   617  from
   618  information_schema.statistics where table_schema = 'db6' and table_name = 't12';
   619  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   620  db6    t12    0    db6    PRIMARY    1    a    
   621  db6    t12    1    db6    idx_1    1    a    xxxxxxx
   622  db6    t12    1    db6    idx_1    2    b    xxxxxxx
   623  drop index idx_1 on t12;
   624  select
   625  `idx`.`name`,
   626  `idx`.`type`,
   627  `idx`.`name`,
   628  `idx`.`is_visible`,
   629  `idx`.`hidden`,
   630  `idx`.`comment`,
   631  `tbl`.`relname`,
   632  `idx`.`column_name`,
   633  `idx`.`ordinal_position`,
   634  `idx`.`options`
   635  from
   636  `mo_catalog`.`mo_indexes` `idx` join `mo_catalog`.`mo_tables` `tbl` on (`idx`.`table_id` = `tbl`.`rel_id`)
   637  where  `tbl`.`relname` = 't12' and `tbl`.`reldatabase` = 'db6' and `idx`.`column_name` NOT LIKE '__mo_alias_%';
   638  name    type    name    is_visible    hidden    comment    relname    column_name    ordinal_position    options
   639  PRIMARY    PRIMARY    PRIMARY    1    0        t12    a    1    null
   640  select
   641  table_schema,
   642  table_name,
   643  non_unique,
   644  index_schema,
   645  index_name,
   646  seq_in_index,
   647  column_name,
   648  index_comment
   649  from
   650  information_schema.statistics where table_schema = 'db6' and table_name = 't12';
   651  table_schema    table_name    non_unique    index_schema    index_name    seq_in_index    column_name    index_comment
   652  db6    t12    0    db6    PRIMARY    1    a    
   653  drop index idx_1 on t12;
   654  internal error: not found index: idx_1
   655  drop table t12;
   656  drop database db6;