[CP] tableapi query_and_mutate & batch atomic & select all column default & is/is_not
This commit is contained in:
@ -287,6 +287,7 @@ int ObTableRpcImpl::batch_execute(const ObTableBatchOperation &batch_operation,
|
||||
request.returning_affected_rows_ = request_options.returning_affected_rows();
|
||||
request.returning_affected_entity_ = request_options.returning_affected_entity();
|
||||
request.returning_rowkey_ = request_options.returning_rowkey();
|
||||
request.batch_operation_as_atomic_ = request_options.batch_operation_as_atomic();
|
||||
if (REACH_TIME_INTERVAL(10*1000*1000)) {
|
||||
// TODO: we can not print the tenat memory usage now.
|
||||
// ObTenantManager::get_instance().print_tenant_usage();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -27,6 +27,7 @@ db=test
|
||||
echo run test...
|
||||
rm -f libobtable.log
|
||||
# table api
|
||||
mysql -h $HOST -P $PORT -u $user -e "alter system set _enable_defensive_check = true;"
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists batch_execute_test; create table if not exists batch_execute_test (C1 bigint primary key, C2 bigint, C3 varchar(100)) PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists complex_batch_execute_test; create table if not exists complex_batch_execute_test (C1 bigint primary key, C2 bigint, C3 varchar(100)) PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists all_single_operation_test; create table if not exists all_single_operation_test (C1 bigint primary key, C2 bigint, C3 varchar(100)) PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
@ -52,7 +53,7 @@ mysql -h $HOST -P $PORT -u $user -e "drop table if exists single_delete_test; cr
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists single_replace_test; create table if not exists single_replace_test (C1 bigint primary key, C2 double, C3 varchar(100) default 'hello world') PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists replace_unique_key_test; create table if not exists replace_unique_key_test (C1 bigint primary key, C2 double, C3 varchar(100) default 'hello world', unique index i1(c2) local)" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists multi_replace_test; create table if not exists multi_replace_test (C1 bigint primary key, C2 bigint, C3 varchar(100) default 'hello world', unique index i1(c2) local)" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists single_insert_up_test; create table if not exists single_insert_up_test (C1 bigint primary key, C2 double, C3 varchar(100) default 'hello world') PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists single_insert_up_test; create table if not exists single_insert_up_test (C1 bigint primary key, C2 double, C3 varchar(100) default 'hello world', UNIQUE KEY idx_c2 (C2))" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists multi_insert_or_update_test; create table if not exists multi_insert_or_update_test (C1 bigint primary key, C2 bigint, C3 varchar(100) default 'hello world') PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists kv_query_test; create table if not exists kv_query_test (C1 bigint, C2 bigint, C3 bigint, PRIMARY KEY(C1, C2), KEY idx_c2 (C2), KEY idx_c3 (C3), KEY idx_c2c3(C2, C3));" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists virtual_generate_col_test; create table if not exists virtual_generate_col_test (C1 bigint primary key, C2 bigint, C3 varchar(100), C3_PREFIX varchar(10) GENERATED ALWAYS AS (substr(C3,1,2)))" $db
|
||||
@ -64,6 +65,9 @@ mysql -h $HOST -P $PORT -u $user -e "drop table if exists query_sync_multi_batch
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists large_scan_query_sync_test; create table if not exists large_scan_query_sync_test (C1 bigint primary key, C2 bigint, C3 varchar(100));" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists query_sync_with_index_test; create table if not exists query_sync_with_index_test (C1 bigint, C2 bigint, C3 bigint, primary key(C1, C2), KEY idx_c2 (C2), KEY idx_c3 (C3), KEY idx_c2c3(C2, C3));" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists query_sync_multi_task_test; create table if not exists query_sync_multi_task_test (C1 bigint primary key, C2 bigint, C3 varchar(100));" $db
|
||||
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
|
||||
|
||||
# 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
|
||||
@ -84,7 +88,7 @@ mysql -h $HOST -P $PORT -u $user -e "drop table if exists htable1_cf1_empty_cq;
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists htable1_query_sync; create table if not exists htable1_query_sync (K varbinary(1024), Q varbinary(256), T bigint, V varbinary(1024), primary key(K, Q, T));" $db
|
||||
|
||||
# run
|
||||
./test_table_api "$HOST" "$PORT" "$tenant_name" "$user_name" "$passwd" "$db" "$table_name" $RPCPORT
|
||||
./test_table_api "$HOST" "$PORT" "$tenant_name" "$user_name" "$passwd" "$db" "$table_name" $RPCPORT #--gtest_filter=TestBatchExecute.
|
||||
# round2 with index
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists batch_execute_test; create table if not exists batch_execute_test (C1 bigint primary key, C2 bigint, C3 varchar(100), index i1(c2) local, index i2(c3) local, index i3(c2, c3)) PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists complex_batch_execute_test; create table if not exists complex_batch_execute_test (C1 bigint primary key, C2 bigint, C3 varchar(100), index i1(c2) local, index i2(c3) local, index i3(c2, c3)) PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
@ -110,7 +114,7 @@ mysql -h $HOST -P $PORT -u $user -e "drop table if exists update_generate_test;
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists single_delete_test; create table if not exists single_delete_test (C1 bigint primary key, C2 double, C3 varchar(100) default 'hello world', index i1(c2) local, index i2(c3) local, index i3(c2, c3)) PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists single_replace_test; create table if not exists single_replace_test (C1 bigint primary key, C2 double, C3 varchar(100) default 'hello world',index i1(c2) local, index i2(c3) local, index i3(c2, c3)) PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists replace_unique_key_test; create table if not exists replace_unique_key_test (C1 bigint primary key, C2 double, C3 varchar(100) default 'hello world', unique index i1(c2) local)" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists single_insert_up_test; create table if not exists single_insert_up_test (C1 bigint primary key, C2 double, C3 varchar(100) default 'hello world', index i1(c2) local, index i2(c3) local, index i3(c2, c3)) PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists single_insert_up_test; create table if not exists single_insert_up_test (C1 bigint primary key, C2 double, C3 varchar(100) default 'hello world', UNIQUE KEY idx_c2 (C2))" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists multi_insert_or_update_test; create table if not exists multi_insert_or_update_test (C1 bigint primary key, C2 bigint, C3 varchar(100) default 'hello world', index i1(c2) local, index i2(c3) local, index i3(c2, c3)) PARTITION BY KEY(C1) PARTITIONS 16" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists kv_query_test; create table if not exists kv_query_test (C1 bigint, C2 bigint, C3 bigint, PRIMARY KEY(C1, C2), KEY idx_c2 (C2), KEY idx_c3 (C3), KEY idx_c2c3(C2, C3));" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists check_scan_range_test; create table if not exists check_scan_range_test (C1 bigint, C2 varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin, C3 bigint, PRIMARY KEY(C1, C2), KEY idx_c3 (C3));" $db
|
||||
@ -122,6 +126,10 @@ mysql -h $HOST -P $PORT -u $user -e "drop table if exists query_sync_multi_batch
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists large_scan_query_sync_test; create table if not exists large_scan_query_sync_test (C1 bigint primary key, C2 bigint, C3 varchar(100));" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists query_sync_with_index_test; create table if not exists query_sync_with_index_test (C1 bigint, C2 bigint, C3 bigint, primary key(C1, C2), KEY idx_c2 (C2), KEY idx_c3 (C3), KEY idx_c2c3(C2, C3));" $db
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists query_sync_multi_task_test; create table if not exists query_sync_multi_task_test (C1 bigint primary key, C2 bigint, C3 varchar(100));" $db
|
||||
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
|
||||
|
||||
# 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
|
||||
mysql -h $HOST -P $PORT -u $user -e "drop table if exists secondary_index_test; create table if not exists secondary_index_test (C1 bigint primary key, C2 bigint, C3 varchar(100), index i1(c2) local, index i2(c3) local, index i3(c2, c3) local)" $db
|
||||
|
||||
Reference in New Issue
Block a user