Can you "withdraw your application to enter" in the United States without a permanent black mark on your record, even on air travel?

In my opinion, thanks to uncomfortably lax privacy laws in the US. In the USA, immigration officials may require that you allow them to search your phone. If you have fingerprint unlocking, they can force it directly, but if it's an access code, you can reject it. Naturally, if you refuse, they probably won't admit you. Is it possible to return without having a permanent black mark on your record? E.g. Pay your own plane tickets and go home without a technically refusal there? Or will you have to accept your phone search if you want any chance of returning to the United States (or even any of the other five eyes)?

optimization – Mysql: extremely strange index behavior in "SELECT WHERE TO ENTER"?

I've been stuck for a moment in a couple of very strange index options of mysql.
I have a table with 500 million entries and the main key is an automatic identification of inc.

Original query: "select id from the table WHERE id in (x, x, x, x, x, x)"

When I use a 2000 ID list, it works perfectly fine:

    EXPLAIN
{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "902.03"
    },
    "table": {
      "table_name": "table",
      "access_type": "range",
      "possible_keys": (
        "PRIMARY"
      ),
      "key": "PRIMARY",
      "used_key_parts": (
        "id"
      ),
      "key_length": "4",
      "rows_examined_per_scan": 2001,
      "rows_produced_per_join": 2001,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "701.93",
        "eval_cost": "200.10",
        "prefix_cost": "902.03",
        "data_read_per_join": "31M"
      },
      "used_columns": (
        "id"
      ),

Now all I did was add another 1000 identifiers to the SAME query:

EXPLAIN
{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "48429076.70"
    },
    "table": {
      "table_name": "table",
      "access_type": "index",
      "possible_keys": (
        "PRIMARY"
      ),
      "key": "intern_id_hash",
      "used_key_parts": (
        "intern_id_hash"
      ),
      "key_length": "5",
      "rows_examined_per_scan": 452740737,
      "rows_produced_per_join": 226370368,
      "filtered": "50.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "25792039.85",
        "eval_cost": "22637036.85",
        "prefix_cost": "48429076.70",
        "data_read_per_join": "3T"
      },
      "used_columns": (
        "id"
      ),

When I add "FORCE INDEX (PRIMARY)" it shows the 1300 query cost and it works fine.
& # 39; intern_id_hash & # 39; it is an index in an unused column (for historical reasons still present)

Question:
What the hell is happening with the query optimizer that two identical primary identification queries with a different number of integers in the IN () clause suddenly do not work correctly?