diff --git a/tests/auto_random_default/run.sh b/tests/auto_random_default/run.sh index 04d46ca21..499cb27d5 100644 --- a/tests/auto_random_default/run.sh +++ b/tests/auto_random_default/run.sh @@ -45,9 +45,12 @@ for backend in tidb importer local; do NEXT_AUTO_RAND_VAL=28 fi - - run_sql "select count(distinct id >> 58) as count from auto_random.t" - check_contains "count: 2" + # tidb backend randomly generate the auto-random bit for each statement, so with 2 statements, + # the distinct auto_random prefix values can be 1 or 2, so we skip this check with tidb backend + if [ "$backend" != 'tidb' ]; then + run_sql "select count(distinct id >> 58) as count from auto_random.t" + check_contains "count: 2" + fi # auto random base is 4 run_sql "SELECT max(id & b'000001111111111111111111111111111111111111111111111111111111111') >= $NEXT_AUTO_RAND_VAL as ge FROM auto_random.t"