Skip to content

Commit

Permalink
improve auto generated fullstack tests (#3592)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidezhu authored Dec 6, 2021
1 parent 635e2b0 commit 953dd99
Show file tree
Hide file tree
Showing 4 changed files with 565 additions and 463 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,6 @@ libs/libtiflash-proxy

tmp/

tests/fullstack-test2/auto_gen

CoverageReport
21 changes: 11 additions & 10 deletions tests/fullstack-test2/ddl/binary_default_value.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ mysql> alter table test.t add column b1 binary(8) not null;
mysql> alter table test.t add column b2 binary(8) default X'3132';
mysql> alter table test.t add column b3 binary(8) not null default X'003132';
mysql> alter table test.t add column b4 binary(8) not null default X'0031323334353637';
mysql> alter table test.t add column b5 varbinary(8) not null default X'0031323334353637';

mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t;
+------+------------------+----------------+----------------+-----------+
| a | b1 | b2 | b3 | b4 |
+------+------------------+------------------+----------------+-----------+
| 1 | \0\0\0\0\0\0\0\0 | 12\0\0\0\0\0\0 | \012\0\0\0\0\0 | \01234567 |
+------+------------------+----------------+----------------+-----------+
+------+------------------+----------------+----------------+-----------+-----------+
| a | b1 | b2 | b3 | b4 | b5 |
+------+------------------+------------------+----------------+-----------+-----------+
| 1 | \0\0\0\0\0\0\0\0 | 12\0\0\0\0\0\0 | \012\0\0\0\0\0 | \01234567 | \01234567 |
+------+------------------+----------------+----------------+-----------+-----------+

mysql> set session tidb_isolation_read_engines='tikv'; select * from test.t;
+------+------------------+----------------+----------------+-----------+
| a | b1 | b2 | b3 | b4 |
+------+------------------+----------------+----------------+-----------+
| 1 | \0\0\0\0\0\0\0\0 | 12\0\0\0\0\0\0 | \012\0\0\0\0\0 | \01234567 |
+------+------------------+----------------+----------------+-----------+
+------+------------------+----------------+----------------+-----------+-----------+
| a | b1 | b2 | b3 | b4 | b5 |
+------+------------------+----------------+----------------+-----------+-----------+
| 1 | \0\0\0\0\0\0\0\0 | 12\0\0\0\0\0\0 | \012\0\0\0\0\0 | \01234567 | \01234567 |
+------+------------------+----------------+----------------+-----------+-----------+

mysql> drop table if exists test.t
14 changes: 14 additions & 0 deletions tests/fullstack-test2/dml/text_blob_type.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
mysql> drop table if exists test.t
mysql> create table test.t(a text, b blob)
mysql> alter table test.t set tiflash replica 1

func> wait_table test t

mysql> insert into test.t values('test1', '01223');

mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t;
+-------+--------------+
| a | b |
+-------+--------------+
| test1 | 01223 |
+-------+--------------+
Loading

0 comments on commit 953dd99

Please sign in to comment.