Skip to content

Commit

Permalink
refine test
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleFall committed Feb 9, 2023
1 parent 153ea48 commit f1a9064
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions tests/tidb-ci/fullstack-test-dt/issue_1425.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# mysql> drop table if exists test.t;
#
# mysql> create table test.t (id int, value decimal(7,4), c1 int, c2 int);
#
# mysql> insert into test.t values(1,1.9286,54,28);
#
# mysql> alter table test.t set tiflash replica 1;
#
# func> wait_table test t
#
# mysql> use test; set session tidb_isolation_read_engines='tiflash'; select * from t where value = 54/28;
#
# mysql> use test; set session tidb_isolation_read_engines='tiflash'; select * from t where value = c1/c2;
#
# mysql> drop table if exists test.t;
mysql> drop table if exists test.t;

mysql> create table test.t (id int, value decimal(7,4), c1 int, c2 int);

mysql> insert into test.t values (1,1.9285,54,28), (1,1.9286,54,28);

mysql> alter table test.t set tiflash replica 1;

func> wait_table test t

# note: ref to https://github.com/pingcap/tiflash/issues/1682,
# The precision of tiflash results is different from that of tidb, which is a compatibility issue
mysql> use test; set session tidb_isolation_read_engines='tiflash'; select * from t where value = 54/28;
mysql> use test; set session tidb_isolation_read_engines='tiflash'; select * from t where value = c1/c2;
+------+--------+------+------+
| id | value | c1 | c2 |
+------+--------+------+------+
| 1 | 1.9286 | 54 | 28 |
+------+--------+------+------+

mysql> drop table if exists test.t;

0 comments on commit f1a9064

Please sign in to comment.