Bug #82196 Show warnings will give empty result after running DROP SCHEMA IF EXISTS
Submitted: 12 Jul 2016 8:22 Modified: 12 Jul 2016 9:26
Reporter: Shahriyar Rzayev (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:5.7.13 OS:Any
Assigned to: CPU Architecture:Any

[12 Jul 2016 8:22] Shahriyar Rzayev
Description:
As simple as possible:

mysql> DROP SCHEMA IF EXISTS world_x;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings;
Empty set (0.00 sec)

mysql> SHOW COUNT(*) WARNINGS;
+-------------------------+
| @@session.warning_count |
+-------------------------+
|                       0 |
+-------------------------+
1 row in set (0.00 sec)

How to repeat:
See description

Suggested fix:
No idea :)
[12 Jul 2016 8:26] Roel Van de Paar
To warn or not to warn, that's the missing question
[12 Jul 2016 8:29] Shahriyar Rzayev
hehe @Roel :))

To be clear further:

mysql> DROP SCHEMA IF EXISTS world_x;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> SHOW COUNT(*) WARNINGS;
+-------------------------+
| @@session.warning_count |
+-------------------------+
|                       0 |
+-------------------------+
1 row in set (0.00 sec)
[12 Jul 2016 9:26] Umesh Shastry
Hello Shahriyar,

Thank you for the report.

Thanks,
Umesh
[12 Jul 2018 11:15] Hartmut Holzgraefe
Works fine in MySQL 5.5 (and MariaDB ^0.2.8), still broken in MySQL 5.7.22 and 8.0.11