title: MySQL Node.js Query Ends, no Callback
body: <p>I'm using <code>mysql</code> for node.js.</p>
  
  <p>This query checks if a column has all <code>NULL</code> values, by checking if at least one row is not <code>NULL</code>.</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT 1 FROM `table` WHERE `column` IS NOT NULL LIMIT 1
  </code></pre>
  
  <p>If the column has all <code>NULL</code> values, this query ends in the SQL processlist after a few seconds (~120), but I never get a callback from the js code:</p>
  
  <pre><code>import {createPool as mysqlCreatePool, MysqlError} from 'mysql';
  
  const db = mysqlCreatePool({...})
  
  const query = db.query(sql, undefined, function (err: MysqlError | null, res?: any) {
    console.log(err, res);
  });
  
  query.on('end', () =&gt; console.log("end"));
  </code></pre>
  
  <p>(Nothing is ever printed in the console)</p>