Today I noticed a very strange issue where if I cat a SQL file and then pipe it to MySQL client, replication doesn't happen. These MySQL statements aren't also written to the binlog. But replication happens when I source the file from inside of the command line and binlogs are fine too.
To sum up, replication doesn't happen when I do:
cat file.sql | mysql -u<user> -p
Why could this be?