When clicking on the Data tab of a table, a query is made automatically, with the last entered filter condition. The filter condition may contain predicates which will result in a long running query. There is no way to interrupt the query of the Data tab (the usual button is grayed out). Once predicates were entered, which result in long running query, you end up in a loophole: First, you wait a little, then kill HeidiSQL, then want to rectify the bad predicates by clicking the Data tab, then wait a little, then kill HeidiSQL, …
HeidiSQL should offer to interrupt the query of the Data tab and/or a setting to disable automated search when clicking the Data tab.