Skip to content

Commit be9dcae

Browse files
committed
chore: codefmt
1 parent e8597cf commit be9dcae

File tree

4 files changed

+51
-21
lines changed

4 files changed

+51
-21
lines changed

src/query/service/src/interpreters/interpreter_sequence_create.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl CreateSequenceInterpreter {
4848
let _reply = catalog.create_sequence(req.clone()).await?;
4949

5050
// Grant ownership as the current role
51-
if skip_privilege_check
51+
if !skip_privilege_check
5252
&& ctx
5353
.get_settings()
5454
.get_enable_experimental_sequence_privilege_check()?

src/query/service/src/interpreters/interpreter_sequence_drop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl DropSequenceInterpreter {
4747
let catalog = ctx.get_default_catalog()?;
4848
// we should do `drop ownership` after actually drop object, and object maybe not exists.
4949
// drop the ownership
50-
if skip_skip_privilege_check
50+
if !skip_skip_privilege_check
5151
&& ctx
5252
.get_settings()
5353
.get_enable_experimental_sequence_privilege_check()?

tests/sqllogictests/suites/base/05_ddl/05_0000_ddl_create_tables.test

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -685,12 +685,6 @@ select '\'0\'' = a from t
685685
statement error 1075
686686
create or replace table t(id int) compression='xxxx';
687687

688-
statement ok
689-
create database test_autoincrement;
690-
691-
statement ok
692-
use test_autoincrement;
693-
694688
statement error 1065
695689
create or replace table t11 (c1 int, c2 string autoincrement);
696690

@@ -782,16 +776,3 @@ select interval, current, comment from show_sequences();
782776
1 4 NULL
783777
2 9 NULL
784778
2 9 NULL
785-
786-
statement ok
787-
set data_retention_time_in_days = 0
788-
789-
statement ok
790-
vacuum drop table from test_autoincrement;
791-
792-
query TIITTT
793-
select name, interval, current, comment from show_sequences();
794-
----
795-
796-
statement ok
797-
drop database test_autoincrement
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Copyright 2023 Databend Cloud
2+
##
3+
## Licensed under the Elastic License, Version 2.0 (the "License");
4+
## you may not use this file except in compliance with the License.
5+
## You may obtain a copy of the License at
6+
##
7+
## https://www.elastic.co/licensing/elastic-license
8+
##
9+
## Unless required by applicable law or agreed to in writing, software
10+
## distributed under the License is distributed on an "AS IS" BASIS,
11+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
## See the License for the specific language governing permissions and
13+
## limitations under the License.
14+
15+
statement ok
16+
create database test_autoincrement;
17+
18+
statement ok
19+
use test_autoincrement;
20+
21+
statement ok
22+
create or replace table t11 (c1 int, c2 int autoincrement, c3 float autoincrement, c4 int identity (1,2), c5 int autoincrement start 1 increment 2);
23+
24+
statement ok
25+
insert into t11 (c1) values(0);
26+
27+
statement ok
28+
drop table t11;
29+
30+
query TIITTT
31+
select interval, current, comment from show_sequences();
32+
----
33+
1 1 NULL
34+
1 1 NULL
35+
2 3 NULL
36+
2 3 NULL
37+
38+
statement ok
39+
set data_retention_time_in_days = 0
40+
41+
statement ok
42+
vacuum drop table from test_autoincrement;
43+
44+
query TIITTT
45+
select interval, current, comment from show_sequences();
46+
----
47+
48+
statement ok
49+
drop database test_autoincrement

0 commit comments

Comments
 (0)