Skip to content

Commit

Permalink
tests: fix br_views_and_sequences (#27740)
Browse files Browse the repository at this point in the history
YuJuncen authored Sep 2, 2021
1 parent afca764 commit 72acdb4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions br/tests/br_views_and_sequences/run.sh
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ run_sql "insert into $DB.auto_inc values (), (), (), (), ();"
last_id=$(run_sql "select n from $DB.auto_inc order by n desc limit 1" | trim_sql_result)

run_sql "create table $DB.auto_rnd (n BIGINT primary key AUTO_RANDOM(8));"
last_rnd_id=$(run_sql "insert into $DB.auto_rnd values (), (), (), (), ();select last_insert_id() & 0xffffffffffffff;" | trim_sql_result )
last_rnd_id=$(run_sql "insert into $DB.auto_rnd values (), (), (), (), ();select last_insert_id() & 0x7fffffffffffff;" | trim_sql_result )

echo "backup start..."
run_br backup db --db "$DB" -s "local://$TEST_DIR/$DB" --pd $PD_ADDR
@@ -61,10 +61,10 @@ seq_val=$(run_sql "select a >= 8 and b >= 4 as g from $DB.table_2 where c = 33;"
run_sql "insert into $DB.auto_inc values ();"
last_id_after_restore=$(run_sql "select n from $DB.auto_inc order by n desc limit 1;" | trim_sql_result)
[ $last_id_after_restore -gt $last_id ]
rnd_last_id_after_restore=$(run_sql "insert into $DB.auto_rnd values ();select last_insert_id() & 0xffffffffffffff;" | trim_sql_result )
rnd_last_id_after_restore=$(run_sql "insert into $DB.auto_rnd values ();select last_insert_id() & 0x7fffffffffffff;" | trim_sql_result )
[ $rnd_last_id_after_restore -gt $last_rnd_id ]
rnd_count_after_restore=$(run_sql "select count(*) from $DB.auto_rnd;" | trim_sql_result )
[ $rnd_count_after_restore -gt 5 ]


run_sql "drop schema $DB"
run_sql "drop schema $DB"

0 comments on commit 72acdb4

Please sign in to comment.