oceanbase

Форк
0
/t
/
information_schema.test 
109 строк · 5.3 Кб
1
--result_format 4
2
--disable_query_log
3
set @@session.explicit_defaults_for_timestamp=off;
4
--enable_query_log
5
# owner: peihan.dph
6
# owner group: SQL3
7
# description:
8
#
9

10
# tags: inner_table, schema
11

12
let $cpu = 1;
13
let $memory = 1073741824;
14
let $min_memory = 1073741824;
15
let $disk = 536870912;
16
let $iops = 100000;
17
let $session = 64;
18

19
use information_schema;
20
desc information_schema.columns;
21
desc information_schema.tables;
22
desc information_schema.session_variables;
23
desc information_schema.table_constraints;
24
desc information_schema.character_sets;
25
desc information_schema.global_variables;
26
desc information_schema.statistics;
27
desc information_schema.schemata;
28
desc information_schema.views;
29
desc information_schema.files;
30

31
#select * from information_schema.columns;
32
--sorted_result
33
--replace_column 8 NULL 9 NULL 10 NULL 15 NULL 16 NULL
34
select * from information_schema.tables where table_schema in ('oceanbase', 'mysql', 'information_schema') order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
35
--echo test
36
#--sorted_result
37
#select * from information_schema.session_variables where variable_name != 'version_comment' and variable_name != 'version' order by VARIABLE_NAME;
38
#--sorted_result
39
#select * from information_schema.global_variables where variable_name != 'version_comment' and variable_name != 'version' order by VARIABLE_NAME;
40
--sorted_result
41
select * from information_schema.table_constraints where table_schema in ('oceanbase', 'mysql', 'information_schema') order by CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME;
42
--sorted_result
43
select * from information_schema.character_sets;
44
--sorted_result
45
select * from information_schema.statistics where table_schema in ('oceanbase', 'mysql', 'information_schema') and TABLE_NAME not like "ob_all_proxy%" order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
46
--sorted_result
47
select * from information_schema.schemata where schema_name in ('oceanbase', 'mysql', 'information_schema') order by CATALOG_NAME, SCHEMA_NAME;
48
--sorted_result
49
select * from information_schema.views where table_schema in ('oceanbase', 'mysql', 'information_schema') order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
50
# should be empty
51
--sorted_result
52
select * from information_schema.files;
53

54
create database test1;
55
use test1;
56
create table t1tenant1(c1 bigint primary key, c2 bigint);
57
connection default;
58
--replace_column 8 NULL 9 NULL 10 NULL 15 NULL 16 NULL
59
select * from information_schema.tables where table_schema in ('oceanbase', 'mysql', 'information_schema', 'test1') order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
60

61
create index t1tenant1_idx1 on t1tenant1(c2, c1);
62
create unique index t1tenant1_uidx on t1tenant1(c2);
63
create view vt1tenant1 as select c1,c2 from t1tenant1;
64

65
use information_schema;
66
#select * from information_schema.columns;
67
#select * from information_schema.tables;
68
--sorted_result
69
select * from information_schema.table_constraints where table_schema in ('oceanbase', 'mysql', 'information_schema', 'test1') order by CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME;
70

71
--sorted_result
72
select * from information_schema.schemata where schema_name in ('oceanbase', 'mysql', 'information_schema', 'test1') order by CATALOG_NAME, SCHEMA_NAME;
73
--sorted_result
74
select * from information_schema.views where table_schema in ('oceanbase', 'mysql', 'information_schema', 'test1') order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
75

76

77
# login using sys tenant
78
connect (conn_sys,$OBMYSQL_MS0,root@sys,,*NO-ONE*,$OBMYSQL_PORT);
79
set @@session.ob_query_timeout = 60000000;
80
use information_schema;
81
--disable_warnings
82
drop table if exists t1, t2, t3;
83
--enable_warnings
84
#select * from information_schema.schemata;
85
#select * from information_schema.columns;
86
#select * from information_schema.session_variables where variable_name != 'version_comment' and variable_name != 'version' order by VARIABLE_NAME;
87
#select * from information_schema.global_variables where variable_name != 'version_comment' and variable_name != 'version' order by VARIABLE_NAME;
88
--sorted_result
89
select * from information_schema.table_constraints where table_schema in ('oceanbase', 'mysql', 'information_schema', 'SYS', 'LBACSYS', 'ORAAUDITOR') order by CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME;
90
--sorted_result
91
select * from information_schema.statistics where table_schema in ('oceanbase', 'mysql', 'information_schema', 'SYS', 'LBACSYS', 'ORAAUDITOR') and TABLE_NAME not like "ob_all_proxy%" order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
92
--sorted_result
93
select * from information_schema.views where table_schema in ('oceanbase', 'mysql', 'information_schema', 'SYS', 'LBACSYS', 'ORAAUDITOR') order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
94

95

96
--error 1049
97
use test1;
98
connection default;
99
use information_schema;
100
#select * from information_schema.columns;
101
#select * from information_schema.schemata;
102
--sorted_result
103
select * from information_schema.table_constraints where table_schema in ('oceanbase', 'mysql', 'information_schema', 'test1') order by CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME;
104
--sorted_result
105
select * from information_schema.statistics where table_schema in ('oceanbase', 'mysql', 'information_schema', 'test1') and TABLE_NAME not like "ob_all_proxy%" order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
106
--sorted_result
107
select * from information_schema.views where table_schema in ('oceanbase', 'mysql', 'information_schema', 'test1') order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME;
108

109
drop database test1;
110

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.