Different query result from preview and run

Hi, I'm experiencing this odd situation in my query result from MySQL.

So my MySQL table has six rows when I run this query:

SELECT * FROM mytable WHERE cd_lst_id = 'col_delim_char';

My select_codes query is a query from the query library.

SELECT * FROM mytable WHERE cd_lst_id in ( {{variable0}} ); -- 'col_delim_char' is included in variable0 in my app

What I'm experiencing with this query is...

  1. I got only three rows when I "run" the query.
  2. I got six rows when I "preview" the same query.

Invalidating the query didn't make any difference. (preview gives six rows, run gives three rows)
After deleting my browser's cache, both preview and run give three rows. :exploding_head:

What I tried next was to make another new query new_query with the same query.
I assumed this query will give me six records, but this one gives me three rows in preview and run both.

When I checked if the results are from cache, it says select_codes used cache and new_query didn't.
query_monitoring

I'm totally stuck. Any help would be appreciated.

My bad, the situation above was caused because of the data difference between our staging and production DB.