Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bvt case for double-exec in CI ACTION #9956

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions test/distributed/cases/log/query_tae_table.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
create account if not exists `query_tae_table` ADMIN_NAME 'admin' IDENTIFIED BY '123456';
set @ts=now();
drop database if exists `query_tae_table`;
create database `query_tae_table`;
/*issue_8168*/use query_tae_table;select syntax error stmt;
Expand Down Expand Up @@ -35,12 +36,12 @@ select 1
select account, statement from system.statement_info where statement = 'insert into query_tae_table values (1)' and statement_id = @uuid_insert_table limit 1;
account statement
query_tae_table insert into query_tae_table values (1)
select IF(span_kind="internal", 1, IF(span_kind="statement", 1, IF(span_kind="session", 1, IF(span_kind="remote", 1, 0)))) as exist from system.rawlog where `raw_item` = "log_info" limit 1;
exist
1
select status, err_code, error from system.statement_info where account = 'query_tae_table' and statement in ('use query_tae_table', 'select syntax error stmt', '/*issue_8168*/use query_tae_table') and status != 'Running' order by request_at desc limit 3;
select status, err_code, error from system.statement_info where account = 'query_tae_table' and statement in ('use query_tae_table', 'select syntax error stmt', '/*issue_8168*/use query_tae_table') and status != 'Running' and request_at > @ts order by request_at desc limit 3;
status err_code error
Failed 20303 SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 58 near " stmt;";
Failed 20303 SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 58 near " stmt;";
Success 0
select IF(span_kind="internal", 1, IF(span_kind="statement", 1, IF(span_kind="session", 1, IF(span_kind="remote", 1, 0)))) as exist from system.rawlog where `raw_item` = "log_info" limit 1;
exist
1
drop account `query_tae_table`;
9 changes: 6 additions & 3 deletions test/distributed/cases/log/query_tae_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
-- this case only success in linux, not in drawin
create account if not exists `query_tae_table` ADMIN_NAME 'admin' IDENTIFIED BY '123456';


-- @session:id=1&user=query_tae_table:admin:accountadmin&password=123456
set @ts=now();
drop database if exists `query_tae_table`;
create database `query_tae_table`;
/*issue_8168*/use query_tae_table;select syntax error stmt;
Expand Down Expand Up @@ -34,13 +36,14 @@ select account from system.statement_info where statement_id = @uuid_create_tabl
select statement from system.statement_info where statement_id in (@uuid_hide_1, @uuid_hide_2, @uuid_hide_3, @uuid_hide_4);

select account, statement from system.statement_info where statement = 'insert into query_tae_table values (1)' and statement_id = @uuid_insert_table limit 1;

-- case: fix issue 8168, with syntax error
select status, err_code, error from system.statement_info where account = 'query_tae_table' and statement in ('use query_tae_table', 'select syntax error stmt', '/*issue_8168*/use query_tae_table') and status != 'Running' and request_at > @ts order by request_at desc limit 3;

-- @session

-- case: select span_kind issue #7571
select IF(span_kind="internal", 1, IF(span_kind="statement", 1, IF(span_kind="session", 1, IF(span_kind="remote", 1, 0)))) as exist from system.rawlog where `raw_item` = "log_info" limit 1;

-- case: fix issue 8168, with syntax error
select status, err_code, error from system.statement_info where account = 'query_tae_table' and statement in ('use query_tae_table', 'select syntax error stmt', '/*issue_8168*/use query_tae_table') and status != 'Running' order by request_at desc limit 3;

-- clean
drop account `query_tae_table`;