title: DROP TABLE IF EXISTS says "Unknown table"? [MySQL]
body: <p>In my python script, when I try to <code>DROP</code> a table that <strong>does not exist</strong>, using <code>DROP ... IF EXISTS</code>, I still get an error. </p>
  
  <pre><code>import mysql.connector
  cnx = mysql.connector.connect(**my_database_config)
  cursor = cnx.cursor()
  cursor.execute("DROP TABLE IF EXISTS nonexistent_table;")
  </code></pre>
  
  <p>Why is this so?</p>
  
  <pre><code>mysql.connector.errors.DatabaseError: 1051: Unknown table 'mydb.nonexistent_table'
  </code></pre>
  
  <hr>
  
  <p><strong>The full error:</strong></p>
  
  <pre><code>  File "myfile.py", line 199, in myfunction
      cursor.execute("DROP TABLE IF EXISTS nonexistent_table;")
    File "\venv\lib\site-packages\mysql\connector\cursor.py", line 551, in execute
      self._handle_result(self._connection.cmd_query(stmt))
    File "\venv\lib\site-packages\mysql\connector\cursor.py", line 470, in _handle_result
      self._handle_noresultset(result)
    File "\venv\lib\site-packages\mysql\connector\cursor.py", line 440, in _handle_noresultset
      self._warnings[0][1], self._warnings[0][2])
  mysql.connector.errors.DatabaseError: 1051: Unknown table 'mydb.nonexistent_table'
  </code></pre>
  
  <hr>
  
  <p>In <a href="https://stackoverflow.com/questions/4143686/python-and-mysqldb-using-drop-table-if-exists-seems-to-throw-exception/18276232">this related question</a> the user seems to be getting a Warning instead of an Error for similar code.</p>