MatrixOne Catalog

MatrixOne catalog is a component where MatrixOne stores system information. We can access the system information by mo_catalog database. The mo_catalog database is created by MatrixOne at initialization.

In 0.5.1, the mo_catalog is not fully implemented, users can check basic information about the their database and tables, but writing values into mo_catalog by users is not supported yet.

There are three tables in the mo_catalog database:

mo_database table

This table contains the database information.

  • table structure:
AttributesTypePrimary keyDescription
datnamevarchar(256)Primary keydatabase name
dat_catalog_namevarchar(256)catalog name
dat_createsqlvarchar(4096)create sql
  • table initial rows:

At initialization, mo_database have some default rows in place.

datnamedat_catalog_namedat_createsql
mo_catalogdefhardcode
information_schemadefcreate database if not exists information_schema
system_metricsdef

mo_tables table

This table contains the information about the table, index, view etc.

  • table structure:
AttributesTypePrimary keyDescription
relnamevarchar(256)PKName of the table, index, view, etc.
reldatabasevarchar(256)PK,FKThe database that contains this relation. reference mo_database.datname
relpersistencechar(1)p = permanent table, t = temporary table
relkindchar(1)r = ordinary table, i = index, S = sequence, v = view, m = materialized view
rel_commentvarchar(1024)comment
rel_createsqlvarchar(4096)create sql
  • table initial rows:

At initialization, mo_tables have some default rows in place.

relnamereldatabaserepersistencerelkindrel_createsqlrel_comment
mo_databasemo_catalog‘p’‘r’tae hardcodedatabases
mo_tablesmo_catalog‘p’‘r’tae hardcodetables
mo_columnsmo_catalog‘p’‘r’tae hardcodecolumns
mo_global_variablesmo_catalog‘p’‘r’create sqlsystem variables
mo_usermo_catalog‘p’‘r’create sqluser
schematainformation_schema‘p’‘v’create sqlschemas
tablesinformation_schema‘p’‘v’create sqltables
columnsinformation_schema‘p’‘v’create sqlcolumns
key_column_usageinformation_schema‘p’‘v’create sqlcolumns related to unique, primary key, or foreign key
viewsinformation_schema‘p’‘v’create sqlviews

mo_columns table

This table contains the information about the table attributes.

  • table structure:
AttributesTypePrimary keyDescription
att_databasevarchar(256)PKdatabase
att_relnamevarchar(256)PK,UKThe table this column belongs to.(references mo_tables.relname)
attnamevarchar(256)PKThe column name
atttypintThe data type of this column (zero for a dropped column).
attnumintUKThe number of the column. Ordinary columns are numbered from 1 up.
att_lengthintbytes count for the type.
attnotnulltinyint(1)This represents a not-null constraint.
atthasdeftinyint(1)This column has a default expression or generation expression.
att_defaultvarchar(1024)default expression
attisdroppedtinyint(1)This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL.
att_constraint_typechar(1)p = primary key constraint, n=no constraint
att_is_unsignedtinyint(1)unsigned or not
att_is_auto_incrementtinyintauto increment or not
att_commentvarchar(1024)comment
att_is_hiddentinyint(1)hidden or not
  • table initial rows:
att_databaseatt_relnameattnameatttypattnumattnotnullatthasdefatt_defaultattisdroppedatt_constraint_typeatt_is_unsignedatt_is_auto_incrementatt_commentatt_is_hidden
mo_catalogmo_databasedatnamevarchar010‘’0‘p’00‘database name’0
mo_catalogmo_databasedat_catalog_namevarchar110‘’0‘p’00‘catalog’0
mo_catalogmo_databasedat_createsqlvarchar21
mo_catalogmo_tablesrelnamevarchar01‘p’
mo_catalogmo_tablesreldatabasevarchar11‘p’
mo_catalogmo_tablesrelpersistencechar21
mo_catalogmo_tablesrelkindchar31
mo_catalogmo_tablesrel_createsqlvarchar40
mo_catalogmo_tablesrel_commentvarchar50
mo_catalogmo_columnsatt_databasevarchar01
mo_catalogmo_columnsatt_relnamevarchar11
mo_catalogmo_columnsattnamevarchar21
mo_catalogmo_columnsatttypint31
mo_catalogmo_columnsattnumint41
mo_catalogmo_columnsattnotnulltinyint51
mo_catalogmo_columnsatthasdeftinyint61
mo_catalogmo_columnsatt_defaultvarchar70
mo_catalogmo_columnsattisdroppedtinyint81
mo_catalogmo_columnsatt_constraint_typechar91
mo_catalogmo_columnsatt_is_unsignedtinyint101
mo_catalogmo_columnsatt_is_auto_incrementtinyint111
mo_catalogmo_columnsatt_commentvarchar120
mo_catalogmo_columnsatt_is_hiddentinyint131

mo_global_variables table

This table contains the information about the system variables.

  • table structure:
AttributesTypePrimary keyDescription
gv_variable_namevarchar(256)PKvariable name
gv_variable_valuevarchar(1024)variable value
  • table initial rows:
gv_variable_namegv_variable_value
gv_variable_namegv_variable_value
max_allowed_packet67108864
version_commentMatrixOne
port6001
host0.0.0.0
storePath./store
batchSizeInLoadData40000

mo_user table

This table contains the information of user accounts.

  • table structure:
AttributesTypePrimary keyDescription
user_hostvarchar(256)PKuser host
user_namevarchar(256)PKuser name
Select_privchar‘N’,’Y’
Insert_privchar‘N’,’Y’
Update_privchar‘N’,’Y’
Delete_privchar‘N’,’Y’
Create_privchar‘N’,’Y’
Drop_privchar‘N’,’Y’
Reload_privchar‘N’,’Y’
Shutdown_privchar‘N’,’Y’
Process_privchar‘N’,’Y’
File_privchar‘N’,’Y’
Grant_privchar‘N’,’Y’
References_privchar‘N’,’Y’
Index_privchar‘N’,’Y’
Alter_privchar‘N’,’Y’
Show_db_privchar‘N’,’Y’
Super_privchar‘N’,’Y’
Create_tmp_table_privchar‘N’,’Y’
Lock_tables_privchar‘N’,’Y’
Execute_privchar‘N’,’Y’
Repl_slave_privchar‘N’,’Y’
Repl_client_privchar‘N’,’Y’
Create_view_privchar‘N’,’Y’
Show_view_privchar‘N’,’Y’
Create_routine_privchar‘N’,’Y’
Alter_routine_privchar‘N’,’Y’
Create_user_privchar‘N’,’Y’
Event_privchar‘N’,’Y’
Trigger_privchar‘N’,’Y’
Create_tablespace_privchar‘N’,’Y’
max_questionsint unsigned
max_updatesint unsigned
max_connectionsint unsigned
max_user_connectionsint unsigned
authentication_stringvarchar(4096)password
account_lockedchar‘N’,’Y’
Create_role_privchar‘N’,’Y’
Drop_role_privchar‘N’,’Y’
  • table initial rows:
user_hostuser_nameauthentication_string
localhostroot‘’
localhostdump111