title: How to find missing time value(s) in a given range in MySQL database?
body: <p>Let's say I have a table like this:</p>
  
  <pre><code>|    id |    mtime |
  ...
  |   101 | 12:00:00 |
  |   102 | 12:01:00 |
  |   103 | 12:03:00 |
  |   104 | 12:07:00 |
  |   105 | 12:08:00 |
  |   106 | 13:00:00 |
  ...
  </code></pre>
  
  <p>Is there a way to query the table (range 12:00:00-13:00:00) to get a set <strong>with missing values</strong> like this:</p>
  
  <pre><code>|    mtime |
  | 12:02:00 |
  | 12:04:00 |
  | 12:05:00 |
  | 12:06:00 |
  | 12:09:00 |
  | 12:10:00 |
  ...
  | 12:59:00 |
  </code></pre>
  
  <p>or at least first empty occurance:</p>
  
  <pre><code>|    mtime |
  | 12:02:00 |
  </code></pre>
  
  <p>or last consecutive value, that breaks the chain:</p>
  
  <pre><code>|    mtime |
  | 12:01:00 |
  </code></pre>
  
  <p>I was thinking about using <code>ADDTIME(time, '00:01:00')</code> somewhere in the query but I can't figure it out. Right now I barely believe it's achievable without more complex coding and multiple queries, but I hope I'm missing something.</p>