[CP] checkAndInsert/auto_increment/aggregation and fix local index bug
This commit is contained in:
@ -11773,6 +11773,28 @@ TEST_F(TestBatchExecute, atomic_batch_ops)
|
||||
table = NULL;
|
||||
}
|
||||
|
||||
// create table if not exists auto_increment_defensive_test
|
||||
// (C1 bigint AUTO_INCREMENT primary key) PARTITION BY KEY(C1) PARTITIONS 16;
|
||||
TEST_F(TestBatchExecute, auto_increment_auto_increment_defensive)
|
||||
{
|
||||
OB_LOG(INFO, "begin single_insert");
|
||||
ObTable *the_table = NULL;
|
||||
int ret = service_client_->alloc_table(ObString::make_string("auto_increment_defensive_test"), the_table);
|
||||
ASSERT_EQ(OB_SUCCESS, ret);
|
||||
|
||||
ObTableEntityFactory<ObTableEntity> entity_factory;
|
||||
ObITableEntity *entity = NULL;
|
||||
entity = entity_factory.alloc();
|
||||
ASSERT_TRUE(NULL != entity);
|
||||
ObObj key;
|
||||
int key_key = 1234;
|
||||
key.set_int(key_key);
|
||||
ASSERT_EQ(OB_SUCCESS, entity->add_rowkey_value(key));
|
||||
ObTableOperation table_operation = ObTableOperation::insert(*entity);
|
||||
ObTableOperationResult r;
|
||||
ASSERT_EQ(OB_NOT_SUPPORTED, the_table->execute(table_operation, r));
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc,argv);
|
||||
|
||||
@ -62,6 +62,7 @@ mysql -h $HOST -P $PORT -u $user -e "drop table if exists query_sync_multi_task_
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists query_with_filter; create table if not exists query_with_filter (C1 bigint primary key, C2 bigint, C3 varchar(100), C4 double default 0);" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists query_and_mutate; create table if not exists query_and_mutate (C1 bigint primary key, C2 bigint, C3 varchar(100), C4 double default 0);" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists atomic_batch_ops; create table if not exists atomic_batch_ops (C1 bigint, C2 varchar(128), C3 varbinary(1024) default null, C4 bigint not null default -1, primary key(C1), UNIQUE KEY idx_c2c4 (C2, C4));" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists auto_increment_defensive_test; create table if not exists auto_increment_defensive_test (C1 bigint AUTO_INCREMENT primary key) PARTITION BY KEY(C1) PARTITIONS 16;" $db
|
||||
|
||||
# INDEX idx1(C1, C2)
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists execute_query_test; create table if not exists execute_query_test (PK1 bigint, PK2 bigint, C1 bigint, C2 varchar(100), C3 bigint, PRIMARY KEY(PK1, PK2));" $db
|
||||
|
||||
Reference in New Issue
Block a user