47 lines
1.9 KiB
Plaintext
47 lines
1.9 KiB
Plaintext
# TestAlterTableAttributes
|
|
drop table if exists alter_t;
|
|
create table alter_t (c int);
|
|
alter table alter_t attributes="merge_option=allow";
|
|
alter table alter_t attributes="merge_option=allow,key=value";
|
|
alter table alter_t attributes=" merge_option=allow ";
|
|
alter table alter_t attributes=" merge_option = allow , key = value ";
|
|
alter table alter_t attributes " merge_option=allow ";
|
|
alter table alter_t attributes " merge_option=allow , key=value ";
|
|
drop table alter_t;
|
|
|
|
# TestDropSchema
|
|
drop database if exists ddl__attributes_sql_test;
|
|
create database ddl__attributes_sql_test;
|
|
use ddl__attributes_sql_test;
|
|
create table drop_s1 (c int)
|
|
PARTITION BY RANGE (c) (
|
|
PARTITION p0 VALUES LESS THAN (6),
|
|
PARTITION p1 VALUES LESS THAN (11)
|
|
);
|
|
create table drop_s2 (c int);
|
|
alter table drop_s1 attributes="key=value";
|
|
alter table drop_s1 partition p0 attributes="key1=value1";
|
|
alter table drop_s2 attributes="key=value";
|
|
select count(*) from information_schema.attributes where ID like 'schema/ddl__attributes_sql_test%';
|
|
drop database ddl__attributes_sql_test;
|
|
select count(*) from information_schema.attributes where ID like 'schema/ddl__attributes_sql_test%';
|
|
use ddl__attributes_sql;
|
|
|
|
# TestDefaultKeyword
|
|
drop table if exists def;
|
|
create table def (c int)
|
|
PARTITION BY RANGE (c) (
|
|
PARTITION p0 VALUES LESS THAN (6),
|
|
PARTITION p1 VALUES LESS THAN (11)
|
|
);
|
|
# add attributes
|
|
alter table def attributes="key=value";
|
|
alter table def partition p0 attributes="key1=value1";
|
|
select count(*) from information_schema.attributes where ID like 'schema/ddl__attributes_sql/def%';
|
|
# reset the partition p0's attribute
|
|
alter table def partition p0 attributes=default;
|
|
select count(*) from information_schema.attributes where ID like 'schema/ddl__attributes_sql/def%';
|
|
# reset the table def's attribute
|
|
alter table def attributes=default;
|
|
select count(*) from information_schema.attributes where ID like 'schema/ddl__attributes_sql/def%';
|