move test folder
This commit is contained in:
@ -0,0 +1,165 @@
|
||||
use oceanbase;
|
||||
select * from __all_virtual_data_type order by data_type;
|
||||
data_type data_type_str data_type_class
|
||||
0 NULL 0
|
||||
1 TINYINT 1
|
||||
2 SMALLINT 1
|
||||
3 MEDIUMINT 1
|
||||
4 INT 1
|
||||
5 BIGINT 1
|
||||
6 TINYINT UNSIGNED 2
|
||||
7 SMALLINT UNSIGNED 2
|
||||
8 MEDIUMINT UNSIGNED 2
|
||||
9 INT UNSIGNED 2
|
||||
10 BIGINT UNSIGNED 2
|
||||
11 FLOAT 3
|
||||
12 DOUBLE 4
|
||||
13 FLOAT UNSIGNED 3
|
||||
14 DOUBLE UNSIGNED 4
|
||||
15 DECIMAL 5
|
||||
16 DECIMAL UNSIGNED 5
|
||||
17 DATETIME 6
|
||||
18 TIMESTAMP 6
|
||||
19 DATE 7
|
||||
20 TIME 8
|
||||
21 YEAR 9
|
||||
22 VARCHAR 10
|
||||
23 CHAR 10
|
||||
24 HEX_STRING 10
|
||||
25 EXT 11
|
||||
26 UNKNOWN 12
|
||||
27 TINYTEXT 13
|
||||
28 TEXT 13
|
||||
29 MEDIUMTEXT 13
|
||||
30 LONGTEXT 13
|
||||
31 BIT 14
|
||||
32 ENUM 15
|
||||
33 SET 15
|
||||
34 ENUM_INNER 16
|
||||
35 SET_INNER 16
|
||||
36 TIMESTAMP_WITH_TIME_ZONE 17
|
||||
37 TIMESTAMP_WITH_LOCAL_TIME_ZONE 17
|
||||
38 TIMESTAMP 17
|
||||
39 RAW 18
|
||||
40 INTERVAL_YEAR_TO_MONTH 19
|
||||
41 INTERVAL_DAY_TO_SECOND 19
|
||||
42 NUMBER_FLOAT 5
|
||||
43 NVARCHAR2 10
|
||||
44 NCHAR 10
|
||||
45 ROWID 20
|
||||
46 LOB 21
|
||||
47 JSON 22
|
||||
select data_type, data_type_str, data_type_class from __all_virtual_data_type order by data_type;
|
||||
data_type data_type_str data_type_class
|
||||
0 NULL 0
|
||||
1 TINYINT 1
|
||||
2 SMALLINT 1
|
||||
3 MEDIUMINT 1
|
||||
4 INT 1
|
||||
5 BIGINT 1
|
||||
6 TINYINT UNSIGNED 2
|
||||
7 SMALLINT UNSIGNED 2
|
||||
8 MEDIUMINT UNSIGNED 2
|
||||
9 INT UNSIGNED 2
|
||||
10 BIGINT UNSIGNED 2
|
||||
11 FLOAT 3
|
||||
12 DOUBLE 4
|
||||
13 FLOAT UNSIGNED 3
|
||||
14 DOUBLE UNSIGNED 4
|
||||
15 DECIMAL 5
|
||||
16 DECIMAL UNSIGNED 5
|
||||
17 DATETIME 6
|
||||
18 TIMESTAMP 6
|
||||
19 DATE 7
|
||||
20 TIME 8
|
||||
21 YEAR 9
|
||||
22 VARCHAR 10
|
||||
23 CHAR 10
|
||||
24 HEX_STRING 10
|
||||
25 EXT 11
|
||||
26 UNKNOWN 12
|
||||
27 TINYTEXT 13
|
||||
28 TEXT 13
|
||||
29 MEDIUMTEXT 13
|
||||
30 LONGTEXT 13
|
||||
31 BIT 14
|
||||
32 ENUM 15
|
||||
33 SET 15
|
||||
34 ENUM_INNER 16
|
||||
35 SET_INNER 16
|
||||
36 TIMESTAMP_WITH_TIME_ZONE 17
|
||||
37 TIMESTAMP_WITH_LOCAL_TIME_ZONE 17
|
||||
38 TIMESTAMP 17
|
||||
39 RAW 18
|
||||
40 INTERVAL_YEAR_TO_MONTH 19
|
||||
41 INTERVAL_DAY_TO_SECOND 19
|
||||
42 NUMBER_FLOAT 5
|
||||
43 NVARCHAR2 10
|
||||
44 NCHAR 10
|
||||
45 ROWID 20
|
||||
46 LOB 21
|
||||
47 JSON 22
|
||||
select * from __all_virtual_data_type where data_type = 22;
|
||||
data_type data_type_str data_type_class
|
||||
22 VARCHAR 10
|
||||
select a.data_type_str, b.data_type_class_str from __all_virtual_data_type a inner join __all_virtual_data_type_class b on a.data_type_class = b.data_type_class order by a.data_type;
|
||||
data_type_str data_type_class_str
|
||||
NULL NULL
|
||||
TINYINT INT
|
||||
SMALLINT INT
|
||||
MEDIUMINT INT
|
||||
INT INT
|
||||
BIGINT INT
|
||||
TINYINT UNSIGNED UINT
|
||||
SMALLINT UNSIGNED UINT
|
||||
MEDIUMINT UNSIGNED UINT
|
||||
INT UNSIGNED UINT
|
||||
BIGINT UNSIGNED UINT
|
||||
FLOAT FLOAT
|
||||
DOUBLE DOUBLE
|
||||
FLOAT UNSIGNED FLOAT
|
||||
DOUBLE UNSIGNED DOUBLE
|
||||
DECIMAL DECIMAL
|
||||
DECIMAL UNSIGNED DECIMAL
|
||||
DATETIME DATETIME
|
||||
TIMESTAMP DATETIME
|
||||
DATE DATE
|
||||
TIME TIME
|
||||
YEAR YEAR
|
||||
VARCHAR STRING
|
||||
CHAR STRING
|
||||
HEX_STRING STRING
|
||||
EXT EXT
|
||||
UNKNOWN UNKNOWN
|
||||
TINYTEXT TEXT
|
||||
TEXT TEXT
|
||||
MEDIUMTEXT TEXT
|
||||
LONGTEXT TEXT
|
||||
BIT BIT
|
||||
ENUM ENUM_SET
|
||||
SET ENUM_SET
|
||||
TIMESTAMP_WITH_TIME_ZONE OTIMESTAMP
|
||||
TIMESTAMP_WITH_LOCAL_TIME_ZONE OTIMESTAMP
|
||||
TIMESTAMP OTIMESTAMP
|
||||
RAW RAW
|
||||
INTERVAL_YEAR_TO_MONTH INTERVAL
|
||||
INTERVAL_DAY_TO_SECOND INTERVAL
|
||||
NUMBER_FLOAT DECIMAL
|
||||
NVARCHAR2 STRING
|
||||
NCHAR STRING
|
||||
ROWID ROWID
|
||||
LOB LOB
|
||||
JSON JSON
|
||||
show create table __all_virtual_data_type;
|
||||
Table Create Table
|
||||
__all_virtual_data_type CREATE TABLE `__all_virtual_data_type` (
|
||||
`data_type` bigint(20) NOT NULL,
|
||||
`data_type_str` varchar(128) NOT NULL,
|
||||
`data_type_class` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`data_type`)
|
||||
) DEFAULT CHARSET = utf8mb4 COMPRESSION = 'none' REPLICA_NUM = NUM BLOCK_SIZE = SIZE USE_BLOOM_FILTER = FALSE TABLET_SIZE = SIZE PCTFREE = 10 TABLEGROUP = 'oceanbase'
|
||||
desc __all_virtual_data_type;
|
||||
Field Type Null Key Default Extra
|
||||
data_type bigint(20) NO PRI NULL
|
||||
data_type_str varchar(128) NO NULL
|
||||
data_type_class bigint(20) NO NULL
|
||||
@ -0,0 +1,111 @@
|
||||
use oceanbase;
|
||||
select * from __all_virtual_data_type_class;
|
||||
data_type_class data_type_class_str
|
||||
0 NULL
|
||||
1 INT
|
||||
2 UINT
|
||||
3 FLOAT
|
||||
4 DOUBLE
|
||||
5 DECIMAL
|
||||
6 DATETIME
|
||||
7 DATE
|
||||
8 TIME
|
||||
9 YEAR
|
||||
10 STRING
|
||||
11 EXT
|
||||
12 UNKNOWN
|
||||
13 TEXT
|
||||
14 BIT
|
||||
15 ENUM_SET
|
||||
17 OTIMESTAMP
|
||||
18 RAW
|
||||
19 INTERVAL
|
||||
20 ROWID
|
||||
21 LOB
|
||||
22 JSON
|
||||
select data_type_class, data_type_class_str from __all_virtual_data_type_class;
|
||||
data_type_class data_type_class_str
|
||||
0 NULL
|
||||
1 INT
|
||||
2 UINT
|
||||
3 FLOAT
|
||||
4 DOUBLE
|
||||
5 DECIMAL
|
||||
6 DATETIME
|
||||
7 DATE
|
||||
8 TIME
|
||||
9 YEAR
|
||||
10 STRING
|
||||
11 EXT
|
||||
12 UNKNOWN
|
||||
13 TEXT
|
||||
14 BIT
|
||||
15 ENUM_SET
|
||||
17 OTIMESTAMP
|
||||
18 RAW
|
||||
19 INTERVAL
|
||||
20 ROWID
|
||||
21 LOB
|
||||
22 JSON
|
||||
select * from __all_virtual_data_type_class where data_type_class = 10;
|
||||
data_type_class data_type_class_str
|
||||
10 STRING
|
||||
select a.data_type_str, b.data_type_class_str from __all_virtual_data_type a inner join __all_virtual_data_type_class b on a.data_type_class = b.data_type_class order by a.data_type;
|
||||
data_type_str data_type_class_str
|
||||
NULL NULL
|
||||
TINYINT INT
|
||||
SMALLINT INT
|
||||
MEDIUMINT INT
|
||||
INT INT
|
||||
BIGINT INT
|
||||
TINYINT UNSIGNED UINT
|
||||
SMALLINT UNSIGNED UINT
|
||||
MEDIUMINT UNSIGNED UINT
|
||||
INT UNSIGNED UINT
|
||||
BIGINT UNSIGNED UINT
|
||||
FLOAT FLOAT
|
||||
DOUBLE DOUBLE
|
||||
FLOAT UNSIGNED FLOAT
|
||||
DOUBLE UNSIGNED DOUBLE
|
||||
DECIMAL DECIMAL
|
||||
DECIMAL UNSIGNED DECIMAL
|
||||
DATETIME DATETIME
|
||||
TIMESTAMP DATETIME
|
||||
DATE DATE
|
||||
TIME TIME
|
||||
YEAR YEAR
|
||||
VARCHAR STRING
|
||||
CHAR STRING
|
||||
HEX_STRING STRING
|
||||
EXT EXT
|
||||
UNKNOWN UNKNOWN
|
||||
TINYTEXT TEXT
|
||||
TEXT TEXT
|
||||
MEDIUMTEXT TEXT
|
||||
LONGTEXT TEXT
|
||||
BIT BIT
|
||||
ENUM ENUM_SET
|
||||
SET ENUM_SET
|
||||
TIMESTAMP_WITH_TIME_ZONE OTIMESTAMP
|
||||
TIMESTAMP_WITH_LOCAL_TIME_ZONE OTIMESTAMP
|
||||
TIMESTAMP OTIMESTAMP
|
||||
RAW RAW
|
||||
INTERVAL_YEAR_TO_MONTH INTERVAL
|
||||
INTERVAL_DAY_TO_SECOND INTERVAL
|
||||
NUMBER_FLOAT DECIMAL
|
||||
NVARCHAR2 STRING
|
||||
NCHAR STRING
|
||||
ROWID ROWID
|
||||
LOB LOB
|
||||
JSON JSON
|
||||
show create table __all_virtual_data_type_class;
|
||||
Table Create Table
|
||||
__all_virtual_data_type_class CREATE TABLE `__all_virtual_data_type_class` (
|
||||
`data_type_class` bigint(20) NOT NULL,
|
||||
`data_type_class_str` varchar(128) NOT NULL,
|
||||
PRIMARY KEY (`data_type_class`)
|
||||
) DEFAULT CHARSET = utf8mb4 COMPRESSION = 'none' REPLICA_NUM = NUM BLOCK_SIZE = SIZE USE_BLOOM_FILTER = FALSE TABLET_SIZE = SIZE PCTFREE = 10 TABLEGROUP = 'oceanbase'
|
||||
desc __all_virtual_data_type_class;
|
||||
Field Type Null Key Default Extra
|
||||
data_type_class bigint(20) NO PRI NULL
|
||||
data_type_class_str varchar(128) NO NULL
|
||||
@ -0,0 +1,25 @@
|
||||
use oceanbase;
|
||||
select * from __all_virtual_engine;
|
||||
Engine Support Comment Transactions XA Savepoints
|
||||
OceanBase YES Supports transactions YES NO NO
|
||||
select Engine, Support, Comment, Transactions, XA, Savepoints from __all_virtual_engine;
|
||||
Engine Support Comment Transactions XA Savepoints
|
||||
OceanBase YES Supports transactions YES NO NO
|
||||
show create table __all_virtual_engine;
|
||||
Table Create Table
|
||||
__all_virtual_engine CREATE TABLE `__all_virtual_engine` (
|
||||
`Engine` varchar(64) NOT NULL,
|
||||
`Support` varchar(4) NOT NULL,
|
||||
`Comment` varchar(2048) NOT NULL,
|
||||
`Transactions` varchar(4) NOT NULL,
|
||||
`XA` varchar(4) NOT NULL,
|
||||
`Savepoints` varchar(4) NOT NULL
|
||||
) DEFAULT CHARSET = utf8mb4 COMPRESSION = 'none' REPLICA_NUM = NUM BLOCK_SIZE = SIZE USE_BLOOM_FILTER = FALSE TABLET_SIZE = SIZE PCTFREE = 10 TABLEGROUP = 'oceanbase'
|
||||
desc __all_virtual_engine;
|
||||
Field Type Null Key Default Extra
|
||||
Engine varchar(64) NO NULL
|
||||
Support varchar(4) NO NULL
|
||||
Comment varchar(2048) NO NULL
|
||||
Transactions varchar(4) NO NULL
|
||||
XA varchar(4) NO NULL
|
||||
Savepoints varchar(4) NO NULL
|
||||
@ -0,0 +1,12 @@
|
||||
select * from oceanbase.__tenant_virtual_interm_result where svr_ip = '0.0.0.0' and svr_port = 0;
|
||||
job_id task_id slice_id execution_id svr_ip svr_port expire_time row_count scanner_count used_memory_size used_disk_size partition_ip partition_port
|
||||
select * from oceanbase.__tenant_virtual_interm_result;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where svr_port > 0;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where scanner_count > 0;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where expire_time > 0;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where used_memory_size > 0;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where is_serving_tenant(svr_ip, svr_port, 1);
|
||||
select * from oceanbase.__tenant_virtual_interm_result where is_serving_tenant(svr_ip, svr_port, 1001);
|
||||
select is_serving_tenant(svr_ip, svr_port, 1), is_serving_tenant(svr_ip, svr_port, 1001) from oceanbase.__tenant_virtual_interm_result where is_serving_tenant(svr_ip, svr_port, 1);
|
||||
select svr_ip, svr_port from oceanbase.__tenant_virtual_interm_result group by svr_ip, svr_port having is_serving_tenant(svr_ip, svr_port, 1);
|
||||
select t1.svr_ip, t1.svr_port, t2.svr_ip, t2.svr_port from oceanbase.__tenant_virtual_interm_result t1 join oceanbase.__tenant_virtual_interm_result t2 on is_serving_tenant(t1.svr_ip, t2.svr_port, 1);
|
||||
@ -0,0 +1,56 @@
|
||||
desc oceanbase.__all_virtual_pg_partition_info;
|
||||
Field Type Null Key Default Extra
|
||||
svr_ip varchar(46) NO NULL
|
||||
svr_port bigint(20) NO NULL
|
||||
tenant_id bigint(20) NO NULL
|
||||
table_id bigint(20) NO NULL
|
||||
partition_idx bigint(20) NO NULL
|
||||
tg_id bigint(20) NO NULL
|
||||
pg_idx bigint(20) NO NULL
|
||||
max_decided_trans_version bigint(20) NO NULL
|
||||
max_passed_trans_ts bigint(20) NO NULL
|
||||
freeze_ts bigint(20) NO NULL
|
||||
allow_gc tinyint(4) NO NULL
|
||||
partition_state varchar(128) NO NULL
|
||||
min_log_service_ts bigint(20) NO -1
|
||||
min_trans_service_ts bigint(20) NO -1
|
||||
min_replay_engine_ts bigint(20) NO -1
|
||||
is_pg tinyint(4) NO NULL
|
||||
weak_read_timestamp bigint(20) NO -1
|
||||
replica_type bigint(20) NO 0
|
||||
use test;
|
||||
create tablegroup tg1 binding true;
|
||||
create table test1 (id1 int, id2 int) tablegroup tg1;
|
||||
create table test2 (id1 int, id2 int) tablegroup tg1;
|
||||
create table test3 (id1 int, id2 int);
|
||||
create table test4 (id1 int, id2 int);
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where table_id in (select table_id from oceanbase.__all_virtual_table where table_name = 'test1') and partition_state = 'L_WORKING';
|
||||
count(1)
|
||||
1
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where table_id in (select table_id from oceanbase.__all_virtual_table where table_name = 'test2') and partition_state = 'L_WORKING';
|
||||
count(1)
|
||||
1
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where table_id in (select table_id from oceanbase.__all_virtual_table where table_name = 'test3') and partition_state = 'L_WORKING';
|
||||
count(1)
|
||||
1
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where table_id in (select table_id from oceanbase.__all_virtual_table where table_name = 'test4') and partition_state = 'L_WORKING';
|
||||
count(1)
|
||||
1
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where tg_id in (select tablegroup_id as tg_id from oceanbase.__all_virtual_tablegroup where tablegroup_name = 'tg1') and partition_state = 'L_WORKING';
|
||||
count(1)
|
||||
2
|
||||
select pg_partition_count from oceanbase.__all_virtual_partition_info
|
||||
where table_id in (select tablegroup_id as table_id from oceanbase.__all_virtual_tablegroup where tablegroup_name = 'tg1') and partition_state = 'L_WORKING';
|
||||
pg_partition_count
|
||||
2
|
||||
drop table if exists test1;
|
||||
drop table if exists test2;
|
||||
drop table if exists test3;
|
||||
drop table if exists test4;
|
||||
purge recyclebin;
|
||||
drop tablegroup tg1;
|
||||
@ -0,0 +1,382 @@
|
||||
select tenant_id, table_name from oceanbase.__all_virtual_table where table_name = '__all_virtual_sys_parameter_stat';
|
||||
tenant_id table_name
|
||||
1 __all_virtual_sys_parameter_stat
|
||||
use oceanbase;
|
||||
desc __all_virtual_sys_parameter_stat;
|
||||
Field Type Null Key Default Extra
|
||||
zone varchar(128) NO NULL
|
||||
svr_type varchar(16) NO NULL
|
||||
svr_ip varchar(46) NO NULL
|
||||
svr_port bigint(20) NO NULL
|
||||
name varchar(128) NO NULL
|
||||
data_type varchar(128) YES NULL
|
||||
value varchar(65536) NO NULL
|
||||
value_strict varchar(4096) YES NULL
|
||||
info varchar(4096) NO NULL
|
||||
need_reboot bigint(20) NO NULL
|
||||
section varchar(128) NO NULL
|
||||
visible_level varchar(64) NO NULL
|
||||
scope varchar(64) NO NULL
|
||||
source varchar(64) NO NULL
|
||||
edit_level varchar(128) NO NULL
|
||||
select name from __all_virtual_sys_parameter_stat where name not like "module_test_%" group by name order by name;
|
||||
name
|
||||
all_cluster_list
|
||||
all_server_list
|
||||
autoinc_cache_refresh_interval
|
||||
auto_broadcast_location_cache_rate_limit
|
||||
auto_delete_expired_backup
|
||||
auto_leader_switch_interval
|
||||
auto_refresh_location_cache_rate_limit
|
||||
backup_backup_dest
|
||||
backup_backup_dest_option
|
||||
backup_concurrency
|
||||
backup_dest
|
||||
backup_dest_option
|
||||
backup_log_archive_option
|
||||
backup_net_limit
|
||||
backup_recovery_window
|
||||
backup_region
|
||||
backup_zone
|
||||
balancer_emergency_percentage
|
||||
balancer_idle_time
|
||||
balancer_log_interval
|
||||
balancer_task_timeout
|
||||
balancer_timeout_check_interval
|
||||
balancer_tolerance_percentage
|
||||
balance_blacklist_failure_threshold
|
||||
balance_blacklist_retry_interval
|
||||
bf_cache_miss_count_threshold
|
||||
bf_cache_priority
|
||||
builtin_db_data_verify_cycle
|
||||
cache_wash_threshold
|
||||
clog_cache_priority
|
||||
clog_disk_usage_limit_percentage
|
||||
clog_disk_utilization_threshold
|
||||
clog_max_unconfirmed_log_count
|
||||
clog_sync_time_warn_threshold
|
||||
cluster
|
||||
cluster_id
|
||||
config_additional_dir
|
||||
cpu_count
|
||||
cpu_quota_concurrency
|
||||
cpu_reserved
|
||||
datafile_disk_percentage
|
||||
datafile_maxsize
|
||||
datafile_next
|
||||
datafile_size
|
||||
data_copy_concurrency
|
||||
data_dir
|
||||
data_disk_usage_limit_percentage
|
||||
data_storage_error_tolerance_time
|
||||
data_storage_warning_tolerance_time
|
||||
dead_socket_detection_timeout
|
||||
debug_sync_timeout
|
||||
default_compress
|
||||
default_compress_func
|
||||
default_progressive_merge_num
|
||||
default_row_format
|
||||
devname
|
||||
disk_io_thread_count
|
||||
dtl_buffer_size
|
||||
election_blacklist_interval
|
||||
election_cpu_quota
|
||||
enable_async_syslog
|
||||
enable_auto_leader_switch
|
||||
enable_auto_refresh_location_cache
|
||||
enable_ddl
|
||||
enable_early_lock_release
|
||||
enable_election_group
|
||||
enable_global_freeze_trigger
|
||||
enable_kv_ttl
|
||||
enable_log_archive
|
||||
enable_major_freeze
|
||||
enable_manual_merge
|
||||
enable_merge_by_turn
|
||||
enable_monotonic_weak_read
|
||||
enable_one_phase_commit
|
||||
enable_perf_event
|
||||
enable_rebalance
|
||||
enable_record_trace_id
|
||||
enable_record_trace_log
|
||||
enable_rereplication
|
||||
enable_rich_error_msg
|
||||
enable_rootservice_standalone
|
||||
enable_separate_sys_clog
|
||||
enable_smooth_leader_switch
|
||||
enable_sql_audit
|
||||
enable_sql_operator_dump
|
||||
enable_syslog_file_compress
|
||||
enable_syslog_recycle
|
||||
enable_syslog_wf
|
||||
enable_sys_table_ddl
|
||||
enable_sys_unit_standalone
|
||||
enable_tcp_keepalive
|
||||
enable_unit_balance_resource_weight
|
||||
enable_upgrade_mode
|
||||
fast_recovery_concurrency
|
||||
flush_log_at_trx_commit
|
||||
force_refresh_location_cache_interval
|
||||
force_refresh_location_cache_threshold
|
||||
freeze_trigger_percentage
|
||||
fuse_row_cache_priority
|
||||
gc_wait_archive
|
||||
get_leader_candidate_rpc_timeout
|
||||
global_index_build_single_replica_timeout
|
||||
global_major_freeze_residual_memory
|
||||
global_write_halt_residual_memory
|
||||
gts_refresh_interval
|
||||
high_priority_net_thread_count
|
||||
ignore_replay_checksum_error
|
||||
ignore_replica_checksum_error
|
||||
ilog_index_expire_time
|
||||
index_cache_priority
|
||||
index_clog_cache_priority
|
||||
index_info_block_cache_priority
|
||||
internal_sql_execute_timeout
|
||||
kv_ttl_duty_duration
|
||||
kv_ttl_history_recycle_interval
|
||||
large_query_threshold
|
||||
large_query_worker_percentage
|
||||
leak_mod_to_check
|
||||
lease_time
|
||||
location_cache_cpu_quota
|
||||
location_cache_expire_time
|
||||
location_cache_priority
|
||||
location_cache_refresh_min_interval
|
||||
location_cache_refresh_rpc_timeout
|
||||
location_cache_refresh_sql_timeout
|
||||
location_fetch_concurrency
|
||||
location_refresh_thread_count
|
||||
log_archive_batch_buffer_limit
|
||||
log_archive_checkpoint_interval
|
||||
log_archive_concurrency
|
||||
log_restore_concurrency
|
||||
major_compact_trigger
|
||||
major_freeze_duty_time
|
||||
max_kept_major_version_number
|
||||
max_px_worker_count
|
||||
max_stale_time_for_weak_consistency
|
||||
max_string_print_length
|
||||
max_syslog_file_count
|
||||
max_syslog_file_time
|
||||
memory_chunk_cache_size
|
||||
memory_limit
|
||||
memory_limit_percentage
|
||||
memory_reserved
|
||||
memstore_limit_percentage
|
||||
merger_check_interval
|
||||
merger_completion_percentage
|
||||
merger_switch_leader_duration_time
|
||||
merger_warm_up_duration_time
|
||||
merge_stat_sampling_ratio
|
||||
merge_thread_count
|
||||
meta_table_read_write_mode
|
||||
micro_block_merge_verify_level
|
||||
migrate_concurrency
|
||||
migration_disable_time
|
||||
minor_compact_trigger
|
||||
minor_deferred_gc_time
|
||||
minor_freeze_times
|
||||
minor_merge_concurrency
|
||||
minor_warm_up_duration_time
|
||||
min_observer_version
|
||||
multiblock_read_gap_size
|
||||
multiblock_read_size
|
||||
mysql_port
|
||||
net_thread_count
|
||||
obconfig_url
|
||||
ob_enable_batched_multi_statement
|
||||
ob_event_history_recycle_interval
|
||||
ob_proxy_readonly_transaction_routing_policy
|
||||
ob_ssl_invited_common_names
|
||||
open_cursors
|
||||
partition_table_check_interval
|
||||
partition_table_scan_batch_count
|
||||
plan_cache_evict_interval
|
||||
plan_cache_high_watermark
|
||||
plan_cache_low_watermark
|
||||
plsql_ccflags
|
||||
plsql_code_type
|
||||
plsql_debug
|
||||
plsql_optimize_level
|
||||
plsql_v2_compatibility
|
||||
plsql_warnings
|
||||
px_task_size
|
||||
px_workers_per_cpu_quota
|
||||
query_response_time_flush
|
||||
query_response_time_range_base
|
||||
query_response_time_stats
|
||||
rebuild_replica_data_lag_threshold
|
||||
recyclebin_object_expire_time
|
||||
redundancy_level
|
||||
replica_safe_remove_time
|
||||
resource_hard_limit
|
||||
resource_soft_limit
|
||||
restore_concurrency
|
||||
rootservice_async_task_queue_size
|
||||
rootservice_async_task_thread_count
|
||||
rootservice_list
|
||||
rootservice_memory_limit
|
||||
rootservice_ready_check_interval
|
||||
row_compaction_update_limit
|
||||
row_purge_thread_count
|
||||
rpc_port
|
||||
rpc_timeout
|
||||
schema_history_expire_time
|
||||
schema_history_recycle_interval
|
||||
server_balance_cpu_mem_tolerance_percent
|
||||
server_balance_critical_disk_waterlevel
|
||||
server_balance_disk_tolerance_percent
|
||||
server_check_interval
|
||||
server_cpu_quota_max
|
||||
server_cpu_quota_min
|
||||
server_data_copy_in_concurrency
|
||||
server_data_copy_out_concurrency
|
||||
server_permanent_offline_time
|
||||
server_temporary_offline_time
|
||||
sql_audit_memory_limit
|
||||
sql_audit_queue_size
|
||||
sql_work_area
|
||||
ssl_client_authentication
|
||||
ssl_external_kms_info
|
||||
stack_size
|
||||
switchover_process_thread_count
|
||||
syslog_io_bandwidth_limit
|
||||
syslog_level
|
||||
system_cpu_quota
|
||||
system_memory
|
||||
system_trace_level
|
||||
sys_bkgd_io_high_percentage
|
||||
sys_bkgd_io_low_percentage
|
||||
sys_bkgd_migration_change_member_list_timeout
|
||||
sys_bkgd_migration_retry_num
|
||||
sys_bkgd_net_percentage
|
||||
sys_cpu_limit_trigger
|
||||
tableapi_transport_compress_func
|
||||
tablet_size
|
||||
tcp_keepcnt
|
||||
tcp_keepidle
|
||||
tcp_keepintvl
|
||||
tenant_cpu_variation_per_server
|
||||
tenant_groups
|
||||
tenant_task_queue_size
|
||||
token_reserved_percentage
|
||||
trace_log_sampling_interval
|
||||
trace_log_slow_query_watermark
|
||||
trx_2pc_retry_interval
|
||||
trx_force_kill_threshold
|
||||
trx_try_wait_lock_timeout
|
||||
unit_balance_resource_weight
|
||||
user_block_cache_priority
|
||||
user_iort_up_percentage
|
||||
user_row_cache_priority
|
||||
user_tab_col_stat_cache_priority
|
||||
use_ipv6
|
||||
use_large_pages
|
||||
virtual_table_location_cache_expire_time
|
||||
wait_leader_batch_count
|
||||
weak_read_version_refresh_interval
|
||||
workarea_size_policy
|
||||
workers_per_cpu_quota
|
||||
writing_throttling_maximum_duration
|
||||
writing_throttling_trigger_percentage
|
||||
zone
|
||||
zone_merge_concurrency
|
||||
zone_merge_order
|
||||
zone_merge_timeout
|
||||
_alter_column_mode
|
||||
_auto_drop_tenant_if_restore_failed
|
||||
_auto_update_reserved_backup_timestamp
|
||||
_backup_idle_time
|
||||
_backup_retry_timeout
|
||||
_bloom_filter_enabled
|
||||
_bloom_filter_ratio
|
||||
_cache_wash_interval
|
||||
_chunk_row_store_mem_limit
|
||||
_clog_aggregation_buffer_amount
|
||||
_create_table_partition_distribution_strategy
|
||||
_datafile_usage_lower_bound_percentage
|
||||
_datafile_usage_upper_bound_percentage
|
||||
_data_storage_io_timeout
|
||||
_enable_block_file_punch_hole
|
||||
_enable_compaction_diagnose
|
||||
_enable_defensive_check
|
||||
_enable_easy_keepalive
|
||||
_enable_fast_commit
|
||||
_enable_filter_push_down_storage
|
||||
_enable_fulltext_index
|
||||
_enable_hash_join_hasher
|
||||
_enable_hash_join_processor
|
||||
_enable_ha_gts_full_service
|
||||
_enable_oracle_priv_check
|
||||
_enable_parallel_minor_merge
|
||||
_enable_plan_cache_mem_diagnosis
|
||||
_enable_sparse_row
|
||||
_enable_static_typing_engine
|
||||
_enable_trans_ctx_size_limit
|
||||
_flush_clog_aggregation_buffer_timeout
|
||||
_follower_replica_merge_level
|
||||
_force_hash_join_spill
|
||||
_gts_core_num
|
||||
_hash_area_size
|
||||
_io_callback_thread_count
|
||||
_large_query_io_percentage
|
||||
_max_elr_dependent_trx_count
|
||||
_max_partition_cnt_per_server
|
||||
_max_schema_slot_num
|
||||
_max_trx_size
|
||||
_migrate_block_verify_level
|
||||
_mini_merge_concurrency
|
||||
_minor_compaction_amplification_factor
|
||||
_minor_compaction_interval
|
||||
_minor_deferred_gc_level
|
||||
_ob_clog_disk_buffer_cnt
|
||||
_ob_clog_timeout_to_force_switch_leader
|
||||
_ob_ddl_timeout
|
||||
_ob_elr_fast_freeze_threshold
|
||||
_ob_enable_fast_freeze
|
||||
_ob_enable_log_replica_strict_recycle_mode
|
||||
_ob_enable_prepared_statement
|
||||
_ob_enable_px_for_inner_sql
|
||||
_ob_get_gts_ahead_interval
|
||||
_ob_minor_merge_schedule_interval
|
||||
_ob_plan_cache_gc_strategy
|
||||
_ob_query_rate_limit
|
||||
_ob_ssl_invited_nodes
|
||||
_ob_sys_high_load_per_cpu_threshold
|
||||
_ob_trans_rpc_timeout
|
||||
_parallel_min_message_pool
|
||||
_parallel_server_sleep_time
|
||||
_partition_balance_strategy
|
||||
_private_buffer_size
|
||||
_px_chunklist_count_ratio
|
||||
_px_max_message_pool_pct
|
||||
_px_max_pipeline_depth
|
||||
_px_message_compression
|
||||
_recyclebin_object_purge_frequency
|
||||
_restore_idle_time
|
||||
_rpc_checksum
|
||||
_single_zone_deployment_on
|
||||
_sort_area_size
|
||||
_temporary_file_io_area_size
|
||||
_trx_commit_retry_interval
|
||||
_upgrade_stage
|
||||
_xa_gc_interval
|
||||
_xa_gc_timeout
|
||||
__balance_controller
|
||||
__easy_memory_limit
|
||||
__easy_memory_reserved_percentage
|
||||
__enable_identical_partition_distribution
|
||||
__enable_small_tenant
|
||||
__min_full_resource_pool_memory
|
||||
__schema_split_mode
|
||||
select section,info from oceanbase.__all_virtual_sys_parameter_stat where name like '%major%' group by name;
|
||||
section info
|
||||
DAILY_MERGE the maximum number of kept major versions. Range: [1, 16] in integer
|
||||
DAILY_MERGE the start time of system daily merge procedure. Range: [00:00, 24:00)
|
||||
OBSERVER post global major freeze when observer memstore free memory(plus memory held by frozen memstore and blockcache) reach this limit. Rang:(0, 100)limit calc by (memory_limit - system_memory) * global_major_freeze_residual_memory/100
|
||||
ROOT_SERVICE specifies whether major_freeze function is turned on. Value: True:turned on; False: turned off
|
||||
TENANT major_compact_trigger alias to minor_freeze_times, Range: [0,65535] in integer
|
||||
show parameters;
|
||||
show parameters like '%log%';
|
||||
@ -0,0 +1,14 @@
|
||||
desc oceanbase.__all_virtual_upgrade_inspection;
|
||||
Field Type Null Key Default Extra
|
||||
name varchar(128) NO NULL
|
||||
info varchar(4096) NO NULL
|
||||
select * from oceanbase.__all_virtual_upgrade_inspection;
|
||||
name info
|
||||
zone_check succeed
|
||||
sys_stat_check succeed
|
||||
sys_param_check succeed
|
||||
sys_table_schema_check succeed
|
||||
STATISTIC_PRIMARY_ZONE_ENTITY_COUNT succeed
|
||||
SCHEMA_SPLIT_V2 succeed
|
||||
SCHEMA_REVISE succeed
|
||||
all_check succeed
|
||||
@ -0,0 +1,25 @@
|
||||
use information_schema;
|
||||
select * from character_sets;
|
||||
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
|
||||
binary binary Binary pseudo charset 1
|
||||
utf8mb4 utf8mb4_general_ci UTF-8 Unicode 4
|
||||
select character_set_name, default_collate_name, description, maxlen from character_sets;
|
||||
character_set_name default_collate_name description maxlen
|
||||
binary binary Binary pseudo charset 1
|
||||
utf8mb4 utf8mb4_general_ci UTF-8 Unicode 4
|
||||
select maxlen from character_sets;
|
||||
maxlen
|
||||
1
|
||||
4
|
||||
select * from character_sets where character_set_name like '%binary%';
|
||||
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
|
||||
binary binary Binary pseudo charset 1
|
||||
show create table character_sets;
|
||||
View Create View character_set_client collation_connection
|
||||
CHARACTER_SETS CREATE VIEW `CHARACTER_SETS` AS SELECT CHARSET AS CHARACTER_SET_NAME, DEFAULT_COLLATION AS DEFAULT_COLLATE_NAME, DESCRIPTION, max_length AS MAXLEN FROM oceanbase.__tenant_virtual_charset utf8mb4 utf8mb4_general_ci
|
||||
desc character_sets;
|
||||
Field Type Null Key Default Extra
|
||||
CHARACTER_SET_NAME varchar(128) NO
|
||||
DEFAULT_COLLATE_NAME varchar(128) NO
|
||||
DESCRIPTION varchar(64) NO
|
||||
MAXLEN bigint(20) NO
|
||||
@ -0,0 +1,28 @@
|
||||
use information_schema;
|
||||
select * from collation_character_set_applicability;
|
||||
COLLATION_NAME CHARACTER_SET_NAME
|
||||
utf8mb4_general_ci utf8mb4
|
||||
utf8mb4_bin utf8mb4
|
||||
binary binary
|
||||
select COLLATION_NAME, CHARACTER_SET_NAME from collation_character_set_applicability;
|
||||
COLLATION_NAME CHARACTER_SET_NAME
|
||||
utf8mb4_general_ci utf8mb4
|
||||
utf8mb4_bin utf8mb4
|
||||
binary binary
|
||||
select COLLATION_NAME from collation_character_set_applicability;
|
||||
COLLATION_NAME
|
||||
utf8mb4_general_ci
|
||||
utf8mb4_bin
|
||||
binary
|
||||
select CHARACTER_SET_NAME from collation_character_set_applicability;
|
||||
CHARACTER_SET_NAME
|
||||
utf8mb4
|
||||
utf8mb4
|
||||
binary
|
||||
select * from collation_character_set_applicability where COLLATION_NAME = 'utf8mb4_bin';
|
||||
COLLATION_NAME CHARACTER_SET_NAME
|
||||
utf8mb4_bin utf8mb4
|
||||
desc collation_character_set_applicability;
|
||||
Field Type Null Key Default Extra
|
||||
COLLATION_NAME varchar(128) NO
|
||||
CHARACTER_SET_NAME varchar(128) NO
|
||||
@ -0,0 +1,26 @@
|
||||
use information_schema;
|
||||
select * from collations;
|
||||
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
|
||||
utf8mb4_general_ci utf8mb4 45 Yes Yes 1
|
||||
utf8mb4_bin utf8mb4 46 Yes 1
|
||||
binary binary 63 Yes Yes 1
|
||||
select collation_name, character_set_name, id, is_default, is_compiled, sortlen from collations;
|
||||
collation_name character_set_name id is_default is_compiled sortlen
|
||||
utf8mb4_general_ci utf8mb4 45 Yes Yes 1
|
||||
utf8mb4_bin utf8mb4 46 Yes 1
|
||||
binary binary 63 Yes Yes 1
|
||||
select * from collations where collation_name like '%utf8%';
|
||||
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
|
||||
utf8mb4_general_ci utf8mb4 45 Yes Yes 1
|
||||
utf8mb4_bin utf8mb4 46 Yes 1
|
||||
show create table collations;
|
||||
View Create View character_set_client collation_connection
|
||||
COLLATIONS CREATE VIEW `COLLATIONS` AS select collation as COLLATION_NAME, charset as CHARACTER_SET_NAME, id as ID, `is_default` as IS_DEFAULT, is_compiled as IS_COMPILED, sortlen as SORTLEN from oceanbase.__tenant_virtual_collation utf8mb4 utf8mb4_general_ci
|
||||
desc collations;
|
||||
Field Type Null Key Default Extra
|
||||
COLLATION_NAME varchar(128) NO
|
||||
CHARACTER_SET_NAME varchar(128) NO
|
||||
ID bigint(20) NO
|
||||
IS_DEFAULT varchar(4) NO
|
||||
IS_COMPILED varchar(4) NO
|
||||
SORTLEN bigint(20) NO
|
||||
@ -0,0 +1,14 @@
|
||||
use information_schema;
|
||||
select count(*) from global_status;
|
||||
count(*)
|
||||
2
|
||||
show create table global_status;
|
||||
Table Create Table
|
||||
GLOBAL_STATUS CREATE TABLE `GLOBAL_STATUS` (
|
||||
`VARIABLE_NAME` varchar(128) NOT NULL DEFAULT '',
|
||||
`VARIABLE_VALUE` varchar(1024) DEFAULT NULL
|
||||
) DEFAULT CHARSET = utf8mb4 COMPRESSION = 'none' REPLICA_NUM = NUM BLOCK_SIZE = SIZE USE_BLOOM_FILTER = FALSE TABLET_SIZE = SIZE PCTFREE = 10 TABLEGROUP = 'oceanbase'
|
||||
desc global_status;
|
||||
Field Type Null Key Default Extra
|
||||
VARIABLE_NAME varchar(128) NO
|
||||
VARIABLE_VALUE varchar(1024) YES NULL
|
||||
@ -0,0 +1,21 @@
|
||||
use information_schema;
|
||||
select variable_value from global_variables where variable_name = 'auto_increment_increment';
|
||||
variable_value
|
||||
1
|
||||
set @@session.auto_increment_increment = 10;
|
||||
select variable_value from global_variables where variable_name = 'auto_increment_increment';
|
||||
variable_value
|
||||
1
|
||||
set @@session.auto_increment_increment = 5;
|
||||
select variable_value from session_variables where variable_name = 'auto_increment_increment';
|
||||
variable_value
|
||||
5
|
||||
set @@global.auto_increment_increment = 1;
|
||||
set @@session.auto_increment_increment = 1;
|
||||
show create view global_variables;
|
||||
View Create View character_set_client collation_connection
|
||||
GLOBAL_VARIABLES CREATE VIEW `GLOBAL_VARIABLES` AS SELECT `variable_name` as VARIABLE_NAME, `value` as VARIABLE_VALUE FROM oceanbase.__tenant_virtual_global_variable utf8mb4 utf8mb4_general_ci
|
||||
desc global_variables;
|
||||
Field Type Null Key Default Extra
|
||||
VARIABLE_NAME varchar(128) NO
|
||||
VARIABLE_VALUE varchar(65536) YES NULL
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@
|
||||
drop table if exists pt1;
|
||||
create table pt1 (c1 int primary key, c2 int) partition by key(c1) partitions 3;
|
||||
select * from information_schema.partitions where table_name = 'pt1';
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
|
||||
def test pt1 p0 NULL 0 0 KEY NULL c1 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL default
|
||||
def test pt1 p1 NULL 1 0 KEY NULL c1 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL default
|
||||
def test pt1 p2 NULL 2 0 KEY NULL c1 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL default
|
||||
select table_schema, table_name from information_schema.partitions where table_name = 'pt1';
|
||||
table_schema table_name
|
||||
test pt1
|
||||
test pt1
|
||||
test pt1
|
||||
desc information_schema.partitions;
|
||||
Field Type Null Key Default Extra
|
||||
TABLE_CATALOG varchar(4096) NO
|
||||
TABLE_SCHEMA varchar(128) NO
|
||||
TABLE_NAME varchar(256) NO
|
||||
PARTITION_NAME varchar(64) YES NULL
|
||||
SUBPARTITION_NAME varchar(64) YES NULL
|
||||
PARTITION_ORDINAL_POSITION bigint(20) unsigned YES NULL
|
||||
SUBPARTITION_ORDINAL_POSITION bigint(20) unsigned YES NULL
|
||||
PARTITION_METHOD varchar(18) YES NULL
|
||||
SUBPARTITION_METHOD varchar(18) YES NULL
|
||||
PARTITION_EXPRESSION varchar(4096) YES NULL
|
||||
SUBPARTITION_EXPRESSION varchar(4096) YES NULL
|
||||
PARTITION_DESCRIPTION varchar(1024) YES NULL
|
||||
TABLE_ROWS bigint(20) unsigned NO 0
|
||||
AVG_ROW_LENGTH bigint(20) unsigned NO 0
|
||||
DATA_LENGTH bigint(20) unsigned NO 0
|
||||
MAX_DATA_LENGTH bigint(20) unsigned YES NULL
|
||||
INDEX_LENGTH bigint(20) unsigned NO 0
|
||||
DATA_FREE bigint(20) unsigned NO 0
|
||||
CREATE_TIME timestamp(6) YES NULL
|
||||
UPDATE_TIME timestamp(6) YES NULL
|
||||
CHECK_TIME timestamp(6) YES NULL
|
||||
CHECKSUM bigint(20) YES NULL
|
||||
PARTITION_COMMENT varchar(1024) NO
|
||||
NODEGROUP varchar(12) NO
|
||||
TABLESPACE_NAME varchar(128) YES NULL
|
||||
drop table pt1;
|
||||
@ -0,0 +1,15 @@
|
||||
use information_schema;
|
||||
select * from schemata limit 0;
|
||||
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH DEFAULT_ENCRYPTION
|
||||
select schema_name from schemata;
|
||||
show create view schemata;
|
||||
View Create View character_set_client collation_connection
|
||||
SCHEMATA CREATE VIEW `SCHEMATA` AS SELECT 'def' AS CATALOG_NAME, DATABASE_NAME AS SCHEMA_NAME, 'utf8mb4' AS DEFAULT_CHARACTER_SET_NAME, 'utf8mb4_general_ci' AS DEFAULT_COLLATION_NAME, NULL AS SQL_PATH, 'NO' as DEFAULT_ENCRYPTION FROM oceanbase.__all_virtual_database a WHERE a.tenant_id = effective_tenant_id() and in_recyclebin = 0 and database_name != '__recyclebin' utf8mb4 utf8mb4_general_ci
|
||||
desc schemata;
|
||||
Field Type Null Key Default Extra
|
||||
CATALOG_NAME varchar(3) NO
|
||||
SCHEMA_NAME varchar(128) NO
|
||||
DEFAULT_CHARACTER_SET_NAME varchar(7) NO
|
||||
DEFAULT_COLLATION_NAME varchar(18) NO
|
||||
SQL_PATH null NO
|
||||
DEFAULT_ENCRYPTION varchar(2) NO
|
||||
@ -0,0 +1,14 @@
|
||||
use information_schema;
|
||||
select count(*) from global_status;
|
||||
count(*)
|
||||
2
|
||||
show create table global_status;
|
||||
Table Create Table
|
||||
GLOBAL_STATUS CREATE TABLE `GLOBAL_STATUS` (
|
||||
`VARIABLE_NAME` varchar(128) NOT NULL DEFAULT '',
|
||||
`VARIABLE_VALUE` varchar(1024) DEFAULT NULL
|
||||
) DEFAULT CHARSET = utf8mb4 COMPRESSION = 'none' REPLICA_NUM = NUM BLOCK_SIZE = SIZE USE_BLOOM_FILTER = FALSE TABLET_SIZE = SIZE PCTFREE = 10 TABLEGROUP = 'oceanbase'
|
||||
desc global_status;
|
||||
Field Type Null Key Default Extra
|
||||
VARIABLE_NAME varchar(128) NO
|
||||
VARIABLE_VALUE varchar(1024) YES NULL
|
||||
@ -0,0 +1,24 @@
|
||||
use information_schema;
|
||||
select variable_value from session_variables where variable_name = 'auto_increment_increment';
|
||||
variable_value
|
||||
1
|
||||
set @@session.auto_increment_increment = 10;
|
||||
select variable_value from session_variables where variable_name = 'auto_increment_increment';
|
||||
variable_value
|
||||
10
|
||||
set @@global.auto_increment_increment = 5;
|
||||
select variable_value from session_variables where variable_name = 'auto_increment_increment';
|
||||
variable_value
|
||||
10
|
||||
set @@global.auto_increment_increment = 1;
|
||||
set @@session.auto_increment_increment = 1;
|
||||
show create table session_variables;
|
||||
Table Create Table
|
||||
SESSION_VARIABLES CREATE TABLE `SESSION_VARIABLES` (
|
||||
`VARIABLE_NAME` varchar(128) NOT NULL DEFAULT '',
|
||||
`VARIABLE_VALUE` varchar(1024) DEFAULT NULL
|
||||
) DEFAULT CHARSET = utf8mb4 COMPRESSION = 'none' REPLICA_NUM = NUM BLOCK_SIZE = SIZE USE_BLOOM_FILTER = FALSE TABLET_SIZE = SIZE PCTFREE = 10 TABLEGROUP = 'oceanbase'
|
||||
desc session_variables;
|
||||
Field Type Null Key Default Extra
|
||||
VARIABLE_NAME varchar(128) NO
|
||||
VARIABLE_VALUE varchar(1024) YES NULL
|
||||
@ -0,0 +1,19 @@
|
||||
result_format: 4
|
||||
drop database if exists xiaofeng_db;
|
||||
create database xiaofeng_db;
|
||||
use xiaofeng_db;
|
||||
create table t1(c1 int primary key);
|
||||
create table t2(c1 int unique, c2 int, c3 varchar(10), c4 varchar(10), constraint test_for_table_constraints_check_name check(c3 = substr(c4, 1, 1)),
|
||||
constraint test_for_table_constraints_fk_name_1 foreign key (c1) references t1(c1),
|
||||
constraint test_for_table_constraints_fk_name_2 foreign key (c2) references t2(c1));
|
||||
select * from information_schema.table_constraints where CONSTRAINT_SCHEMA = 'xiaofeng_db';
|
||||
+--------------------+-------------------+---------------------------------------+--------------+------------+-----------------+
|
||||
| CONSTRAINT_CATALOG | CONSTRAINT_SCHEMA | CONSTRAINT_NAME | TABLE_SCHEMA | TABLE_NAME | CONSTRAINT_TYPE |
|
||||
+--------------------+-------------------+---------------------------------------+--------------+------------+-----------------+
|
||||
| def | xiaofeng_db | PRIMARY | xiaofeng_db | t1 | PRIMARY KEY |
|
||||
| def | xiaofeng_db | c1 | xiaofeng_db | t2 | UNIQUE |
|
||||
| def | xiaofeng_db | test_for_table_constraints_check_name | xiaofeng_db | t2 | CHECK |
|
||||
| def | xiaofeng_db | test_for_table_constraints_fk_name_2 | xiaofeng_db | t2 | FOREIGN KEY |
|
||||
| def | xiaofeng_db | test_for_table_constraints_fk_name_1 | xiaofeng_db | t2 | FOREIGN KEY |
|
||||
+--------------------+-------------------+---------------------------------------+--------------+------------+-----------------+
|
||||
drop database xiaofeng_db;
|
||||
@ -0,0 +1,33 @@
|
||||
create user tmp_user_test_user_priv identified by '123';
|
||||
create database test_user_priv_db;
|
||||
use test_user_priv_db;
|
||||
create table zhan_t1 (a int primary key, b int);
|
||||
show create table information_schema.table_privileges;
|
||||
Table Create Table
|
||||
TABLE_PRIVILEGES CREATE TABLE `TABLE_PRIVILEGES` (
|
||||
`GRANTEE` varchar(81) NOT NULL DEFAULT '',
|
||||
`TABLE_CATALOG` varchar(4096) NOT NULL DEFAULT '',
|
||||
`TABLE_SCHEMA` varchar(128) NOT NULL DEFAULT '',
|
||||
`TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
|
||||
`PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '',
|
||||
`IS_GRANTABLE` varchar(3) NOT NULL DEFAULT ''
|
||||
) DEFAULT CHARSET = utf8mb4 COMPRESSION = 'none' REPLICA_NUM = NUM BLOCK_SIZE = SIZE USE_BLOOM_FILTER = FALSE TABLET_SIZE = SIZE PCTFREE = 10 TABLEGROUP = 'oceanbase'
|
||||
desc information_schema.table_privileges;
|
||||
Field Type Null Key Default Extra
|
||||
GRANTEE varchar(81) NO
|
||||
TABLE_CATALOG varchar(4096) NO
|
||||
TABLE_SCHEMA varchar(128) NO
|
||||
TABLE_NAME varchar(64) NO
|
||||
PRIVILEGE_TYPE varchar(64) NO
|
||||
IS_GRANTABLE varchar(3) NO
|
||||
select * from information_schema.table_privileges where table_name = 'zhan_t1';
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
grant select on test_user_priv_db.zhan_t1 to tmp_user_test_user_priv;
|
||||
select * from information_schema.table_privileges where table_name = 'zhan_t1';
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'tmp_user_test_user_priv'@'%' def test_user_priv_db zhan_t1 SELECT NO
|
||||
revoke select on test_user_priv_db.zhan_t1 from tmp_user_test_user_priv;
|
||||
select * from information_schema.table_privileges where table_name = 'zhan_t1';
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
drop database test_user_priv_db;
|
||||
drop user tmp_user_test_user_priv;
|
||||
@ -0,0 +1,28 @@
|
||||
use oceanbase;
|
||||
desc __tenant_virtual_event_name;
|
||||
Field Type Null Key Default Extra
|
||||
tenant_id bigint(20) NO NULL
|
||||
event_id bigint(20) NO NULL
|
||||
event# bigint(20) NO NULL
|
||||
name varchar(64) NO NULL
|
||||
display_name varchar(64) NO NULL
|
||||
parameter1 varchar(64) NO NULL
|
||||
parameter2 varchar(64) NO NULL
|
||||
parameter3 varchar(64) NO NULL
|
||||
wait_class_id bigint(20) NO NULL
|
||||
wait_class# bigint(20) NO NULL
|
||||
wait_class varchar(64) NO NULL
|
||||
desc v$event_name;
|
||||
Field Type Null Key Default Extra
|
||||
CON_ID bigint(20) NO NULL
|
||||
EVENT_ID bigint(20) NO NULL
|
||||
EVENT# bigint(20) NO NULL
|
||||
NAME varchar(64) NO NULL
|
||||
DISPLAY_NAME varchar(64) NO NULL
|
||||
PARAMETER1 varchar(64) NO NULL
|
||||
PARAMETER2 varchar(64) NO NULL
|
||||
PARAMETER3 varchar(64) NO NULL
|
||||
WAIT_CLASS_ID bigint(20) NO NULL
|
||||
WAIT_CLASS# bigint(20) NO NULL
|
||||
WAIT_CLASS varchar(64) NO NULL
|
||||
succeed
|
||||
@ -0,0 +1,8 @@
|
||||
desc oceanbase.__tenant_virtual_partition_stat;
|
||||
Field Type Null Key Default Extra
|
||||
table_id bigint(20) NO NULL
|
||||
partition_id bigint(20) NO NULL
|
||||
partition_cnt bigint(20) NO NULL
|
||||
row_count bigint(20) NO NULL
|
||||
diff_percentage bigint(20) NO NULL
|
||||
pass
|
||||
@ -0,0 +1,18 @@
|
||||
use oceanbase;
|
||||
desc __tenant_virtual_statname;
|
||||
Field Type Null Key Default Extra
|
||||
tenant_id bigint(20) NO NULL
|
||||
stat_id bigint(20) NO NULL
|
||||
statistic# bigint(20) NO NULL
|
||||
name varchar(64) NO NULL
|
||||
display_name varchar(64) NO NULL
|
||||
class bigint(20) NO NULL
|
||||
desc v$statname;
|
||||
Field Type Null Key Default Extra
|
||||
CON_ID bigint(20) NO NULL
|
||||
STAT_ID bigint(20) NO NULL
|
||||
STATISTIC# bigint(20) NO NULL
|
||||
NAME varchar(64) NO NULL
|
||||
DISPLAY_NAME varchar(64) NO NULL
|
||||
CLASS bigint(20) NO NULL
|
||||
succeed
|
||||
@ -0,0 +1,85 @@
|
||||
show create table information_schema.user_privileges;
|
||||
Table Create Table
|
||||
USER_PRIVILEGES CREATE TABLE `USER_PRIVILEGES` (
|
||||
`GRANTEE` varchar(81) NOT NULL DEFAULT '',
|
||||
`TABLE_CATALOG` varchar(4096) NOT NULL DEFAULT '',
|
||||
`PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '',
|
||||
`IS_GRANTABLE` varchar(3) NOT NULL DEFAULT ''
|
||||
) DEFAULT CHARSET = utf8mb4 COMPRESSION = 'none' REPLICA_NUM = NUM BLOCK_SIZE = SIZE USE_BLOOM_FILTER = FALSE TABLET_SIZE = SIZE PCTFREE = 10 TABLEGROUP = 'oceanbase'
|
||||
desc information_schema.user_privileges;
|
||||
Field Type Null Key Default Extra
|
||||
GRANTEE varchar(81) NO
|
||||
TABLE_CATALOG varchar(4096) NO
|
||||
PRIVILEGE_TYPE varchar(64) NO
|
||||
IS_GRANTABLE varchar(3) NO
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
create user tmp_user_user_privileges identified by '123';
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'tmp_user_user_privileges'@'%' def USAGE NO
|
||||
grant select on *.* to tmp_user_user_privileges;
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'tmp_user_user_privileges'@'%' def SELECT NO
|
||||
revoke select on *.* from tmp_user_user_privileges;
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'tmp_user_user_privileges'@'%' def USAGE NO
|
||||
grant select on *.* to tmp_user_user_privileges with grant option;
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'tmp_user_user_privileges'@'%' def SELECT YES
|
||||
revoke grant option on *.* from tmp_user_user_privileges;
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'tmp_user_user_privileges'@'%' def SELECT NO
|
||||
revoke all on *.* from tmp_user_user_privileges;
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'tmp_user_user_privileges'@'%' def USAGE NO
|
||||
drop user tmp_user_user_privileges;
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
select * from information_schema.user_privileges where grantee like '%root%' or grantee like '%admin%';
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'root'@'%' def ALTER YES
|
||||
'root'@'%' def CREATE YES
|
||||
'root'@'%' def CREATE USER YES
|
||||
'root'@'%' def DELETE YES
|
||||
'root'@'%' def DROP YES
|
||||
'root'@'%' def INSERT YES
|
||||
'root'@'%' def UPDATE YES
|
||||
'root'@'%' def SELECT YES
|
||||
'root'@'%' def INDEX YES
|
||||
'root'@'%' def CREATE VIEW YES
|
||||
'root'@'%' def SHOW VIEW YES
|
||||
'root'@'%' def SHOW DB YES
|
||||
'root'@'%' def SUPER YES
|
||||
'root'@'%' def PROCESS YES
|
||||
'root'@'%' def CREATE SYNONYM YES
|
||||
'root'@'%' def FILE YES
|
||||
'root'@'%' def ALTER TENANT YES
|
||||
'root'@'%' def ALTER SYSTEM YES
|
||||
'root'@'%' def CREATE RESOURCE POOL YES
|
||||
'root'@'%' def CREATE RESOURCE UNIT YES
|
||||
'admin'@'%' def ALTER YES
|
||||
'admin'@'%' def CREATE YES
|
||||
'admin'@'%' def CREATE USER YES
|
||||
'admin'@'%' def DELETE YES
|
||||
'admin'@'%' def DROP YES
|
||||
'admin'@'%' def INSERT YES
|
||||
'admin'@'%' def UPDATE YES
|
||||
'admin'@'%' def SELECT YES
|
||||
'admin'@'%' def INDEX YES
|
||||
'admin'@'%' def CREATE VIEW YES
|
||||
'admin'@'%' def SHOW VIEW YES
|
||||
'admin'@'%' def SHOW DB YES
|
||||
'admin'@'%' def SUPER YES
|
||||
'admin'@'%' def PROCESS YES
|
||||
'admin'@'%' def CREATE SYNONYM YES
|
||||
'admin'@'%' def FILE YES
|
||||
'admin'@'%' def ALTER TENANT YES
|
||||
'admin'@'%' def ALTER SYSTEM YES
|
||||
'admin'@'%' def CREATE RESOURCE POOL YES
|
||||
'admin'@'%' def CREATE RESOURCE UNIT YES
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,19 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test oceanbase.__all_virtual_data_type
|
||||
|
||||
use oceanbase;
|
||||
|
||||
#basic
|
||||
select * from __all_virtual_data_type order by data_type;
|
||||
select data_type, data_type_str, data_type_class from __all_virtual_data_type order by data_type;
|
||||
select * from __all_virtual_data_type where data_type = 22;
|
||||
select a.data_type_str, b.data_type_class_str from __all_virtual_data_type a inner join __all_virtual_data_type_class b on a.data_type_class = b.data_type_class order by a.data_type;
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table __all_virtual_data_type;
|
||||
desc __all_virtual_data_type;
|
||||
@ -0,0 +1,19 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test oceanbase.__all_virtual_data_type_class
|
||||
|
||||
use oceanbase;
|
||||
|
||||
#basic
|
||||
select * from __all_virtual_data_type_class;
|
||||
select data_type_class, data_type_class_str from __all_virtual_data_type_class;
|
||||
select * from __all_virtual_data_type_class where data_type_class = 10;
|
||||
select a.data_type_str, b.data_type_class_str from __all_virtual_data_type a inner join __all_virtual_data_type_class b on a.data_type_class = b.data_type_class order by a.data_type;
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table __all_virtual_data_type_class;
|
||||
desc __all_virtual_data_type_class;
|
||||
@ -0,0 +1,17 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test oceanbase.__all_virtual_engine
|
||||
|
||||
use oceanbase;
|
||||
|
||||
#basic
|
||||
select * from __all_virtual_engine;
|
||||
select Engine, Support, Comment, Transactions, XA, Savepoints from __all_virtual_engine;
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table __all_virtual_engine;
|
||||
desc __all_virtual_engine;
|
||||
@ -0,0 +1,22 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
# owner: yuchen.wyc
|
||||
# owner group: SQL1
|
||||
# description: 虚拟表__tenant_virtual_interm_result的简单测试
|
||||
|
||||
select * from oceanbase.__tenant_virtual_interm_result where svr_ip = '0.0.0.0' and svr_port = 0;
|
||||
--disable_result_log
|
||||
select * from oceanbase.__tenant_virtual_interm_result;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where svr_port > 0;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where scanner_count > 0;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where expire_time > 0;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where used_memory_size > 0;
|
||||
select * from oceanbase.__tenant_virtual_interm_result where is_serving_tenant(svr_ip, svr_port, 1);
|
||||
select * from oceanbase.__tenant_virtual_interm_result where is_serving_tenant(svr_ip, svr_port, 1001);
|
||||
select is_serving_tenant(svr_ip, svr_port, 1), is_serving_tenant(svr_ip, svr_port, 1001) from oceanbase.__tenant_virtual_interm_result where is_serving_tenant(svr_ip, svr_port, 1);
|
||||
--sorted_result
|
||||
select svr_ip, svr_port from oceanbase.__tenant_virtual_interm_result group by svr_ip, svr_port having is_serving_tenant(svr_ip, svr_port, 1);
|
||||
select t1.svr_ip, t1.svr_port, t2.svr_ip, t2.svr_port from oceanbase.__tenant_virtual_interm_result t1 join oceanbase.__tenant_virtual_interm_result t2 on is_serving_tenant(t1.svr_ip, t2.svr_port, 1);
|
||||
--enable_result_log
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : shanyan.g
|
||||
#owner group : transaction
|
||||
#description : 测试虚拟表__all_virtual_pg_partition_info
|
||||
|
||||
--disable_abort_on_error
|
||||
--disable_warnings
|
||||
|
||||
connect (conn_admin,$OBMYSQL_MS0,admin@sys,admin,*NO-ONE*,$OBMYSQL_PORT);
|
||||
|
||||
## case:检查表结构
|
||||
desc oceanbase.__all_virtual_pg_partition_info;
|
||||
|
||||
#测试PG内的表
|
||||
use test;
|
||||
create tablegroup tg1 binding true;
|
||||
create table test1 (id1 int, id2 int) tablegroup tg1;
|
||||
create table test2 (id1 int, id2 int) tablegroup tg1;
|
||||
|
||||
#创建非PG的表
|
||||
create table test3 (id1 int, id2 int);
|
||||
create table test4 (id1 int, id2 int);
|
||||
sleep 5;
|
||||
|
||||
#预期记录有1条
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where table_id in (select table_id from oceanbase.__all_virtual_table where table_name = 'test1') and partition_state = 'L_WORKING';
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where table_id in (select table_id from oceanbase.__all_virtual_table where table_name = 'test2') and partition_state = 'L_WORKING';
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where table_id in (select table_id from oceanbase.__all_virtual_table where table_name = 'test3') and partition_state = 'L_WORKING';
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where table_id in (select table_id from oceanbase.__all_virtual_table where table_name = 'test4') and partition_state = 'L_WORKING';
|
||||
|
||||
#预期记录有2条
|
||||
select count(1) from oceanbase.__all_virtual_pg_partition_info
|
||||
where tg_id in (select tablegroup_id as tg_id from oceanbase.__all_virtual_tablegroup where tablegroup_name = 'tg1') and partition_state = 'L_WORKING';
|
||||
|
||||
#根据all_virtual_partition_info来查询pg下的count数量,预期为2
|
||||
select pg_partition_count from oceanbase.__all_virtual_partition_info
|
||||
where table_id in (select tablegroup_id as table_id from oceanbase.__all_virtual_tablegroup where tablegroup_name = 'tg1') and partition_state = 'L_WORKING';
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists test1;
|
||||
drop table if exists test2;
|
||||
drop table if exists test3;
|
||||
drop table if exists test4;
|
||||
purge recyclebin;
|
||||
drop tablegroup tg1;
|
||||
--enable_warnings
|
||||
--enable_abort_on_error
|
||||
--enable_warnings
|
||||
@ -0,0 +1,23 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
# owner: guoping.wgp
|
||||
# owner group: SQL1
|
||||
# description: 测试虚拟表__all_virtual_sys_parameter_stat
|
||||
#tags : parameter
|
||||
|
||||
connect (my_obsys,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection my_obsys;
|
||||
|
||||
select tenant_id, table_name from oceanbase.__all_virtual_table where table_name = '__all_virtual_sys_parameter_stat';
|
||||
use oceanbase;
|
||||
desc __all_virtual_sys_parameter_stat;
|
||||
select name from __all_virtual_sys_parameter_stat where name not like "module_test_%" group by name order by name;
|
||||
--sorted_result
|
||||
select section,info from oceanbase.__all_virtual_sys_parameter_stat where name like '%major%' group by name;
|
||||
|
||||
--disable_result_log
|
||||
show parameters;
|
||||
show parameters like '%log%';
|
||||
--enable_result_log
|
||||
disconnect my_obsys;
|
||||
@ -0,0 +1,19 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : zhenjiang.xzj
|
||||
#owner group : STORAGE
|
||||
#description : 测试虚拟表__all_virtual_upgrade_inspection
|
||||
|
||||
--disable_abort_on_error
|
||||
--disable_warnings
|
||||
#检查表结构
|
||||
#login into the sys tenant
|
||||
connect (conn_admin,$OBMYSQL_MS0,admin@sys,admin,*NO-ONE*,$OBMYSQL_PORT);
|
||||
|
||||
desc oceanbase.__all_virtual_upgrade_inspection;
|
||||
|
||||
--disable_result_log
|
||||
|
||||
--enable_result_log
|
||||
select * from oceanbase.__all_virtual_upgrade_inspection;
|
||||
@ -0,0 +1,19 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test information_schema.character_sets
|
||||
|
||||
use information_schema;
|
||||
|
||||
#basic
|
||||
select * from character_sets;
|
||||
select character_set_name, default_collate_name, description, maxlen from character_sets;
|
||||
select maxlen from character_sets;
|
||||
select * from character_sets where character_set_name like '%binary%';
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table character_sets;
|
||||
desc character_sets;
|
||||
@ -0,0 +1,18 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : xiaofeng.lby
|
||||
#owner group : sql2
|
||||
#desription : test collation_character_set_applicability
|
||||
|
||||
use information_schema;
|
||||
|
||||
select * from collation_character_set_applicability;
|
||||
select COLLATION_NAME, CHARACTER_SET_NAME from collation_character_set_applicability;
|
||||
select COLLATION_NAME from collation_character_set_applicability;
|
||||
select CHARACTER_SET_NAME from collation_character_set_applicability;
|
||||
select * from collation_character_set_applicability where COLLATION_NAME = 'utf8mb4_bin';
|
||||
|
||||
desc collation_character_set_applicability;
|
||||
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test information_schema.collations
|
||||
|
||||
use information_schema;
|
||||
|
||||
#basic
|
||||
select * from collations;
|
||||
select collation_name, character_set_name, id, is_default, is_compiled, sortlen from collations;
|
||||
select * from collations where collation_name like '%utf8%';
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table collations;
|
||||
desc collations;
|
||||
@ -0,0 +1,16 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test information_schema.global_status
|
||||
|
||||
use information_schema;
|
||||
|
||||
#basic
|
||||
select count(*) from global_status;
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table global_status;
|
||||
desc global_status;
|
||||
@ -0,0 +1,24 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test information_schema.global_variables
|
||||
|
||||
use information_schema;
|
||||
|
||||
#basic
|
||||
let $old_global_increment = query_get_value(select variable_value from global_variables where variable_name = 'auto_increment_increment', variable_value, 1);
|
||||
let $old_session_increment = query_get_value(select variable_value from session_variables where variable_name = 'auto_increment_increment', variable_value, 1);
|
||||
select variable_value from global_variables where variable_name = 'auto_increment_increment';
|
||||
set @@session.auto_increment_increment = 10;
|
||||
select variable_value from global_variables where variable_name = 'auto_increment_increment';
|
||||
set @@session.auto_increment_increment = 5;
|
||||
select variable_value from session_variables where variable_name = 'auto_increment_increment';
|
||||
eval set @@global.auto_increment_increment = $old_global_increment;
|
||||
eval set @@session.auto_increment_increment = $old_session_increment;
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create view global_variables;
|
||||
desc global_variables;
|
||||
@ -0,0 +1,757 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner: yanmu.ztl
|
||||
#owner group: SQL2
|
||||
# tags: optimizer
|
||||
#description: 该case是为了验证内部表是否符合规范
|
||||
## 规范: 1.基础系统表保持OB既有风格,以’__all_’开头,统一用单数、主动、第一人称一般时(不搞ing、ed、s等)
|
||||
## 2.虚拟表保持OB既有风格,以’__all_virtual’或者’__tenant_virtual’开头,统一用单数、主动、第一人称一般时(不搞ing、ed、s等)。__all_virtual为展示系统内部信息的虚拟表,支持直接查询,可基于此建立兼容其他数据库的视图;__tenant_virtual虚拟表为支持特定操作(如show)而创建的,一般不支持直接查询。
|
||||
## 3.基础系统表和虚拟表属OB系统内部实现,其定义要考虑版本平滑升级和扩展性的需要,不建议DBA及普通用户直接使用这两类对象。后续会增加对该类对象可见性的控制,在通常的show table等外部命令的一般性输出中不显示内部对象。
|
||||
## 4.明确_all_table对象的类型,区分基础系统表、用户表、虚拟表、系统视图、用户视图,同时确认各种对象table_id的范围符合设计。
|
||||
## 5.提供给DBA普通用户的信息,通过定义相应的视图来实现。视图的命名规则及模式按照需要兼容的目标数据库的相应视图来确定,保持定义的稳定。除MySQL兼容的视图外,系统诊断信息相关的视图,命名统一采用类Oracle的方式。
|
||||
## 6.虚拟表的名称和字段进行局部调整,如对于需要展示集群所有节点信息的虚拟表,统一使用server的唯一标识(`svr_ip`, `svr_port`)为分区键,部分特定的字段名称也加以统一(当前某些地方用host/port,有些用svr_ip/svr_port);如果虚拟表包含`tenant_id`, `svr_ip`, `svr_port`字段,则主键包含这些字段。
|
||||
##
|
||||
|
||||
##over all test
|
||||
connect (obsys1,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection obsys1;
|
||||
use oceanbase;
|
||||
|
||||
set @@ob_query_timeout = 10000000000;
|
||||
set @@ob_log_level = 'WARN';
|
||||
|
||||
##overall check
|
||||
select 0xffffffffff & table_id, table_name, table_type, database_id, part_num from oceanbase.__all_virtual_table where table_type in (0,1,2) order by 1,2;
|
||||
|
||||
##check count and table_id range (0, 10000] for inner sys table
|
||||
let $sys_table_count = query_get_value(select count(table_id) from __all_virtual_table where table_type=0, count(table_id), 1);
|
||||
let $sys_table_count_with_tid = query_get_value(select count(table_id) from __all_virtual_table where table_type=0 and (0xffffffffff & table_id) <= 10000, count(table_id), 1);
|
||||
if ($sys_table_count == $sys_table_count_with_tid)
|
||||
{
|
||||
--echo check sys table count and table_id range success
|
||||
}
|
||||
|
||||
##check count and table_id range (10000, 20000] for inner virtual table
|
||||
let $virtual_table_count = query_get_value(select count(table_id) from __all_virtual_table where table_type=2, count(table_id), 1);
|
||||
let $virtual_table_count_with_tid = query_get_value(select count(table_id) from __all_virtual_table where table_type=2 and (0xffffffffff & table_id) > 10000 and (0xffffffffff & table_id) <= 20000, count(table_id), 1);
|
||||
if ($virtual_table_count == $virtual_table_count_with_tid)
|
||||
{
|
||||
--echo check count and table_id range for virtual table success
|
||||
}
|
||||
|
||||
##check count and table_id range (10000, 20000] for inner view
|
||||
let $view_count = query_get_value(select count(table_id) from __all_virtual_table where table_type=1, count(table_id), 1);
|
||||
let $view_count_with_tid = query_get_value(select count(table_id) from __all_virtual_table where table_type=1 and (0xffffffffff & table_id) > 20000 and (0xffffffffff & table_id) <= 30000, count(table_id), 1);
|
||||
if ($view_table_count == $view_count_with_tid)
|
||||
{
|
||||
--echo check count and table_id range for view success
|
||||
}
|
||||
|
||||
##
|
||||
## Check all sys tables created before 2018-11-15, new table added after this date should
|
||||
## add it's own case, can not depends on this hot point any more.
|
||||
##
|
||||
## table list are selected by: select concat(a, ".", b) from (select d.database_name a, t.table_name b from __all_virtual_database d, __all_virtual_table t where t.database_id = d.database_id and t.table_type in (0, 1, 2) and t.table_name not in ('__tenant_virtual_all_table','__tenant_virtual_current_tenant','__tenant_virtual_show_create_table','__tenant_virtual_show_create_database','__tenant_virtual_table_column','__all_virtual_proxy_schema', '__all_virtual_proxy_partition_info', '__all_virtual_proxy_partition', '__all_virtual_proxy_sub_partition', '__all_virtual_proxy_route','__tenant_virtual_show_create_procedure', '__all_virtual_partition_location', '__tenant_virtual_show_tables', '__tenant_virtual_show_create_tablegroup') order by 1,2) x;
|
||||
#
|
||||
|
||||
desc information_schema.CHARACTER_SETS;
|
||||
desc information_schema.COLLATIONS;
|
||||
desc information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
|
||||
desc information_schema.COLUMNS;
|
||||
desc information_schema.DBA_OUTLINES;
|
||||
desc information_schema.ENGINES;
|
||||
desc information_schema.GLOBAL_STATUS;
|
||||
desc information_schema.GLOBAL_VARIABLES;
|
||||
desc information_schema.KEY_COLUMN_USAGE;
|
||||
desc information_schema.PARAMETERS;
|
||||
desc information_schema.PARTITIONS;
|
||||
desc information_schema.PROCESSLIST;
|
||||
desc information_schema.ROUTINES;
|
||||
desc information_schema.SCHEMATA;
|
||||
desc information_schema.SCHEMA_PRIVILEGES;
|
||||
desc information_schema.SESSION_STATUS;
|
||||
desc information_schema.SESSION_VARIABLES;
|
||||
desc information_schema.STATISTICS;
|
||||
desc information_schema.TABLES;
|
||||
desc information_schema.TABLE_CONSTRAINTS;
|
||||
desc information_schema.TABLE_PRIVILEGES;
|
||||
desc information_schema.USER_PRIVILEGES;
|
||||
desc information_schema.USER_RECYCLEBIN;
|
||||
desc information_schema.VIEWS;
|
||||
desc information_schema.TRIGGERS;
|
||||
desc mysql.db;
|
||||
desc mysql.proc;
|
||||
desc mysql.time_zone;
|
||||
desc mysql.time_zone_name;
|
||||
desc mysql.time_zone_transition;
|
||||
desc mysql.time_zone_transition_type;
|
||||
desc mysql.user;
|
||||
desc oceanbase.gv$concurrent_limit_sql;
|
||||
desc oceanbase.gv$database;
|
||||
desc oceanbase.gv$latch;
|
||||
desc oceanbase.gv$lock_wait_stat;
|
||||
desc oceanbase.gv$memory;
|
||||
desc oceanbase.gv$memstore;
|
||||
desc oceanbase.gv$memstore_info;
|
||||
desc oceanbase.gv$obrpc_incoming;
|
||||
desc oceanbase.gv$obrpc_outgoing;
|
||||
desc oceanbase.gv$outline;
|
||||
desc oceanbase.gv$partition;
|
||||
desc oceanbase.gv$plan_cache_plan_explain;
|
||||
desc oceanbase.gv$plan_cache_plan_stat;
|
||||
desc oceanbase.gv$plan_cache_stat;
|
||||
desc oceanbase.gv$server_memstore;
|
||||
desc oceanbase.gv$session_event;
|
||||
desc oceanbase.gv$session_longops;
|
||||
desc oceanbase.gv$session_wait;
|
||||
desc oceanbase.gv$session_wait_history;
|
||||
desc oceanbase.gv$sql;
|
||||
desc oceanbase.gv$sql_audit;
|
||||
desc oceanbase.gv$sql_monitor;
|
||||
desc oceanbase.gv$sql_plan_monitor;
|
||||
desc oceanbase.gv$sql_plan_statistics;
|
||||
desc oceanbase.gv$sysstat;
|
||||
desc oceanbase.gv$system_event;
|
||||
desc oceanbase.gv$table;
|
||||
desc oceanbase.gv$tenant;
|
||||
desc oceanbase.gv$tenant_memstore_allocator_info;
|
||||
desc oceanbase.gv$tenant_sequence_object;
|
||||
desc oceanbase.gv$unit;
|
||||
desc oceanbase.gv$unit_load_balance_event_history;
|
||||
desc oceanbase.v$event_name;
|
||||
desc oceanbase.v$latch;
|
||||
desc oceanbase.v$lock_wait_stat;
|
||||
desc oceanbase.v$memory;
|
||||
desc oceanbase.v$memstore;
|
||||
desc oceanbase.v$memstore_info;
|
||||
desc oceanbase.v$obrpc_incoming;
|
||||
desc oceanbase.v$obrpc_outgoing;
|
||||
desc oceanbase.v$partition;
|
||||
desc oceanbase.v$plan_cache_plan_explain;
|
||||
desc oceanbase.v$plan_cache_plan_stat;
|
||||
desc oceanbase.v$plan_cache_stat;
|
||||
desc oceanbase.v$session_event;
|
||||
desc oceanbase.v$session_longops;
|
||||
desc oceanbase.v$session_wait;
|
||||
desc oceanbase.v$session_wait_history;
|
||||
desc oceanbase.v$sql;
|
||||
desc oceanbase.v$sql_audit;
|
||||
desc oceanbase.v$sql_monitor;
|
||||
desc oceanbase.v$sql_plan_monitor;
|
||||
desc oceanbase.v$sql_plan_statistics;
|
||||
desc oceanbase.v$statname;
|
||||
desc oceanbase.v$sysstat;
|
||||
desc oceanbase.v$system_event;
|
||||
desc oceanbase.v$tenant_memstore_allocator_info;
|
||||
desc oceanbase.v$unit;
|
||||
desc oceanbase.gv$tenant_px_worker_stat;
|
||||
desc oceanbase.v$tenant_px_worker_stat;
|
||||
desc oceanbase.__all_acquired_snapshot;
|
||||
desc oceanbase.__all_build_index_param;
|
||||
desc oceanbase.__all_charset;
|
||||
desc oceanbase.__all_clog_history_info;
|
||||
desc oceanbase.__all_clog_history_info_v2;
|
||||
desc oceanbase.__all_collation;
|
||||
desc oceanbase.__all_column_history;
|
||||
desc oceanbase.__all_column_stat;
|
||||
desc oceanbase.__all_column_statistic;
|
||||
desc oceanbase.__all_constraint;
|
||||
desc oceanbase.__all_constraint_history;
|
||||
desc oceanbase.__all_database;
|
||||
desc oceanbase.__all_database_history;
|
||||
desc oceanbase.__all_database_privilege;
|
||||
desc oceanbase.__all_database_privilege_history;
|
||||
desc oceanbase.__all_ddl_id;
|
||||
desc oceanbase.__all_def_sub_part;
|
||||
desc oceanbase.__all_def_sub_part_history;
|
||||
desc oceanbase.__all_dummy;
|
||||
desc oceanbase.__all_election_event_history;
|
||||
desc oceanbase.__all_foreign_key;
|
||||
desc oceanbase.__all_foreign_key_column;
|
||||
desc oceanbase.__all_foreign_key_column_history;
|
||||
desc oceanbase.__all_foreign_key_history;
|
||||
desc oceanbase.__all_frozen_map;
|
||||
desc oceanbase.__all_func;
|
||||
desc oceanbase.__all_func_history;
|
||||
desc oceanbase.__all_global_index_data_src;
|
||||
desc oceanbase.__all_histogram_stat;
|
||||
desc oceanbase.__all_immediate_effect_index_sstable;
|
||||
desc oceanbase.__all_index_build_stat;
|
||||
desc oceanbase.__all_index_checksum;
|
||||
desc oceanbase.__all_index_schedule_task;
|
||||
desc oceanbase.__all_index_wait_transaction_status;
|
||||
desc oceanbase.__all_local_index_status;
|
||||
desc oceanbase.__all_meta_table;
|
||||
desc oceanbase.__all_ori_schema_version;
|
||||
desc oceanbase.__all_outline;
|
||||
desc oceanbase.__all_outline_history;
|
||||
desc oceanbase.__all_package;
|
||||
desc oceanbase.__all_package_history;
|
||||
desc oceanbase.__all_part;
|
||||
desc oceanbase.__all_part_history;
|
||||
desc oceanbase.__all_part_info;
|
||||
desc oceanbase.__all_part_info_history;
|
||||
desc oceanbase.__all_privilege;
|
||||
desc oceanbase.__all_recyclebin;
|
||||
desc oceanbase.__all_resource_pool;
|
||||
desc oceanbase.__all_restore_job;
|
||||
desc oceanbase.__all_restore_job_history;
|
||||
desc oceanbase.__all_restore_task;
|
||||
desc oceanbase.__all_rootservice_event_history;
|
||||
desc oceanbase.__all_rootservice_job;
|
||||
desc oceanbase.__all_routine;
|
||||
desc oceanbase.__all_routine_history;
|
||||
desc oceanbase.__all_routine_param;
|
||||
desc oceanbase.__all_routine_param_history;
|
||||
desc oceanbase.__all_sequence;
|
||||
desc oceanbase.__all_sequence_object;
|
||||
desc oceanbase.__all_sequence_object_history;
|
||||
desc oceanbase.__all_sequence_v2;
|
||||
desc oceanbase.__all_sequence_value;
|
||||
desc oceanbase.__all_server;
|
||||
desc oceanbase.__all_server_event_history;
|
||||
desc oceanbase.__all_sql_execute_task;
|
||||
desc oceanbase.__all_sstable_checksum;
|
||||
desc oceanbase.__all_sstable_column_checksum;
|
||||
desc oceanbase.__all_sub_part;
|
||||
desc oceanbase.__all_sub_part_history;
|
||||
desc oceanbase.__all_synonym;
|
||||
desc oceanbase.__all_synonym_history;
|
||||
desc oceanbase.__all_sys_parameter;
|
||||
desc oceanbase.__all_sys_stat;
|
||||
desc oceanbase.__all_sys_variable;
|
||||
desc oceanbase.__all_sys_variable_history;
|
||||
desc oceanbase.__all_tablegroup;
|
||||
desc oceanbase.__all_tablegroup_history;
|
||||
desc oceanbase.__all_table_history;
|
||||
desc oceanbase.__all_table_privilege;
|
||||
desc oceanbase.__all_table_privilege_history;
|
||||
desc oceanbase.__all_table_stat;
|
||||
desc oceanbase.__all_temp_table;
|
||||
desc oceanbase.__all_tenant;
|
||||
desc oceanbase.__all_tenant_gc_partition_info;
|
||||
desc oceanbase.__all_tenant_history;
|
||||
desc oceanbase.__all_tenant_meta_table;
|
||||
desc oceanbase.__all_tenant_resource_usage;
|
||||
desc oceanbase.__all_time_zone;
|
||||
desc oceanbase.__all_time_zone_name;
|
||||
desc oceanbase.__all_time_zone_transition;
|
||||
desc oceanbase.__all_time_zone_transition_type;
|
||||
desc oceanbase.__all_unit;
|
||||
desc oceanbase.__all_unit_config;
|
||||
desc oceanbase.__all_unit_load_history;
|
||||
desc oceanbase.__all_user;
|
||||
desc oceanbase.__all_user_history;
|
||||
desc oceanbase.__all_virtual_bad_block_table;
|
||||
desc oceanbase.__all_virtual_clog_stat;
|
||||
desc oceanbase.__all_virtual_concurrency_object_pool;
|
||||
desc oceanbase.__all_virtual_core_all_table;
|
||||
desc oceanbase.__all_virtual_core_column_table;
|
||||
desc oceanbase.__all_virtual_core_meta_table;
|
||||
desc oceanbase.__all_virtual_core_root_table;
|
||||
desc oceanbase.__all_virtual_data_type;
|
||||
desc oceanbase.__all_virtual_data_type_class;
|
||||
desc oceanbase.__all_virtual_disk_stat;
|
||||
desc oceanbase.__all_virtual_election_group_info;
|
||||
desc oceanbase.__all_virtual_election_info;
|
||||
desc oceanbase.__all_virtual_election_mem_stat;
|
||||
desc oceanbase.__all_virtual_election_priority;
|
||||
desc oceanbase.__all_virtual_engine;
|
||||
desc oceanbase.__all_virtual_freeze_info;
|
||||
desc oceanbase.__all_virtual_io_stat;
|
||||
desc oceanbase.__all_virtual_kvcache_info;
|
||||
desc oceanbase.__all_virtual_latch;
|
||||
desc oceanbase.__all_virtual_leader_stat;
|
||||
desc oceanbase.__all_virtual_lock_wait_stat;
|
||||
desc oceanbase.__all_virtual_long_ops_status;
|
||||
desc oceanbase.__all_virtual_macro_block_marker_status;
|
||||
desc oceanbase.__all_virtual_memory_info;
|
||||
desc oceanbase.__all_virtual_memstore_info;
|
||||
desc oceanbase.__all_virtual_mem_leak_checker_info;
|
||||
desc oceanbase.__all_virtual_meta_table;
|
||||
desc oceanbase.__all_virtual_obrpc_stat;
|
||||
desc oceanbase.__all_virtual_partition_amplification_stat;
|
||||
desc oceanbase.__all_virtual_partition_info;
|
||||
desc oceanbase.__all_virtual_partition_item;
|
||||
desc oceanbase.__all_virtual_partition_migration_status;
|
||||
desc oceanbase.__all_virtual_partition_replay_status;
|
||||
desc oceanbase.__all_virtual_partition_split_info;
|
||||
desc oceanbase.__all_virtual_partition_sstable_image_info;
|
||||
desc oceanbase.__all_virtual_partition_sstable_macro_info;
|
||||
desc oceanbase.__all_virtual_partition_sstable_merge_info;
|
||||
desc oceanbase.__all_virtual_partition_store_info;
|
||||
desc oceanbase.__all_virtual_partition_table;
|
||||
desc oceanbase.__all_virtual_partition_table_store_stat;
|
||||
desc oceanbase.__all_virtual_plan_cache_plan_explain;
|
||||
desc oceanbase.__all_virtual_plan_cache_stat;
|
||||
desc oceanbase.__all_virtual_plan_stat;
|
||||
desc oceanbase.__all_virtual_processlist;
|
||||
desc oceanbase.__all_virtual_proxy_server_stat;
|
||||
desc oceanbase.__all_virtual_proxy_sys_variable;
|
||||
desc oceanbase.__all_virtual_px_worker_stat;
|
||||
desc oceanbase.__all_virtual_rebalance_map_item_stat;
|
||||
desc oceanbase.__all_virtual_rebalance_map_stat;
|
||||
desc oceanbase.__all_virtual_rebalance_replica_stat;
|
||||
desc oceanbase.__all_virtual_rebalance_task_stat;
|
||||
desc oceanbase.__all_virtual_rebalance_tenant_stat;
|
||||
desc oceanbase.__all_virtual_rebalance_unit_distribution_stat;
|
||||
desc oceanbase.__all_virtual_rebalance_unit_migrate_stat;
|
||||
desc oceanbase.__all_virtual_rebalance_unit_stat;
|
||||
desc oceanbase.__all_virtual_replica_task;
|
||||
desc oceanbase.__all_virtual_rootservice_stat;
|
||||
desc oceanbase.__all_virtual_sequence_v2;
|
||||
desc oceanbase.__all_virtual_server_blacklist;
|
||||
desc oceanbase.__all_virtual_server_clog_stat;
|
||||
desc oceanbase.__all_virtual_server_memory_info;
|
||||
desc oceanbase.__all_virtual_server_object_pool;
|
||||
desc oceanbase.__all_virtual_server_stat;
|
||||
desc oceanbase.__all_virtual_session_event;
|
||||
desc oceanbase.__all_virtual_session_wait;
|
||||
desc oceanbase.__all_virtual_session_wait_history;
|
||||
desc oceanbase.__all_virtual_sesstat;
|
||||
desc oceanbase.__all_virtual_sql_audit;
|
||||
desc oceanbase.__all_virtual_sql_monitor;
|
||||
desc oceanbase.__all_virtual_sql_plan_monitor;
|
||||
desc oceanbase.__all_virtual_sql_plan_statistics;
|
||||
desc oceanbase.__all_virtual_storage_stat;
|
||||
desc oceanbase.__all_virtual_sysstat;
|
||||
desc oceanbase.__all_virtual_system_event;
|
||||
desc oceanbase.__all_virtual_sys_parameter_stat;
|
||||
desc oceanbase.__all_virtual_sys_task_status;
|
||||
desc oceanbase.__all_virtual_table_mgr;
|
||||
desc oceanbase.__all_virtual_tenant_disk_stat;
|
||||
desc oceanbase.__all_virtual_tenant_memstore_allocator_info;
|
||||
desc oceanbase.__all_virtual_tenant_memstore_info;
|
||||
desc oceanbase.__all_virtual_tenant_stat;
|
||||
desc oceanbase.__all_virtual_trace_log;
|
||||
desc oceanbase.__all_virtual_trans_audit;
|
||||
desc oceanbase.__all_virtual_trans_lock_stat;
|
||||
desc oceanbase.__all_virtual_trans_mem_stat;
|
||||
desc oceanbase.__all_virtual_trans_mgr_stat;
|
||||
desc oceanbase.__all_virtual_trans_result_info_stat;
|
||||
desc oceanbase.__all_virtual_trans_sql_audit;
|
||||
desc oceanbase.__all_virtual_trans_stat;
|
||||
desc oceanbase.__all_virtual_upgrade_inspection;
|
||||
desc oceanbase.__all_virtual_zone_stat;
|
||||
desc oceanbase.__all_zone;
|
||||
desc oceanbase.__tenant_virtual_charset;
|
||||
desc oceanbase.__tenant_virtual_collation;
|
||||
desc oceanbase.__tenant_virtual_concurrent_limit_sql;
|
||||
desc oceanbase.__tenant_virtual_database_status;
|
||||
desc oceanbase.__tenant_virtual_event_name;
|
||||
desc oceanbase.__tenant_virtual_global_variable;
|
||||
desc oceanbase.__tenant_virtual_interm_result;
|
||||
desc oceanbase.__tenant_virtual_outline;
|
||||
desc oceanbase.__tenant_virtual_partition_stat;
|
||||
desc oceanbase.__tenant_virtual_privilege_grant;
|
||||
desc oceanbase.__tenant_virtual_session_variable;
|
||||
desc oceanbase.__tenant_virtual_statname;
|
||||
desc oceanbase.__tenant_virtual_table_index;
|
||||
desc oceanbase.__tenant_virtual_tenant_status;
|
||||
desc oceanbase.__tenant_virtual_warning;
|
||||
|
||||
--disable_result_log
|
||||
select * from information_schema.CHARACTER_SETS limit 1;
|
||||
select * from information_schema.COLLATIONS limit 1;
|
||||
select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY limit 1;
|
||||
select * from information_schema.COLUMNS limit 1;
|
||||
select * from information_schema.DBA_OUTLINES limit 1;
|
||||
select * from information_schema.ENGINES limit 1;
|
||||
select * from information_schema.GLOBAL_STATUS limit 1;
|
||||
select * from information_schema.GLOBAL_VARIABLES limit 1;
|
||||
select * from information_schema.KEY_COLUMN_USAGE limit 1;
|
||||
select * from information_schema.PARAMETERS limit 1;
|
||||
select * from information_schema.PARTITIONS limit 1;
|
||||
select * from information_schema.PROCESSLIST limit 1;
|
||||
select * from information_schema.ROUTINES limit 1;
|
||||
select * from information_schema.SCHEMATA limit 1;
|
||||
select * from information_schema.SCHEMA_PRIVILEGES limit 1;
|
||||
select * from information_schema.SESSION_STATUS limit 1;
|
||||
select * from information_schema.SESSION_VARIABLES limit 1;
|
||||
select * from information_schema.STATISTICS limit 1;
|
||||
select * from information_schema.TABLES limit 1;
|
||||
select * from information_schema.TABLE_CONSTRAINTS limit 1;
|
||||
select * from information_schema.TABLE_PRIVILEGES limit 1;
|
||||
select * from information_schema.USER_PRIVILEGES limit 1;
|
||||
select * from information_schema.USER_RECYCLEBIN limit 1;
|
||||
select * from information_schema.VIEWS limit 1;
|
||||
select * from information_schema.TRIGGERS limit 1;
|
||||
select * from mysql.db limit 1;
|
||||
select * from mysql.proc limit 1;
|
||||
select * from mysql.time_zone limit 1;
|
||||
select * from mysql.time_zone_name limit 1;
|
||||
select * from mysql.time_zone_transition limit 1;
|
||||
select * from mysql.time_zone_transition_type limit 1;
|
||||
select * from mysql.user limit 1;
|
||||
select * from oceanbase.gv$concurrent_limit_sql limit 1;
|
||||
select * from oceanbase.gv$database limit 1;
|
||||
select * from oceanbase.gv$latch limit 1;
|
||||
select * from oceanbase.gv$lock_wait_stat limit 1;
|
||||
select * from oceanbase.gv$memory limit 1;
|
||||
select * from oceanbase.gv$memstore limit 1;
|
||||
select * from oceanbase.gv$memstore_info limit 1;
|
||||
select * from oceanbase.gv$obrpc_incoming limit 1;
|
||||
select * from oceanbase.gv$obrpc_outgoing limit 1;
|
||||
select * from oceanbase.gv$outline limit 1;
|
||||
select * from oceanbase.gv$partition limit 1;
|
||||
select * from oceanbase.gv$plan_cache_plan_explain limit 1;
|
||||
select * from oceanbase.gv$plan_cache_plan_stat limit 1;
|
||||
select * from oceanbase.gv$plan_cache_stat limit 1;
|
||||
select * from oceanbase.gv$server_memstore limit 1;
|
||||
select * from oceanbase.gv$session_event limit 1;
|
||||
select * from oceanbase.gv$session_longops limit 1;
|
||||
select * from oceanbase.gv$session_wait limit 1;
|
||||
select * from oceanbase.gv$session_wait_history limit 1;
|
||||
select * from oceanbase.gv$sql limit 1;
|
||||
select * from oceanbase.gv$sql_audit limit 1;
|
||||
select * from oceanbase.gv$sql_monitor limit 1;
|
||||
select * from oceanbase.gv$sql_plan_monitor limit 1;
|
||||
select * from oceanbase.gv$sql_plan_statistics limit 1;
|
||||
select * from oceanbase.gv$sysstat limit 1;
|
||||
select * from oceanbase.gv$system_event limit 1;
|
||||
select * from oceanbase.gv$table limit 1;
|
||||
select * from oceanbase.gv$tenant limit 1;
|
||||
select * from oceanbase.gv$tenant_memstore_allocator_info limit 1;
|
||||
select * from oceanbase.gv$tenant_sequence_object limit 1;
|
||||
select * from oceanbase.gv$unit limit 1;
|
||||
select * from oceanbase.gv$unit_load_balance_event_history limit 1;
|
||||
select * from oceanbase.gv$tenant_px_worker_stat limit 1;
|
||||
select * from oceanbase.v$tenant_px_worker_stat limit 1;
|
||||
select * from oceanbase.v$event_name limit 1;
|
||||
select * from oceanbase.v$latch limit 1;
|
||||
select * from oceanbase.v$lock_wait_stat limit 1;
|
||||
select * from oceanbase.v$memory limit 1;
|
||||
select * from oceanbase.v$memstore limit 1;
|
||||
select * from oceanbase.v$memstore_info limit 1;
|
||||
select * from oceanbase.v$obrpc_incoming limit 1;
|
||||
select * from oceanbase.v$obrpc_outgoing limit 1;
|
||||
select * from oceanbase.v$partition limit 1;
|
||||
select * from oceanbase.v$plan_cache_plan_explain limit 1;
|
||||
select * from oceanbase.v$plan_cache_plan_stat limit 1;
|
||||
select * from oceanbase.v$plan_cache_stat limit 1;
|
||||
select * from oceanbase.v$session_longops limit 1;
|
||||
select * from oceanbase.v$session_wait limit 1;
|
||||
select * from oceanbase.v$session_wait_history limit 1;
|
||||
select * from oceanbase.v$sql limit 1;
|
||||
select * from oceanbase.v$sql_audit limit 1;
|
||||
select * from oceanbase.v$sql_monitor limit 1;
|
||||
select * from oceanbase.v$sql_plan_monitor limit 1;
|
||||
select * from oceanbase.v$sql_plan_statistics limit 1;
|
||||
select * from oceanbase.v$statname limit 1;
|
||||
select * from oceanbase.v$sysstat limit 1;
|
||||
select * from oceanbase.v$system_event limit 1;
|
||||
select * from oceanbase.v$tenant_memstore_allocator_info limit 1;
|
||||
select * from oceanbase.v$unit limit 1;
|
||||
select * from oceanbase.__all_acquired_snapshot limit 1;
|
||||
select * from oceanbase.__all_build_index_param limit 1;
|
||||
select * from oceanbase.__all_charset limit 1;
|
||||
select * from oceanbase.__all_clog_history_info limit 1;
|
||||
select * from oceanbase.__all_clog_history_info_v2 limit 1;
|
||||
select * from oceanbase.__all_collation limit 1;
|
||||
select * from oceanbase.__all_virtual_column_history limit 1;
|
||||
select * from oceanbase.__all_virtual_column_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_column_statistic limit 1;
|
||||
select * from oceanbase.__all_virtual_constraint limit 1;
|
||||
select * from oceanbase.__all_virtual_constraint_history limit 1;
|
||||
select * from oceanbase.__all_virtual_database limit 1;
|
||||
select * from oceanbase.__all_virtual_database_history limit 1;
|
||||
select * from oceanbase.__all_virtual_database_privilege limit 1;
|
||||
select * from oceanbase.__all_virtual_database_privilege_history limit 1;
|
||||
select * from oceanbase.__all_ddl_id limit 1;
|
||||
select * from oceanbase.__all_virtual_def_sub_part limit 1;
|
||||
select * from oceanbase.__all_virtual_def_sub_part_history limit 1;
|
||||
select * from oceanbase.__all_dummy limit 1;
|
||||
select * from oceanbase.__all_election_event_history limit 1;
|
||||
select * from oceanbase.__all_virtual_foreign_key limit 1;
|
||||
select * from oceanbase.__all_virtual_foreign_key_column limit 1;
|
||||
select * from oceanbase.__all_virtual_foreign_key_column_history limit 1;
|
||||
select * from oceanbase.__all_virtual_foreign_key_history limit 1;
|
||||
select * from oceanbase.__all_frozen_map limit 1;
|
||||
select * from oceanbase.__all_virtual_func limit 1;
|
||||
select * from oceanbase.__all_virtual_func_history limit 1;
|
||||
select * from oceanbase.__all_global_index_data_src limit 1;
|
||||
select * from oceanbase.__all_virtual_histogram_stat limit 1;
|
||||
select * from oceanbase.__all_immediate_effect_index_sstable limit 1;
|
||||
select * from oceanbase.__all_index_build_stat limit 1;
|
||||
select * from oceanbase.__all_index_checksum limit 1;
|
||||
select * from oceanbase.__all_index_schedule_task limit 1;
|
||||
select * from oceanbase.__all_index_wait_transaction_status limit 1;
|
||||
select * from oceanbase.__all_local_index_status limit 1;
|
||||
select * from oceanbase.__all_meta_table limit 1;
|
||||
select * from oceanbase.__all_virtual_ori_schema_version limit 1;
|
||||
select * from oceanbase.__all_virtual_outline limit 1;
|
||||
select * from oceanbase.__all_virtual_outline_history limit 1;
|
||||
select * from oceanbase.__all_virtual_package limit 1;
|
||||
select * from oceanbase.__all_virtual_package_history limit 1;
|
||||
select * from oceanbase.__all_virtual_part limit 1;
|
||||
select * from oceanbase.__all_virtual_part_history limit 1;
|
||||
select * from oceanbase.__all_virtual_part_info limit 1;
|
||||
select * from oceanbase.__all_virtual_part_info_history limit 1;
|
||||
select * from oceanbase.__all_privilege limit 1;
|
||||
select * from oceanbase.__all_virtual_recyclebin limit 1;
|
||||
select * from oceanbase.__all_resource_pool limit 1;
|
||||
select * from oceanbase.__all_restore_job limit 1;
|
||||
select * from oceanbase.__all_restore_job_history limit 1;
|
||||
select * from oceanbase.__all_restore_task limit 1;
|
||||
select * from oceanbase.__all_rootservice_event_history limit 1;
|
||||
select * from oceanbase.__all_rootservice_job limit 1;
|
||||
select * from oceanbase.__all_virtual_routine limit 1;
|
||||
select * from oceanbase.__all_virtual_routine_history limit 1;
|
||||
select * from oceanbase.__all_virtual_routine_param limit 1;
|
||||
select * from oceanbase.__all_virtual_routine_param_history limit 1;
|
||||
select * from oceanbase.__all_sequence limit 1;
|
||||
select * from oceanbase.__all_virtual_sequence_object limit 1;
|
||||
select * from oceanbase.__all_virtual_sequence_object_history limit 1;
|
||||
select * from oceanbase.__all_sequence_v2 limit 1;
|
||||
select * from oceanbase.__all_virtual_sequence_value limit 1;
|
||||
select * from oceanbase.__all_server limit 1;
|
||||
select * from oceanbase.__all_server_event_history limit 1;
|
||||
select * from oceanbase.__all_sql_execute_task limit 1;
|
||||
select * from oceanbase.__all_sstable_checksum limit 1;
|
||||
select * from oceanbase.__all_sstable_column_checksum limit 1;
|
||||
select * from oceanbase.__all_virtual_sub_part limit 1;
|
||||
select * from oceanbase.__all_virtual_sub_part_history limit 1;
|
||||
select * from oceanbase.__all_virtual_synonym limit 1;
|
||||
select * from oceanbase.__all_virtual_synonym_history limit 1;
|
||||
select * from oceanbase.__all_sys_parameter limit 1;
|
||||
select * from oceanbase.__all_virtual_sys_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_sys_variable limit 1;
|
||||
select * from oceanbase.__all_virtual_sys_variable_history limit 1;
|
||||
select * from oceanbase.__all_virtual_tablegroup limit 1;
|
||||
select * from oceanbase.__all_virtual_tablegroup_history limit 1;
|
||||
select * from oceanbase.__all_virtual_table_history limit 1;
|
||||
select * from oceanbase.__all_virtual_table_privilege limit 1;
|
||||
select * from oceanbase.__all_virtual_table_privilege_history limit 1;
|
||||
select * from oceanbase.__all_virtual_table_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_temp_table limit 1;
|
||||
select * from oceanbase.__all_tenant limit 1;
|
||||
select * from oceanbase.__all_tenant_gc_partition_info limit 1;
|
||||
select * from oceanbase.__all_tenant_history limit 1;
|
||||
select * from oceanbase.__all_tenant_meta_table limit 1;
|
||||
select * from oceanbase.__all_tenant_resource_usage limit 1;
|
||||
select * from oceanbase.__all_time_zone limit 1;
|
||||
select * from oceanbase.__all_time_zone_name limit 1;
|
||||
select * from oceanbase.__all_time_zone_transition limit 1;
|
||||
select * from oceanbase.__all_time_zone_transition_type limit 1;
|
||||
select * from oceanbase.__all_unit limit 1;
|
||||
select * from oceanbase.__all_unit_config limit 1;
|
||||
select * from oceanbase.__all_unit_load_history limit 1;
|
||||
select * from oceanbase.__all_virtual_user limit 1;
|
||||
select * from oceanbase.__all_virtual_user_history limit 1;
|
||||
select * from oceanbase.__all_virtual_bad_block_table limit 1;
|
||||
select * from oceanbase.__all_virtual_clog_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_concurrency_object_pool limit 1;
|
||||
select * from oceanbase.__all_virtual_core_all_table limit 1;
|
||||
select * from oceanbase.__all_virtual_core_column_table limit 1;
|
||||
select * from oceanbase.__all_virtual_core_meta_table limit 1;
|
||||
select * from oceanbase.__all_virtual_core_root_table limit 1;
|
||||
select * from oceanbase.__all_virtual_data_type limit 1;
|
||||
select * from oceanbase.__all_virtual_data_type_class limit 1;
|
||||
select * from oceanbase.__all_virtual_disk_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_election_group_info limit 1;
|
||||
select * from oceanbase.__all_virtual_election_info limit 1;
|
||||
select * from oceanbase.__all_virtual_election_mem_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_election_priority limit 1;
|
||||
select * from oceanbase.__all_virtual_engine limit 1;
|
||||
select * from oceanbase.__all_virtual_freeze_info limit 1;
|
||||
select * from oceanbase.__all_virtual_io_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_kvcache_info limit 1;
|
||||
select * from oceanbase.__all_virtual_latch limit 1;
|
||||
select * from oceanbase.__all_virtual_leader_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_lock_wait_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_long_ops_status limit 1;
|
||||
select * from oceanbase.__all_virtual_macro_block_marker_status limit 1;
|
||||
select * from oceanbase.__all_virtual_memory_info limit 1;
|
||||
select * from oceanbase.__all_virtual_memstore_info limit 1;
|
||||
select * from oceanbase.__all_virtual_mem_leak_checker_info limit 1;
|
||||
select * from oceanbase.__all_virtual_meta_table limit 1;
|
||||
select * from oceanbase.__all_virtual_obrpc_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_amplification_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_info limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_item limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_migration_status limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_replay_status limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_split_info limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_sstable_image_info limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_sstable_macro_info limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_sstable_merge_info limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_store_info limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_table limit 1;
|
||||
select * from oceanbase.__all_virtual_partition_table_store_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_plan_cache_plan_explain limit 1;
|
||||
select * from oceanbase.__all_virtual_plan_cache_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_plan_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_processlist limit 1;
|
||||
select * from oceanbase.__all_virtual_proxy_server_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_proxy_sys_variable limit 1;
|
||||
select * from oceanbase.__all_virtual_px_worker_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_rebalance_map_item_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_rebalance_map_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_rebalance_replica_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_rebalance_task_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_rebalance_tenant_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_rebalance_unit_distribution_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_rebalance_unit_migrate_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_rebalance_unit_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_replica_task limit 1;
|
||||
select * from oceanbase.__all_virtual_rootservice_stat limit 1;
|
||||
select * from oceanbase.__all_sequence_v2 limit 1;
|
||||
select * from oceanbase.__all_virtual_server_blacklist limit 1;
|
||||
select * from oceanbase.__all_virtual_server_clog_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_server_memory_info limit 1;
|
||||
select * from oceanbase.__all_virtual_server_object_pool limit 1;
|
||||
select * from oceanbase.__all_virtual_server_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_session_event limit 1;
|
||||
select * from oceanbase.__all_virtual_session_wait limit 1;
|
||||
select * from oceanbase.__all_virtual_session_wait_history limit 1;
|
||||
select * from oceanbase.__all_virtual_sesstat limit 1;
|
||||
select * from oceanbase.__all_virtual_sql_audit limit 1;
|
||||
select * from oceanbase.__all_virtual_sql_monitor limit 1;
|
||||
select * from oceanbase.__all_virtual_sql_plan_monitor limit 1;
|
||||
select * from oceanbase.__all_virtual_sql_plan_statistics limit 1;
|
||||
select * from oceanbase.__all_virtual_storage_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_sysstat limit 1;
|
||||
select * from oceanbase.__all_virtual_system_event limit 1;
|
||||
select * from oceanbase.__all_virtual_sys_parameter_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_sys_task_status limit 1;
|
||||
select * from oceanbase.__all_virtual_table_mgr limit 1;
|
||||
select * from oceanbase.__all_virtual_tenant_disk_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_tenant_memstore_allocator_info limit 1;
|
||||
select * from oceanbase.__all_virtual_tenant_memstore_info limit 1;
|
||||
select * from oceanbase.__all_virtual_tenant_stat limit 1;
|
||||
#bug: https://work.aone.alibaba-inc.com/issue/27146409
|
||||
#select * from oceanbase.__all_virtual_trace_log limit 1;
|
||||
select * from oceanbase.__all_virtual_trans_audit limit 1;
|
||||
select * from oceanbase.__all_virtual_trans_lock_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_trans_mem_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_trans_mgr_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_trans_result_info_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_trans_sql_audit limit 1;
|
||||
select * from oceanbase.__all_virtual_trans_stat limit 1;
|
||||
select * from oceanbase.__all_virtual_upgrade_inspection limit 1;
|
||||
select * from oceanbase.__all_virtual_zone_stat limit 1;
|
||||
select * from oceanbase.__all_zone limit 1;
|
||||
select * from oceanbase.__tenant_virtual_charset limit 1;
|
||||
select * from oceanbase.__tenant_virtual_collation limit 1;
|
||||
select * from oceanbase.__tenant_virtual_concurrent_limit_sql limit 1;
|
||||
select * from oceanbase.__tenant_virtual_database_status limit 1;
|
||||
select * from oceanbase.__tenant_virtual_event_name limit 1;
|
||||
select * from oceanbase.__tenant_virtual_global_variable limit 1;
|
||||
select * from oceanbase.__tenant_virtual_interm_result limit 1;
|
||||
select * from oceanbase.__tenant_virtual_outline limit 1;
|
||||
select * from oceanbase.__tenant_virtual_partition_stat limit 1;
|
||||
select * from oceanbase.__tenant_virtual_privilege_grant limit 1;
|
||||
select * from oceanbase.__tenant_virtual_session_variable limit 1;
|
||||
select * from oceanbase.__tenant_virtual_statname limit 1;
|
||||
select * from oceanbase.__tenant_virtual_table_index limit 1;
|
||||
select * from oceanbase.__tenant_virtual_tenant_status limit 1;
|
||||
select * from oceanbase.__tenant_virtual_warning limit 1;
|
||||
--enable_result_log
|
||||
|
||||
## Test all performance built-in views
|
||||
#--enable_query_log
|
||||
#################################
|
||||
# init variables
|
||||
#################################
|
||||
#let $cpu = 1;
|
||||
#let $memory = 1073741824;
|
||||
#let $min_memory = 1073741824;
|
||||
#let $disk = 536870912;
|
||||
#let $iops = 128;
|
||||
#let $session = 64;
|
||||
#let $zone_name=query_get_value(select zone from oceanbase.__all_zone where zone != '' limit 1, zone, 1);
|
||||
|
||||
#################################
|
||||
# clean up
|
||||
#################################
|
||||
#--disable_warnings
|
||||
#drop tenant if exists te1 force;
|
||||
#drop resource pool if exists pool_te1;
|
||||
#drop resource unit if exists box_te1;
|
||||
|
||||
#################################
|
||||
## create resource unit
|
||||
#################################
|
||||
#eval create resource unit box_te1 max_cpu $cpu, max_memory $memory, max_iops $iops, max_disk_size $disk, max_session_num $session, MIN_CPU=1, MIN_MEMORY=$min_memory, MIN_IOPS=128;
|
||||
|
||||
#################################
|
||||
## create resource pool
|
||||
#################################
|
||||
#--disable_query_log
|
||||
#eval create resource pool pool_te1 unit = 'box_te1', unit_num = 1, zone_list = ('$zone_name');
|
||||
#--enable_query_log
|
||||
|
||||
#################################
|
||||
## create tenant
|
||||
#################################
|
||||
#--enable_warnings
|
||||
#--disable_query_log
|
||||
#eval create tenant te1 replica_num = 1, primary_zone='$zone_name', resource_pool_list=('pool_te1') set ob_tcp_invited_nodes='%';
|
||||
#--source mysql_test/include/check_tenant_sync.inc
|
||||
#--enable_query_log
|
||||
#let $__tenant_name__ = 'te1';
|
||||
#--source mysql_test/include/get_tenant_server.inc
|
||||
#connect (conn1,$TE_SERVER_IP,root@te1,,*NO-ONE*,$TE_SERVER_PORT);
|
||||
|
||||
#################################
|
||||
## TEST
|
||||
#################################
|
||||
## expect all '0'
|
||||
#set ob_query_timeout = 100000000;
|
||||
#select count(*) from oceanbase.gv$memory where tenant_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.gv$memstore where tenant_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.gv$memstore_info where tenant_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.gv$sql where CON_ID != effective_tenant_id();
|
||||
#select count(*) from oceanbase.gv$plan_cache_stat where tenant_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.gv$sysstat where con_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.gv$system_event where con_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.v$memory where tenant_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.v$memstore where tenant_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.v$memstore_info where tenant_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.v$sysstat where con_id != effective_tenant_id();
|
||||
#select count(*) from oceanbase.v$system_event where con_id != effective_tenant_id();
|
||||
|
||||
#################################
|
||||
## check dictionary table
|
||||
#################################
|
||||
#select EVENT_ID, NAME, WAIT_CLASS_ID from oceanbase.v$event_name order by EVENT_ID, NAME;
|
||||
#select STAT_ID, NAME, CLASS from oceanbase.v$statname order by STAT_ID, NAME;
|
||||
|
||||
## expect all '1'
|
||||
#connect (conn2,$OBMYSQL_MS0,root@sys,,*NO-ONE*,$OBMYSQL_PORT);
|
||||
#set ob_query_timeout = 100000000;
|
||||
#select count(*) > 0 from oceanbase.gv$memory where tenant_id != effective_tenant_id();
|
||||
#select count(*) > 0 from oceanbase.gv$memory where tenant_id != effective_tenant_id();
|
||||
#select count(*) > 0 from oceanbase.gv$memstore where tenant_id != effective_tenant_id();
|
||||
#select count(*) > 0 from oceanbase.gv$memstore_info where tenant_id != effective_tenant_id();
|
||||
#select count(*) > 0 from oceanbase.gv$sql where CON_ID != effective_tenant_id();
|
||||
#select count(*) > 0 from oceanbase.gv$plan_cache_stat where tenant_id != effective_tenant_id();
|
||||
#select count(*) > 0 from oceanbase.gv$sysstat where con_id != effective_tenant_id();
|
||||
#select count(*) > 0 from oceanbase.gv$system_event where con_id != effective_tenant_id();
|
||||
#select count(*) > 0 from oceanbase.v$memory where tenant_id != effective_tenant_id();
|
||||
|
||||
#################################
|
||||
## check dictionary table
|
||||
#################################
|
||||
#select EVENT_ID, NAME, WAIT_CLASS_ID from oceanbase.v$event_name order by EVENT_ID, NAME;
|
||||
#select STAT_ID, NAME, CLASS from oceanbase.v$statname order by STAT_ID, NAME;
|
||||
|
||||
|
||||
#################################
|
||||
## cleanup
|
||||
#################################
|
||||
|
||||
#--disable_warnings
|
||||
#drop tenant if exists te1 force;
|
||||
#drop resource pool pool_te1;
|
||||
#drop resource unit box_te1;
|
||||
#--enable_warnings
|
||||
#--disable_query_log
|
||||
|
||||
#--disable_query_log
|
||||
#--disable_result_log
|
||||
#sleep 20;
|
||||
#--enable_result_log
|
||||
#--enable_query_log
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : xiaofeng.lby
|
||||
#owner group : sql2
|
||||
#description : test information_schema.partitions
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists pt1;
|
||||
--enable_warnings
|
||||
create table pt1 (c1 int primary key, c2 int) partition by key(c1) partitions 3;
|
||||
select * from information_schema.partitions where table_name = 'pt1';
|
||||
select table_schema, table_name from information_schema.partitions where table_name = 'pt1';
|
||||
desc information_schema.partitions;
|
||||
drop table pt1;
|
||||
@ -0,0 +1,15 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test information_schema.schemata
|
||||
|
||||
use information_schema;
|
||||
select * from schemata limit 0;
|
||||
--disable_result_log
|
||||
select schema_name from schemata;
|
||||
--enable_result_log
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create view schemata;
|
||||
desc schemata;
|
||||
@ -0,0 +1,16 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test information_schema.global_status
|
||||
|
||||
use information_schema;
|
||||
|
||||
#basic
|
||||
select count(*) from global_status;
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table global_status;
|
||||
desc global_status;
|
||||
@ -0,0 +1,24 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : nijia.nj
|
||||
#owner group : sql2
|
||||
#description : test information_schema.session_variables
|
||||
|
||||
use information_schema;
|
||||
|
||||
#basic
|
||||
let $old_global_increment = query_get_value(select variable_value from global_variables where variable_name = 'auto_increment_increment', variable_value, 1);
|
||||
let $old_session_increment = query_get_value(select variable_value from session_variables where variable_name = 'auto_increment_increment', variable_value, 1);
|
||||
select variable_value from session_variables where variable_name = 'auto_increment_increment';
|
||||
set @@session.auto_increment_increment = 10;
|
||||
select variable_value from session_variables where variable_name = 'auto_increment_increment';
|
||||
set @@global.auto_increment_increment = 5;
|
||||
select variable_value from session_variables where variable_name = 'auto_increment_increment';
|
||||
eval set @@global.auto_increment_increment = $old_global_increment;
|
||||
eval set @@session.auto_increment_increment = $old_session_increment;
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table session_variables;
|
||||
desc session_variables;
|
||||
@ -0,0 +1,19 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : xiaofeng.lby
|
||||
#owner group : sql2
|
||||
#description : test information_schema.table_constraints
|
||||
--result_format 4
|
||||
|
||||
--disable_warnings
|
||||
drop database if exists xiaofeng_db;
|
||||
--enable_warnings
|
||||
create database xiaofeng_db;
|
||||
use xiaofeng_db;
|
||||
create table t1(c1 int primary key);
|
||||
create table t2(c1 int unique, c2 int, c3 varchar(10), c4 varchar(10), constraint test_for_table_constraints_check_name check(c3 = substr(c4, 1, 1)),
|
||||
constraint test_for_table_constraints_fk_name_1 foreign key (c1) references t1(c1),
|
||||
constraint test_for_table_constraints_fk_name_2 foreign key (c2) references t2(c1));
|
||||
select * from information_schema.table_constraints where CONSTRAINT_SCHEMA = 'xiaofeng_db';
|
||||
drop database xiaofeng_db;
|
||||
@ -0,0 +1,39 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : xinqi.zlm
|
||||
#owner group : sql1
|
||||
#description : test information_schema.
|
||||
|
||||
create user tmp_user_test_user_priv identified by '123';
|
||||
create database test_user_priv_db;
|
||||
use test_user_priv_db;
|
||||
create table zhan_t1 (a int primary key, b int);
|
||||
|
||||
#table format
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table information_schema.table_privileges;
|
||||
desc information_schema.table_privileges;
|
||||
|
||||
#should be empty
|
||||
select * from information_schema.table_privileges where table_name = 'zhan_t1';
|
||||
|
||||
#grant
|
||||
grant select on test_user_priv_db.zhan_t1 to tmp_user_test_user_priv;
|
||||
|
||||
|
||||
#should be one row
|
||||
--real_sleep 3
|
||||
select * from information_schema.table_privileges where table_name = 'zhan_t1';
|
||||
#revoke
|
||||
revoke select on test_user_priv_db.zhan_t1 from tmp_user_test_user_priv;
|
||||
|
||||
#should be empty
|
||||
--real_sleep 3
|
||||
select * from information_schema.table_privileges where table_name = 'zhan_t1';
|
||||
|
||||
#cleanup
|
||||
--disable_warnings
|
||||
drop database test_user_priv_db;
|
||||
drop user tmp_user_test_user_priv;
|
||||
--enable_warnings
|
||||
@ -0,0 +1,24 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner: xiaoyi.xy
|
||||
#owner group : storage
|
||||
#description : __tenant_virtual_event_name
|
||||
|
||||
--disable_abort_on_error
|
||||
--disable_warnings
|
||||
|
||||
use oceanbase;
|
||||
desc __tenant_virtual_event_name;
|
||||
desc v$event_name;
|
||||
|
||||
--disable_result_log
|
||||
let $idx1 = query_get_value(select count(*) from oceanbase.__tenant_virtual_event_name,count(*),1);
|
||||
--enable_result_log
|
||||
if($idx1)
|
||||
{
|
||||
--echo succeed
|
||||
}
|
||||
--enable_abort_on_error
|
||||
--enable_warnings
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : zhenjiang.xzj
|
||||
#owner group : STORAGE
|
||||
#description : 测试虚拟表__tenant_virtual_partition_stat
|
||||
|
||||
--disable_abort_on_error
|
||||
--disable_warnings
|
||||
#检查表结构
|
||||
desc oceanbase.__tenant_virtual_partition_stat;
|
||||
|
||||
--disable_result_log
|
||||
|
||||
#login into the sys tenant
|
||||
connect (conn_admin,$OBMYSQL_MS0,admin@sys,admin,*NO-ONE*,$OBMYSQL_PORT);
|
||||
|
||||
let $cnt = query_get_value(select count(*) from oceanbase.__tenant_virtual_partition_stat, count(*), 1);
|
||||
if ($cnt != 0)
|
||||
{
|
||||
echo pass;
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner: xiaoyi.xy
|
||||
#owner group : storage
|
||||
#description : __tenant_virtual_statname
|
||||
|
||||
--disable_abort_on_error
|
||||
--disable_warnings
|
||||
|
||||
use oceanbase;
|
||||
desc __tenant_virtual_statname;
|
||||
desc v$statname;
|
||||
|
||||
--disable_result_log
|
||||
let $idx1 = query_get_value(select count(*) from oceanbase.__tenant_virtual_statname,count(*),1);
|
||||
--enable_result_log
|
||||
if($idx1)
|
||||
{
|
||||
--echo succeed
|
||||
}
|
||||
--enable_abort_on_error
|
||||
--enable_warnings
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : xinqi.zlm
|
||||
#owner group : sql1
|
||||
#description : test information_schema.user_privileges
|
||||
|
||||
|
||||
#table format
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table information_schema.user_privileges;
|
||||
desc information_schema.user_privileges;
|
||||
|
||||
#should be empty
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
|
||||
#new user
|
||||
create user tmp_user_user_privileges identified by '123';
|
||||
--real_sleep 3
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
|
||||
|
||||
#grant
|
||||
grant select on *.* to tmp_user_user_privileges;
|
||||
#should be one row
|
||||
--real_sleep 3
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
|
||||
#revoke
|
||||
revoke select on *.* from tmp_user_user_privileges;
|
||||
#should be USAGE only
|
||||
--real_sleep 3
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
|
||||
|
||||
|
||||
#grant option test
|
||||
grant select on *.* to tmp_user_user_privileges with grant option;
|
||||
--real_sleep 3
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
|
||||
revoke grant option on *.* from tmp_user_user_privileges;
|
||||
--real_sleep 3
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
revoke all on *.* from tmp_user_user_privileges;
|
||||
--real_sleep 3
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
|
||||
#clean up
|
||||
--disable_warnings
|
||||
drop user tmp_user_user_privileges;
|
||||
--enable_warnings
|
||||
|
||||
#should be empty
|
||||
--real_sleep 3
|
||||
select * from information_schema.user_privileges where grantee like '%tmp_user_user_privileges%';
|
||||
|
||||
#test root & admin
|
||||
--real_sleep 3
|
||||
select * from information_schema.user_privileges where grantee like '%root%' or grantee like '%admin%';
|
||||
|
||||
|
||||
|
||||
17
tools/deploy/mysql_test/test_suite/inner_table/t/views.test
Normal file
17
tools/deploy/mysql_test/test_suite/inner_table/t/views.test
Normal file
@ -0,0 +1,17 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
#owner : xiaofeng.lby
|
||||
#owner group : sql2
|
||||
#description : test information_schema.views
|
||||
|
||||
connect (obsys,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
|
||||
connection obsys;
|
||||
use information_schema;
|
||||
select * from views order by table_name desc;
|
||||
select table_schema, table_name from views order by table_name desc;
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create view views;
|
||||
desc views;
|
||||
disconnect obsys;
|
||||
connection default;
|
||||
Reference in New Issue
Block a user