2.1.17 check @@metadata 命令
用于检查meta信息是否存在以及加载的时间。
命令格式:
- 第一种形式
check @@metadata
- 返回上一次 reload @@metadata 的datatime(或者上一次 reload @@config_all的datatime 或者启动时加载meta的datatime)
第二种形式
check full @@metadata
,并且支持以下过滤条件:where schema=? and table=?
where schema=?
where reload_time=‘yyyy-MM-dd HH:mm:ss’
,where reload_time>=‘yyyy-MM-dd HH:mm:ss’
,where reload_time<=‘yyyy-MM-dd HH:mm:ss’
where reload_time is null
where consistent_in_data_nodes=0
where consistent_in_data_nodes = 1
where consistent_in_memory=0
where consistent_in_memory = 1
- If no where, retrun all results.
check full @@metadata
结果集如下:
schema | table | reload_time | table_structure | consistent_in_data_nodes | consistent_in_memory |
---|---|---|---|---|---|
schema | table | 2018-09-18 11:01:04 | CREATE TABLE table`(..... | 1 | 1 |
column table_structure 和 show create table
命令结果的形式一样
column consistent_in_data_nodes 表示不同分片之间的一致性,0为不一致,1为一致
column consistent_in_memory 表示内存中meta与实际后端结点的一致性,0为不一致,1为一致
当table_structure列为null时,consistent_in_data_nodes列和consistent_in_memory列没有意义。
当consistent_in_data_nodes为0时,consistent_in_memory没有意义。