Remove synonym function in MySQL mode
This commit is contained in:
@ -567,7 +567,6 @@ static const NonReservedKeyword Mysql_none_reserved_keywords[] = {{"access", ACC
|
||||
{"sysdate", SYSDATE},
|
||||
{"system", SYSTEM},
|
||||
{"system_user", SYSTEM_USER},
|
||||
{"synonym", SYNONYM},
|
||||
{"swaps", SWAPS},
|
||||
{"switch", SWITCH},
|
||||
{"switches", SWITCHES},
|
||||
|
@ -314,7 +314,6 @@ STARTING { REPUT_TOKEN_NEG_SIGN(STARTING); }
|
||||
STORED { REPUT_TOKEN_NEG_SIGN(STORED); }
|
||||
STRAIGHT_JOIN { REPUT_TOKEN_NEG_SIGN(STRAIGHT_JOIN); }
|
||||
SUBJECT { REPUT_TOKEN_NEG_SIGN(SUBJECT); }
|
||||
SYNONYM { REPUT_TOKEN_NEG_SIGN(SYNONYM); }
|
||||
SYSDATE { REPUT_TOKEN_NEG_SIGN(SYSDATE); }
|
||||
TERMINATED { REPUT_TOKEN_NEG_SIGN(TERMINATED); }
|
||||
TEXT { REPUT_TOKEN_NEG_SIGN(TEXT); }
|
||||
|
@ -278,7 +278,7 @@ END_P SET_VAR DELIMITER
|
||||
STATS_PERSISTENT STATS_SAMPLE_PAGES STATUS STATEMENTS STD STDDEV STDDEV_POP STDDEV_SAMP STRONG
|
||||
SYNCHRONIZATION STOP STORAGE STORAGE_FORMAT_VERSION STORAGE_FORMAT_WORK_VERSION STORING STRING
|
||||
SUBCLASS_ORIGIN SUBDATE SUBJECT SUBPARTITION SUBPARTITIONS SUBSTR SUBSTRING SUCCESSFUL SUM
|
||||
SUPER SUSPEND SWAPS SWITCH SWITCHES SWITCHOVER SYSTEM SYSTEM_USER SYSDATE SESSION_ALIAS SYNONYM
|
||||
SUPER SUSPEND SWAPS SWITCH SWITCHES SWITCHOVER SYSTEM SYSTEM_USER SYSDATE SESSION_ALIAS
|
||||
SIZE
|
||||
|
||||
TABLE_CHECKSUM TABLE_MODE TABLE_ID TABLE_NAME TABLEGROUPS TABLES TABLESPACE TABLET TABLET_MAX_SIZE
|
||||
@ -304,7 +304,7 @@ END_P SET_VAR DELIMITER
|
||||
%type <node> select_stmt update_stmt delete_stmt
|
||||
%type <node> insert_stmt single_table_insert values_clause dml_table_name
|
||||
%type <node> create_table_stmt create_table_like_stmt opt_table_option_list table_option_list table_option table_option_list_space_seperated create_function_stmt drop_function_stmt parallel_option
|
||||
%type <node> create_synonym_stmt drop_synonym_stmt opt_public opt_force synonym_name synonym_object opt_dlink
|
||||
%type <node> opt_force
|
||||
%type <node> create_database_stmt drop_database_stmt alter_database_stmt use_database_stmt
|
||||
%type <node> opt_database_name database_option database_option_list opt_database_option_list database_factor
|
||||
%type <node> create_tenant_stmt opt_tenant_option_list alter_tenant_stmt drop_tenant_stmt
|
||||
@ -525,8 +525,6 @@ stmt:
|
||||
| rename_table_stmt { $$ = $1; check_question_mark($$, result); }
|
||||
| truncate_table_stmt { $$ = $1; check_question_mark($$, result); }
|
||||
| set_transaction_stmt { $$ = $1; check_question_mark($$, result); }
|
||||
| create_synonym_stmt { $$ = $1; check_question_mark($$, result); }
|
||||
| drop_synonym_stmt { $$ = $1; check_question_mark($$, result); }
|
||||
| create_savepoint_stmt { $$ = $1; check_question_mark($$, result); }
|
||||
| rollback_savepoint_stmt { $$ = $1; check_question_mark($$, result); }
|
||||
| release_savepoint_stmt { $$ = $1; check_question_mark($$, result); }
|
||||
@ -3815,142 +3813,6 @@ USE database_factor
|
||||
}
|
||||
;
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* create synonym grammar
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
create_synonym_stmt:
|
||||
CREATE opt_replace opt_public SYNONYM synonym_name FOR synonym_object opt_dlink
|
||||
{
|
||||
malloc_non_terminal_node($$,
|
||||
result->malloc_pool_,
|
||||
T_CREATE_SYNONYM,
|
||||
7,
|
||||
$2, /*or replace*/
|
||||
$3, /* public */
|
||||
NULL, /* opt schema name */
|
||||
$5, /* synonym name */
|
||||
NULL, /* opt schema name */
|
||||
$7, /* synonym object */
|
||||
$8); /* partition optition */
|
||||
}
|
||||
;
|
||||
|
||||
| CREATE opt_replace opt_public SYNONYM database_factor '.' synonym_name FOR synonym_object opt_dlink
|
||||
{
|
||||
malloc_non_terminal_node($$,
|
||||
result->malloc_pool_,
|
||||
T_CREATE_SYNONYM,
|
||||
7,
|
||||
$2, /*or replace*/
|
||||
$3, /* public */
|
||||
$5, /* opt schema name */
|
||||
$7, /* synonym name */
|
||||
NULL, /* opt schema name */
|
||||
$9, /* synonym object */
|
||||
$10); /* partition optition */
|
||||
}
|
||||
;
|
||||
|
||||
| CREATE opt_replace opt_public SYNONYM synonym_name FOR database_factor '.' synonym_object opt_dlink
|
||||
{
|
||||
malloc_non_terminal_node($$,
|
||||
result->malloc_pool_,
|
||||
T_CREATE_SYNONYM,
|
||||
7,
|
||||
$2, /*or replace*/
|
||||
$3, /* public */
|
||||
NULL, /* opt schema name */
|
||||
$5, /* synonym name */
|
||||
$7, /* opt schema name */
|
||||
$9, /* synonym object */
|
||||
$10); /* partition optition */
|
||||
}
|
||||
;
|
||||
| CREATE opt_replace opt_public SYNONYM database_factor '.' synonym_name FOR database_factor '.' synonym_object opt_dlink
|
||||
{
|
||||
malloc_non_terminal_node($$,
|
||||
result->malloc_pool_,
|
||||
T_CREATE_SYNONYM,
|
||||
7,
|
||||
$2, /*or replace*/
|
||||
$3, /* public */
|
||||
$5, /* opt schema name */
|
||||
$7, /* synonym name */
|
||||
$9, /* opt schema name */
|
||||
$11, /* synonym object */
|
||||
$12); /* partition optition */
|
||||
}
|
||||
;
|
||||
|
||||
opt_public:
|
||||
PUBLIC
|
||||
{
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_PUBLIC); }
|
||||
| /* EMPTY */
|
||||
{ $$ = NULL; }
|
||||
;
|
||||
|
||||
|
||||
synonym_name:
|
||||
NAME_OB
|
||||
{ $$ = $1; }
|
||||
| unreserved_keyword
|
||||
{
|
||||
get_non_reserved_node($$, result->malloc_pool_, @1.first_column, @1.last_column);
|
||||
}
|
||||
;
|
||||
|
||||
opt_dlink:
|
||||
'@' ip_port
|
||||
{
|
||||
$$ = $2;}
|
||||
| /* EMPTY */
|
||||
{ $$ = NULL; }
|
||||
;
|
||||
|
||||
synonym_object:
|
||||
NAME_OB
|
||||
{ $$ = $1; }
|
||||
| unreserved_keyword
|
||||
{
|
||||
get_non_reserved_node($$, result->malloc_pool_, @1.first_column, @1.last_column);
|
||||
}
|
||||
;
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* DROP SYNONYM grammar
|
||||
*
|
||||
*****************************************************************************/
|
||||
drop_synonym_stmt:
|
||||
DROP opt_public SYNONYM synonym_name opt_force
|
||||
{
|
||||
malloc_non_terminal_node($$,
|
||||
result->malloc_pool_,
|
||||
T_DROP_SYNONYM,
|
||||
4,
|
||||
$2, /*opt public*/
|
||||
NULL, /* opt schema name */
|
||||
$4, /* synonym name */
|
||||
$5); /* opt force */
|
||||
}
|
||||
;
|
||||
| DROP opt_public SYNONYM database_factor '.' synonym_name opt_force
|
||||
{
|
||||
malloc_non_terminal_node($$,
|
||||
result->malloc_pool_,
|
||||
T_DROP_SYNONYM,
|
||||
4,
|
||||
$2, /*opt public*/
|
||||
$4, /* opt schema name */
|
||||
$6, /* synonym name */
|
||||
$7); /* opt force */
|
||||
}
|
||||
;
|
||||
|
||||
opt_force:
|
||||
FORCE
|
||||
{
|
||||
@ -10458,11 +10320,6 @@ ALTER
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_PRIV_TYPE);
|
||||
$$->value_ = 0;
|
||||
}
|
||||
| CREATE SYNONYM
|
||||
{
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_PRIV_TYPE);
|
||||
$$->value_ = OB_PRIV_CREATE_SYNONYM;
|
||||
}
|
||||
| FILEX
|
||||
{
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_PRIV_TYPE);
|
||||
@ -13994,7 +13851,6 @@ ACCOUNT
|
||||
| SYSTEM
|
||||
| SYSTEM_USER
|
||||
| SYSDATE
|
||||
| SYNONYM
|
||||
| TABLE_CHECKSUM
|
||||
| TABLE_MODE
|
||||
| TABLEGROUPS
|
||||
|
@ -1,152 +0,0 @@
|
||||
use information_schema;
|
||||
select table_name from tables where table_schema = 'oceanbase' and table_name like '__all_table';
|
||||
table_name
|
||||
select table_name from tables where table_schema = 'oceanbase' and table_type like 'SYSTEM VIEW';
|
||||
table_name
|
||||
drop database if exists nijia;
|
||||
create database nijia;
|
||||
use nijia;
|
||||
create table t1(c1 int, c2 int);
|
||||
create view v as select * from t1;
|
||||
select table_name from information_schema.tables where table_schema = 'nijia' and table_type like 'BASE TABLE';
|
||||
table_name
|
||||
t1
|
||||
select table_name from information_schema.tables where table_schema = 'nijia' and table_type like 'VIEW';
|
||||
table_name
|
||||
v
|
||||
drop database nijia;
|
||||
show create table information_schema.tables;
|
||||
View Create View character_set_client collation_connection
|
||||
TABLES CREATE VIEW `TABLES` AS select /*+ READ_CONSISTENCY(WEAK), use_merge(b, c, d, e)*/ 'def' as TABLE_CATALOG, b.database_name as TABLE_SCHEMA, a.table_name as TABLE_NAME, case when a.database_id & 0xFFFFFFFFFF = 2 then 'SYSTEM VIEW' when (a.table_type = 1 or a.table_type = 4) then 'VIEW' when a.table_type = 2 then 'SYSTEM TABLE' when a.table_type = 1 then 'INDEX' else 'BASE TABLE' end as TABLE_TYPE, NULL as ENGINE, NULL as VERSION, NULL as ROW_FORMAT, sum(c.row_count) as TABLE_ROWS, case when sum(c.row_count) = 0 then 0 else sum(c.data_size)/sum(c.row_count) end as AVG_ROW_LENGTH, sum(c.data_size) as DATA_LENGTH, NULL as MAX_DATA_LENGTH, NULL as INDEX_LENGTH, NULL as DATA_FREE, NULL as AUTO_INCREMENT, a.gmt_create as CREATE_TIME, a.gmt_modified as UPDATE_TIME, NULL as CHECK_TIME, d.collation as TABLE_COLLATION, cast(NULL as unsigned) as CHECKSUM, NULL as CREATE_OPTIONS, a.comment as TABLE_COMMENT from oceanbase.__all_virtual_table a inner join oceanbase.__all_virtual_database b on a.database_id = b.database_id left join oceanbase.__all_virtual_tenant_partition_meta_table c on a.table_id = c.table_id and c.tenant_id = effective_tenant_id() and a.tenant_id = c.tenant_id and c.role = 1 inner join oceanbase.__all_collation d on a.collation_type = d.id where a.tenant_id = effective_tenant_id() and b.tenant_id = effective_tenant_id() and a.table_type != 5 and b.database_name != '__recyclebin' and b.in_recyclebin = 0 group by a.table_id, b.database_name, a.table_name, a.table_type, a.gmt_create, a.gmt_modified, d.collation, a.comment utf8mb4 utf8mb4_general_ci
|
||||
desc information_schema.tables;
|
||||
Field Type Null Key Default Extra
|
||||
TABLE_CATALOG varchar(3) NO
|
||||
TABLE_SCHEMA varchar(128) NO
|
||||
TABLE_NAME varchar(256) NO
|
||||
TABLE_TYPE varchar(12) NO
|
||||
ENGINE null NO
|
||||
VERSION null NO
|
||||
ROW_FORMAT null NO
|
||||
TABLE_ROWS decimal(20,0) NO NULL
|
||||
AVG_ROW_LENGTH decimal(24,4) NO
|
||||
DATA_LENGTH decimal(20,0) NO NULL
|
||||
MAX_DATA_LENGTH null NO
|
||||
INDEX_LENGTH null NO
|
||||
DATA_FREE null NO
|
||||
AUTO_INCREMENT null NO
|
||||
CREATE_TIME timestamp(6) NO NULL
|
||||
UPDATE_TIME timestamp(6) NO NULL
|
||||
CHECK_TIME null NO
|
||||
TABLE_COLLATION varchar(128) NO
|
||||
CHECKSUM bigint(0) unsigned NO
|
||||
CREATE_OPTIONS null NO
|
||||
TABLE_COMMENT varchar(4096) NO
|
||||
connect mysql_jianhua,$OBMYSQL_MS0,root@mysql,'',test,$OBMYSQL_PORT;
|
||||
connection mysql_jianhua;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
drop view vv1;
|
||||
drop view vst1;
|
||||
drop view vsv1;
|
||||
drop public synonym st1 force;
|
||||
drop public synonym sv1 force;
|
||||
drop synonym st1 force;
|
||||
drop synonym sv1 force;
|
||||
drop synonym sst1 force;
|
||||
drop synonym ssv1 force;
|
||||
drop public synonym t1 force;
|
||||
drop public synonym v1 force;
|
||||
drop view nv1;
|
||||
drop view njv1;
|
||||
drop view nuv1;
|
||||
create table t1 (c1 int, c2 varchar(10));
|
||||
insert into t1 values (12, "12");
|
||||
create view v1 as select * from t1;
|
||||
create view vv1 as select * from v1;
|
||||
create public synonym st1 for t1;
|
||||
create public synonym sv1 for v1;
|
||||
create synonym st1 for t1;
|
||||
create synonym sv1 for v1;
|
||||
create synonym sst1 for st1;
|
||||
create synonym ssv1 for sv1;
|
||||
create public synonym t1 for t1;
|
||||
create public synonym v1 for v1;
|
||||
create view vst1 as select * from st1;
|
||||
create view vsv1 as select * from sv1;
|
||||
create view nv1 as select c1, c2 from t1 a;
|
||||
create view njv1 as select a.c2 as a_c2, b.c2 as b_c2 from t1 a join t1 b on a.c1=b.c1;
|
||||
create view nuv1 as select c.c2, c.c1 from (select c1, c2 from t1 union select c1, c2 from t1) as c;
|
||||
connect ob_sys_check_schema,$OBMYSQL_MS0,admin,$OBMYSQL_PWD,test,$OBMYSQL_PORT;
|
||||
connection ob_sys_check_schema;
|
||||
disconnect ob_sys_check_schema;
|
||||
connect sys_jianhua,$OBMYSQL_MS0,root@sys,,oceanbase,$OBMYSQL_PORT;
|
||||
connection sys_jianhua;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test1' AND table_name = 'addd' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'addd' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 't1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
mysql test t1 3 1 0
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'v1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
mysql test v1 3 1 2 test t1
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'vv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'st1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
mysql test st1 3 1 1 test t1
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'sv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
mysql test sv1 3 1 4 test v1 test t1
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'sst1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'ssv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'vst1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
mysql test vst1 3 1 3 test st1 test t1
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'vsv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
ERROR 42S22: view invalid
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = '__public' AND table_name = 'st1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
mysql __public st1 3 1 1 test t1
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = '__public' AND table_name = 'sv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
mysql __public sv1 3 1 4 test v1 test t1
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = '__public' AND table_name = 'sst1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = '__public' AND table_name = 'ssv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'nv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
mysql test nv1 3 1 2 test t1
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'njv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
mysql test njv1 3 1 2 test t1
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'nuv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'sys' AND database_name = 'oceanbase' AND table_name = 'gv$unit' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
sys oceanbase gv$unit 0 1 2 oceanbase __all_resource_pool
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'sys' AND database_name = 'oceanbase' AND table_name = 'gv$partition' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
tenant_name database_name table_name table_type part_num complex_table_type level1_decoded_db_name level1_decoded_table_name level2_decoded_db_name level2_decoded_table_name
|
||||
disconnect sys_jianhua;
|
||||
connection mysql_jianhua;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
drop view vv1;
|
||||
drop view vst1;
|
||||
drop view vsv1;
|
||||
drop public synonym st1 force;
|
||||
drop public synonym sv1 force;
|
||||
drop synonym st1 force;
|
||||
drop synonym sv1 force;
|
||||
drop synonym sst1 force;
|
||||
drop synonym ssv1 force;
|
||||
drop public synonym t1 force;
|
||||
drop public synonym v1 force;
|
||||
drop view nv1;
|
||||
drop view njv1;
|
||||
drop view nuv1;
|
||||
disconnect mysql_jianhua;
|
@ -1,161 +0,0 @@
|
||||
--disable_query_log
|
||||
set @@session.explicit_defaults_for_timestamp=off;
|
||||
--enable_query_log
|
||||
|
||||
use information_schema;
|
||||
|
||||
#basic
|
||||
select table_name from tables where table_schema = 'oceanbase' and table_name like '__all_table';
|
||||
select table_name from tables where table_schema = 'oceanbase' and table_type like 'SYSTEM VIEW';
|
||||
--disable_warnings
|
||||
drop database if exists nijia;
|
||||
--enable_warnings
|
||||
create database nijia;
|
||||
use nijia;
|
||||
create table t1(c1 int, c2 int);
|
||||
create view v as select * from t1;
|
||||
select table_name from information_schema.tables where table_schema = 'nijia' and table_type like 'BASE TABLE';
|
||||
select table_name from information_schema.tables where table_schema = 'nijia' and table_type like 'VIEW';
|
||||
--disable_warnings
|
||||
drop database nijia;
|
||||
--enable_warnings
|
||||
|
||||
#show
|
||||
--source mysql_test/include/show_create_table_old_version_replica2.inc
|
||||
show create table information_schema.tables;
|
||||
desc information_schema.tables;
|
||||
|
||||
##check gv$object table
|
||||
|
||||
connect (mysql_jianhua,$OBMYSQL_MS0,root@mysql,'',test,$OBMYSQL_PORT);
|
||||
connection mysql_jianhua;
|
||||
|
||||
--disable_warnings
|
||||
--error 0, 1051
|
||||
drop table t1;
|
||||
--error 0, 1051
|
||||
drop view v1;
|
||||
--error 0, 1051
|
||||
drop view vv1;
|
||||
--error 0, 1051
|
||||
drop view vst1;
|
||||
--error 0, 1051
|
||||
drop view vsv1;
|
||||
--error 0, 5299
|
||||
drop public synonym st1 force;
|
||||
--error 0, 5299
|
||||
drop public synonym sv1 force;
|
||||
--error 0, 5299
|
||||
drop synonym st1 force;
|
||||
--error 0, 5299
|
||||
drop synonym sv1 force;
|
||||
--error 0, 5299
|
||||
drop synonym sst1 force;
|
||||
--error 0, 5299
|
||||
drop synonym ssv1 force;
|
||||
--error 0, 5299
|
||||
drop public synonym t1 force;
|
||||
--error 0, 5299
|
||||
drop public synonym v1 force;
|
||||
|
||||
--error 0, 1051
|
||||
drop view nv1;
|
||||
--error 0, 1051
|
||||
drop view njv1;
|
||||
--error 0, 1051
|
||||
drop view nuv1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (c1 int, c2 varchar(10));
|
||||
insert into t1 values (12, "12");
|
||||
create view v1 as select * from t1;
|
||||
create view vv1 as select * from v1;
|
||||
create public synonym st1 for t1;
|
||||
create public synonym sv1 for v1;
|
||||
create synonym st1 for t1;
|
||||
create synonym sv1 for v1;
|
||||
create synonym sst1 for st1;
|
||||
create synonym ssv1 for sv1;
|
||||
create public synonym t1 for t1;
|
||||
create public synonym v1 for v1;
|
||||
create view vst1 as select * from st1;
|
||||
create view vsv1 as select * from sv1;
|
||||
|
||||
create view nv1 as select c1, c2 from t1 a;
|
||||
create view njv1 as select a.c2 as a_c2, b.c2 as b_c2 from t1 a join t1 b on a.c1=b.c1;
|
||||
create view nuv1 as select c.c2, c.c1 from (select c1, c2 from t1 union select c1, c2 from t1) as c;
|
||||
|
||||
--source mysql_test/include/check_schema_sync.inc
|
||||
|
||||
connect (sys_jianhua,$OBMYSQL_MS0,root@sys,,oceanbase,$OBMYSQL_PORT);
|
||||
connection sys_jianhua;
|
||||
|
||||
|
||||
##error name
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test1' AND table_name = 'addd' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'addd' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 't1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'v1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'vv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'st1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'sv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'sst1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'ssv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'vst1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
--error 1356
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'vsv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = '__public' AND table_name = 'st1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = '__public' AND table_name = 'sv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = '__public' AND table_name = 'sst1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = '__public' AND table_name = 'ssv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'nv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'njv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'mysql' AND database_name = 'test' AND table_name = 'nuv1' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'sys' AND database_name = 'oceanbase' AND table_name = 'gv$unit' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
SELECT tenant_name, database_name, table_name, table_type, part_num, complex_table_type, level1_decoded_db_name, level1_decoded_table_name, level2_decoded_db_name, level2_decoded_table_name FROM oceanbase.__all_virtual_proxy_schema WHERE tenant_name = 'sys' AND database_name = 'oceanbase' AND table_name = 'gv$partition' AND partition_id = 0 AND sql_port > 0 ORDER BY role ASC LIMIT 1;
|
||||
|
||||
disconnect sys_jianhua;
|
||||
|
||||
|
||||
connection mysql_jianhua;
|
||||
--disable_warnings
|
||||
--error 0, 1051
|
||||
drop table t1;
|
||||
--error 0, 1051
|
||||
drop view v1;
|
||||
--error 0, 1051
|
||||
drop view vv1;
|
||||
--error 0, 1051
|
||||
drop view vst1;
|
||||
--error 0, 1051
|
||||
drop view vsv1;
|
||||
--error 0, 5299
|
||||
drop public synonym st1 force;
|
||||
--error 0, 5299
|
||||
drop public synonym sv1 force;
|
||||
--error 0, 5299
|
||||
drop synonym st1 force;
|
||||
--error 0, 5299
|
||||
drop synonym sv1 force;
|
||||
--error 0, 5299
|
||||
drop synonym sst1 force;
|
||||
--error 0, 5299
|
||||
drop synonym ssv1 force;
|
||||
--error 0, 5299
|
||||
drop public synonym t1 force;
|
||||
--error 0, 5299
|
||||
drop public synonym v1 force;
|
||||
|
||||
--error 0, 1051
|
||||
drop view nv1;
|
||||
--error 0, 1051
|
||||
drop view njv1;
|
||||
--error 0, 1051
|
||||
drop view nuv1;
|
||||
|
||||
--enable_warnings
|
||||
disconnect mysql_jianhua;
|
@ -3363,62 +3363,24 @@ question_mask_size: 0
|
||||
|--[0],[T_REFRESH_TIME_ZONE_INFO], str_value_=[], value=[0]
|
||||
|
||||
************** Case 166 ***************
|
||||
drop public synonym t1;
|
||||
question_mask_size: 0
|
||||
|
||||
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_DROP_SYNONYM], str_value_=[], value=[0]
|
||||
|--[0],[T_PUBLIC], str_value_=[], value=[9223372036854775807]
|
||||
|--[2],[T_IDENT], str_value_=[t1], value=[9223372036854775807]
|
||||
|
||||
************** Case 167 ***************
|
||||
drop public synonym t1 force;
|
||||
question_mask_size: 0
|
||||
|
||||
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_DROP_SYNONYM], str_value_=[], value=[0]
|
||||
|--[0],[T_PUBLIC], str_value_=[], value=[9223372036854775807]
|
||||
|--[2],[T_IDENT], str_value_=[t1], value=[9223372036854775807]
|
||||
|--[3],[T_FORCE], str_value_=[], value=[9223372036854775807]
|
||||
|
||||
************** Case 168 ***************
|
||||
drop synonym t1 force;
|
||||
question_mask_size: 0
|
||||
|
||||
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_DROP_SYNONYM], str_value_=[], value=[0]
|
||||
|--[2],[T_IDENT], str_value_=[t1], value=[9223372036854775807]
|
||||
|--[3],[T_FORCE], str_value_=[], value=[9223372036854775807]
|
||||
|
||||
************** Case 169 ***************
|
||||
drop synonym database1.t1 force;
|
||||
question_mask_size: 0
|
||||
|
||||
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_DROP_SYNONYM], str_value_=[], value=[0]
|
||||
|--[1],[T_IDENT], str_value_=[database1], value=[9223372036854775807]
|
||||
|--[2],[T_IDENT], str_value_=[t1], value=[9223372036854775807]
|
||||
|--[3],[T_FORCE], str_value_=[], value=[9223372036854775807]
|
||||
|
||||
************** Case 170 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales);
|
||||
************** Case 171 ***************
|
||||
************** Case 167 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales where t2.id!= t1.id when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales);
|
||||
************** Case 172 ***************
|
||||
************** Case 168 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales where t1.id < 3 delete where t1.id < 5 when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales);
|
||||
************** Case 173 ***************
|
||||
************** Case 169 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales delete where t1.sales =2 when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales);
|
||||
************** Case 174 ***************
|
||||
************** Case 170 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales) where t2.id > 0;
|
||||
************** Case 175 ***************
|
||||
************** Case 171 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (1 = 2) when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales) where t2.id > 0;
|
||||
************** Case 176 ***************
|
||||
************** Case 172 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales;
|
||||
************** Case 177 ***************
|
||||
************** Case 173 ***************
|
||||
merge into targetTable using sourceTable on (targetTable.id = sourceTable.id) when matched then update set targetTable.sales = sourceTable.sales;
|
||||
************** Case 178 ***************
|
||||
************** Case 174 ***************
|
||||
merge into targetTable using (select * from t1 ) sourceTable on (targetTable.id = sourceTable.id) when matched then update set targetTable.sales = sourceTable.sales;
|
||||
************** Case 179 ***************
|
||||
************** Case 175 ***************
|
||||
select unique(c1), c2 from t1;
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3438,7 +3400,7 @@ question_mask_size: 0
|
||||
|--[0],[T_RELATION_FACTOR], str_value_=[t1], value=[9223372036854775807]
|
||||
|--[1],[T_IDENT], str_value_=[t1], value=[9223372036854775807]
|
||||
|
||||
************** Case 180 ***************
|
||||
************** Case 176 ***************
|
||||
select unique(c1+1), c2 from t1;
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3460,7 +3422,7 @@ question_mask_size: 0
|
||||
|--[0],[T_RELATION_FACTOR], str_value_=[t1], value=[9223372036854775807]
|
||||
|--[1],[T_IDENT], str_value_=[t1], value=[9223372036854775807]
|
||||
|
||||
************** Case 181 ***************
|
||||
************** Case 177 ***************
|
||||
select distinct unique( max(c1)), c2 from t1;
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3482,7 +3444,7 @@ question_mask_size: 0
|
||||
|--[0],[T_RELATION_FACTOR], str_value_=[t1], value=[9223372036854775807]
|
||||
|--[1],[T_IDENT], str_value_=[t1], value=[9223372036854775807]
|
||||
|
||||
************** Case 182 ***************
|
||||
************** Case 178 ***************
|
||||
select unique distinct( max(c1)), c2 from t1;
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3504,9 +3466,9 @@ question_mask_size: 0
|
||||
|--[0],[T_RELATION_FACTOR], str_value_=[t1], value=[9223372036854775807]
|
||||
|--[1],[T_IDENT], str_value_=[t1], value=[9223372036854775807]
|
||||
|
||||
************** Case 183 ***************
|
||||
************** Case 179 ***************
|
||||
select unique(*) from t1;
|
||||
************** Case 184 ***************
|
||||
************** Case 180 ***************
|
||||
create tablegroup tg1 primary_zone = 'z2';
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3517,7 +3479,7 @@ question_mask_size: 0
|
||||
|--[0],[T_PRIMARY_ZONE], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_VARCHAR], str_value_=[z2], value=[9223372036854775807]
|
||||
|
||||
************** Case 185 ***************
|
||||
************** Case 181 ***************
|
||||
create tablegroup tg1 locality = 'z2';
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3528,7 +3490,7 @@ question_mask_size: 0
|
||||
|--[0],[T_LOCALITY], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_VARCHAR], str_value_=[z2], value=[9223372036854775807]
|
||||
|
||||
************** Case 186 ***************
|
||||
************** Case 182 ***************
|
||||
create tablegroup tg1 locality = 'z2', primary_zone='z2';
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3541,7 +3503,7 @@ question_mask_size: 0
|
||||
|--[1],[T_PRIMARY_ZONE], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_VARCHAR], str_value_=[z2], value=[9223372036854775807]
|
||||
|
||||
************** Case 187 ***************
|
||||
************** Case 183 ***************
|
||||
alter tablegroup tg1 set primary_zone = "z1:z2";
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3552,7 +3514,7 @@ question_mask_size: 0
|
||||
|--[0],[T_PRIMARY_ZONE], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_VARCHAR], str_value_=["z1":z2], value=[9223372036854775807]
|
||||
|
||||
************** Case 188 ***************
|
||||
************** Case 184 ***************
|
||||
alter tablegroup tg1 set locality='f@z1,f@z3';
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3563,7 +3525,7 @@ question_mask_size: 0
|
||||
|--[0],[T_LOCALITY], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_VARCHAR], str_value_=[f@z1,f@z3], value=[9223372036854775807]
|
||||
|
||||
************** Case 189 ***************
|
||||
************** Case 185 ***************
|
||||
alter tablegroup tg2 add table t1,t2;
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3576,7 +3538,7 @@ question_mask_size: 0
|
||||
|--[1],[T_RELATION_FACTOR], str_value_=[t2], value=[9223372036854775807]
|
||||
|--[1],[T_IDENT], str_value_=[t2], value=[9223372036854775807]
|
||||
|
||||
************** Case 190 ***************
|
||||
************** Case 186 ***************
|
||||
alter tablegroup tg1 set locality='f@z1,f@z3', set primary_zone = "z1:z2";
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3589,7 +3551,7 @@ question_mask_size: 0
|
||||
|--[1],[T_PRIMARY_ZONE], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_VARCHAR], str_value_=["z1":z2], value=[9223372036854775807]
|
||||
|
||||
************** Case 191 ***************
|
||||
************** Case 187 ***************
|
||||
insert into t1 values(X'');
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3605,7 +3567,7 @@ question_mask_size: 0
|
||||
|--[0],[T_HEX_STRING], str_value_=[], value=[9223372036854775807]
|
||||
|--[1],[T_INSERT], str_value_=[], value=[9223372036854775807]
|
||||
|
||||
************** Case 192 ***************
|
||||
************** Case 188 ***************
|
||||
create table t1(`thedate` date NOT NULL COMMENT '日期');
|
||||
question_mask_size: 0
|
||||
|
||||
@ -3623,7 +3585,7 @@ question_mask_size: 0
|
||||
|--[1],[T_COMMENT], str_value_=[], value=[9223372036854775807]
|
||||
|--[0],[T_VARCHAR], str_value_=[日期], value=[9223372036854775807]
|
||||
|
||||
************** Case 193 ***************
|
||||
************** Case 189 ***************
|
||||
alter system bootstrap REGION 'sys_region' ZONE 'zone1' SERVER '10.101.74.122:41425';
|
||||
question_mask_size: 0
|
||||
|
||||
|
@ -22267,166 +22267,24 @@ question_mask_size: 0
|
||||
]
|
||||
}
|
||||
************** Case 166 ***************
|
||||
drop public synonym t1;
|
||||
question_mask_size: 0
|
||||
{
|
||||
"type":"T_STMT_LIST",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":0,
|
||||
"str_val":"",
|
||||
"children": [
|
||||
{
|
||||
"type":"T_DROP_SYNONYM",
|
||||
"int_val":0,
|
||||
"str_len":0,
|
||||
"str_val":"",
|
||||
"children": [
|
||||
{
|
||||
"type":"T_PUBLIC",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":0,
|
||||
"str_val":""
|
||||
},
|
||||
{ },
|
||||
{
|
||||
"type":"T_IDENT",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":2,
|
||||
"str_val":"t1"
|
||||
},
|
||||
{ }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 167 ***************
|
||||
drop public synonym t1 force;
|
||||
question_mask_size: 0
|
||||
{
|
||||
"type":"T_STMT_LIST",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":0,
|
||||
"str_val":"",
|
||||
"children": [
|
||||
{
|
||||
"type":"T_DROP_SYNONYM",
|
||||
"int_val":0,
|
||||
"str_len":0,
|
||||
"str_val":"",
|
||||
"children": [
|
||||
{
|
||||
"type":"T_PUBLIC",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":0,
|
||||
"str_val":""
|
||||
},
|
||||
{ },
|
||||
{
|
||||
"type":"T_IDENT",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":2,
|
||||
"str_val":"t1"
|
||||
},
|
||||
{
|
||||
"type":"T_FORCE",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":0,
|
||||
"str_val":""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 168 ***************
|
||||
drop synonym t1 force;
|
||||
question_mask_size: 0
|
||||
{
|
||||
"type":"T_STMT_LIST",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":0,
|
||||
"str_val":"",
|
||||
"children": [
|
||||
{
|
||||
"type":"T_DROP_SYNONYM",
|
||||
"int_val":0,
|
||||
"str_len":0,
|
||||
"str_val":"",
|
||||
"children": [
|
||||
{ },
|
||||
{ },
|
||||
{
|
||||
"type":"T_IDENT",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":2,
|
||||
"str_val":"t1"
|
||||
},
|
||||
{
|
||||
"type":"T_FORCE",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":0,
|
||||
"str_val":""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 169 ***************
|
||||
drop synonym database1.t1 force;
|
||||
question_mask_size: 0
|
||||
{
|
||||
"type":"T_STMT_LIST",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":0,
|
||||
"str_val":"",
|
||||
"children": [
|
||||
{
|
||||
"type":"T_DROP_SYNONYM",
|
||||
"int_val":0,
|
||||
"str_len":0,
|
||||
"str_val":"",
|
||||
"children": [
|
||||
{ },
|
||||
{
|
||||
"type":"T_IDENT",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":9,
|
||||
"str_val":"database1"
|
||||
},
|
||||
{
|
||||
"type":"T_IDENT",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":2,
|
||||
"str_val":"t1"
|
||||
},
|
||||
{
|
||||
"type":"T_FORCE",
|
||||
"int_val":9223372036854775807,
|
||||
"str_len":0,
|
||||
"str_val":""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 170 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales);
|
||||
************** Case 171 ***************
|
||||
************** Case 167 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales where t2.id!= t1.id when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales);
|
||||
************** Case 172 ***************
|
||||
************** Case 168 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales where t1.id < 3 delete where t1.id < 5 when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales);
|
||||
************** Case 173 ***************
|
||||
************** Case 169 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales delete where t1.sales =2 when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales);
|
||||
************** Case 174 ***************
|
||||
************** Case 170 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales) where t2.id > 0;
|
||||
************** Case 175 ***************
|
||||
************** Case 171 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (1 = 2) when not matched then insert(t1.id, t1.sales) values(t2.id, t2.sales) where t2.id > 0;
|
||||
************** Case 176 ***************
|
||||
************** Case 172 ***************
|
||||
merge into targetTable t1 using sourceTable t2 on (t1.id = t2.id) when matched then update set t1.sales = t2.sales;
|
||||
************** Case 177 ***************
|
||||
************** Case 173 ***************
|
||||
merge into targetTable using sourceTable on (targetTable.id = sourceTable.id) when matched then update set targetTable.sales = sourceTable.sales;
|
||||
************** Case 178 ***************
|
||||
************** Case 174 ***************
|
||||
merge into targetTable using (select * from t1 ) sourceTable on (targetTable.id = sourceTable.id) when matched then update set targetTable.sales = sourceTable.sales;
|
||||
************** Case 179 ***************
|
||||
************** Case 175 ***************
|
||||
select unique(c1), c2 from t1;
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -22569,7 +22427,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 180 ***************
|
||||
************** Case 176 ***************
|
||||
select unique(c1+1), c2 from t1;
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -22726,7 +22584,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 181 ***************
|
||||
************** Case 177 ***************
|
||||
select distinct unique( max(c1)), c2 from t1;
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -22884,7 +22742,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 182 ***************
|
||||
************** Case 178 ***************
|
||||
select unique distinct( max(c1)), c2 from t1;
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23042,9 +22900,9 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 183 ***************
|
||||
************** Case 179 ***************
|
||||
select unique(*) from t1;
|
||||
************** Case 184 ***************
|
||||
************** Case 180 ***************
|
||||
create tablegroup tg1 primary_zone = 'z2';
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23093,7 +22951,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 185 ***************
|
||||
************** Case 181 ***************
|
||||
create tablegroup tg1 locality = 'z2';
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23143,7 +23001,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 186 ***************
|
||||
************** Case 182 ***************
|
||||
create tablegroup tg1 locality = 'z2', primary_zone='z2';
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23207,7 +23065,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 187 ***************
|
||||
************** Case 183 ***************
|
||||
alter tablegroup tg1 set primary_zone = "z1:z2";
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23254,7 +23112,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 188 ***************
|
||||
************** Case 184 ***************
|
||||
alter tablegroup tg1 set locality='f@z1,f@z3';
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23302,7 +23160,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 189 ***************
|
||||
************** Case 185 ***************
|
||||
alter tablegroup tg2 add table t1,t2;
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23365,7 +23223,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 190 ***************
|
||||
************** Case 186 ***************
|
||||
alter tablegroup tg1 set locality='f@z1,f@z3', set primary_zone = "z1:z2";
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23427,7 +23285,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 191 ***************
|
||||
************** Case 187 ***************
|
||||
insert into t1 values(X'');
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23519,7 +23377,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 192 ***************
|
||||
************** Case 188 ***************
|
||||
create table t1(`thedate` date NOT NULL COMMENT '日期');
|
||||
question_mask_size: 0
|
||||
{
|
||||
@ -23625,7 +23483,7 @@ question_mask_size: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
************** Case 193 ***************
|
||||
************** Case 189 ***************
|
||||
alter system bootstrap REGION 'sys_region' ZONE 'zone1' SERVER '10.101.74.122:41425';
|
||||
question_mask_size: 0
|
||||
{
|
||||
|
@ -246,12 +246,6 @@ alter system refresh time_zone_info;
|
||||
### test for limit ##
|
||||
#select emp_id, mgr_id from emp where emp_id = 1 start with emp_id = 1 connect by prior c1 = 1 group by c1 having c1 > 1 limit 10;
|
||||
|
||||
########################## test for drop synonym ###################################
|
||||
drop public synonym t1;
|
||||
drop public synonym t1 force;
|
||||
drop synonym t1 force;
|
||||
drop synonym database1.t1 force;
|
||||
|
||||
#purge index t1_index;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user