title: MySQL: create a function but it already exists
body: <p>MySQL Server version: 5.1.73 Source distribution.</p>
  
  <p>I can't create a <em>function</em>, it is still exists after I drop it.</p>
  
  <p>Drop the function first:</p>
  
  <blockquote>
  <pre><code>mysql&gt; drop function if exists `xapps_f20160817`;
  Query OK, 0 rows affected, 1 warning (0.00 sec)
  
  mysql&gt; show warnings;
  +-------+------+-----------------------------------------+
  | Level | Code | Message                                 |
  +-------+------+-----------------------------------------+
  | Note  | 1305 | FUNCTION xapps_f20160817 does not exist |
  +-------+------+-----------------------------------------+
  1 row in set (0.00 sec)
  </code></pre>
  </blockquote>
  
  <p>But It still alive when I create it again.</p>
  
  <blockquote>
  <pre><code>mysql&gt; create function `xapps_f20160817`(
      -&gt; `_time` varchar(30),
      -&gt; `_rpid` varchar(10),
      -&gt; `_mvsz` varchar(10),
      -&gt; `_rvsz` varchar(10),
      -&gt; `_ncpu` varchar(10),
      -&gt; `_rcpu` varchar(10),
      -&gt; `_appn` varchar(64)
      -&gt; )  RETURNS BIGINT READS SQL DATA
      -&gt; BEGIN
      -&gt; insert into `20160817`(time, rpid, mvsz, rvsz, ncpu, rcpu, appn)
      -&gt; values(_time, _rpid, _mvsz, _rvsz, _ncpu, _rcpu, _appn);
      -&gt; RETURN LAST_INSERT_ID();
      -&gt; END
  ERROR 1304 (42000): FUNCTION xapps_f20160817 already exists
  </code></pre>
  </blockquote>
  
  <p>Try to use:</p>
  
  <blockquote>
  <pre><code>mysql&gt; select xapps_f20160817('100','100','100','100','100','100','100');$$
  ERROR 1305 (42000): FUNCTION xapps_db.xapps_f20160817 does not exist
  </code></pre>
  </blockquote>
  
  <p>Try to find it from function list:</p>
  
  <blockquote>
  <pre><code>mysql&gt; show function status where name='xapps_f20160817';$$
  Empty set (0.00 sec)
  </code></pre>
  </blockquote>
  
  <p>Try to drop it, but it does not exist:</p>
  
  <blockquote>
  <pre><code>mysql&gt; drop function if exists `xapps_f20160817`;$$
  Query OK, 0 rows affected, 1 warning (0.00 sec)
  
  mysql&gt; show warnings;$$
  +-------+------+-----------------------------------------+
  | Level | Code | Message                                 |
  +-------+------+-----------------------------------------+
  | Note  | 1305 | FUNCTION xapps_f20160817 does not exist |
  +-------+------+-----------------------------------------+
  1 row in set (0.01 sec)
  </code></pre>
  </blockquote>
  
  <p>Is it bug of MySQL? How to remove this function correctly?</p>