Skip to content

Commit

Permalink
feat(tianmu): add show engine tianmu delta status instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
streakyPorker authored and Nliver committed Oct 17, 2023
1 parent dca8600 commit 9b533af
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
55 changes: 55 additions & 0 deletions mysql-test/suite/tianmu/r/issue1359.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
DROP DATABASE IF EXISTS issue1359_test;
CREATE DATABASE issue1359_test;
USE issue1359_test;
create table t1(v1 int) engine=tianmu;
create table t2(v2 int) engine=tianmu;
create table t3(v3 int) engine=tianmu;
insert into t1 values (1),(1);
insert into t2 values (2),(2),(2);
insert into t3 values (3),(3),(3),(3);
SHOW ENGINE Tianmu Delta STATUS;
Type Name Status
TIANMU DELTA
3 table(s) matched in the delta sync-stat query:
table name: issue1359_test.t3, delta table id: 258, current load id: 0, merge id: 0, current row_id: 0
table name: issue1359_test.t1, delta table id: 256, current load id: 0, merge id: 0, current row_id: 0
table name: issue1359_test.t2, delta table id: 257, current load id: 0, merge id: 0, current row_id: 0

SHOW ENGINE Tianmu Delta t1 STATUS;
Type Name Status
TIANMU DELTA
1 table(s) matched in the delta sync-stat query:
table name: issue1359_test.t1, delta table id: 256, current load id: 0, merge id: 0, current row_id: 0

SHOW ENGINE Tianmu Delta t1,t2 STATUS;
Type Name Status
TIANMU DELTA
2 table(s) matched in the delta sync-stat query:
table name: issue1359_test.t1, delta table id: 256, current load id: 0, merge id: 0, current row_id: 0
table name: issue1359_test.t2, delta table id: 257, current load id: 0, merge id: 0, current row_id: 0

SHOW ENGINE Tianmu Delta t1,t2,badName STATUS;
Type Name Status
TIANMU DELTA
2 table(s) matched in the delta sync-stat query:
table name: issue1359_test.t1, delta table id: 256, current load id: 0, merge id: 0, current row_id: 0
table name: issue1359_test.t2, delta table id: 257, current load id: 0, merge id: 0, current row_id: 0

SHOW ENGINE Tianmu DELTA STATUS;
Type Name Status
TIANMU DELTA
3 table(s) matched in the delta sync-stat query:
table name: issue1359_test.t3, delta table id: 258, current load id: 0, merge id: 0, current row_id: 0
table name: issue1359_test.t1, delta table id: 256, current load id: 0, merge id: 0, current row_id: 0
table name: issue1359_test.t2, delta table id: 257, current load id: 0, merge id: 0, current row_id: 0

SHOW ENGINE Tianmu delta STATUS;
Type Name Status
TIANMU DELTA
3 table(s) matched in the delta sync-stat query:
table name: issue1359_test.t3, delta table id: 258, current load id: 0, merge id: 0, current row_id: 0
table name: issue1359_test.t1, delta table id: 256, current load id: 0, merge id: 0, current row_id: 0
table name: issue1359_test.t2, delta table id: 257, current load id: 0, merge id: 0, current row_id: 0

DROP TABLE t1,t2,t3;
DROP DATABASE issue1359_test;
40 changes: 40 additions & 0 deletions mysql-test/suite/tianmu/t/issue1359.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
--source include/have_tianmu.inc

--disable_warnings

DROP DATABASE IF EXISTS issue1359_test;
CREATE DATABASE issue1359_test;

USE issue1359_test;

# create test table & data

create table t1(v1 int) engine=tianmu;
create table t2(v2 int) engine=tianmu;
create table t3(v3 int) engine=tianmu;

insert into t1 values (1),(1);
insert into t2 values (2),(2),(2);
insert into t3 values (3),(3),(3),(3);


# show engine status

SHOW ENGINE Tianmu Delta STATUS;

SHOW ENGINE Tianmu Delta t1 STATUS;

SHOW ENGINE Tianmu Delta t1,t2 STATUS;

SHOW ENGINE Tianmu Delta t1,t2,badName STATUS;


SHOW ENGINE Tianmu DELTA STATUS;
SHOW ENGINE Tianmu delta STATUS;


## clean test table

DROP TABLE t1,t2,t3;

DROP DATABASE issue1359_test;

0 comments on commit 9b533af

Please sign in to comment.