Created
October 25, 2016 01:06
-
-
Save yoku0825/ec783f4f2b6350a860c4736ad4739d16 to your computer and use it in GitHub Desktop.
`DROP DATABASE` needs Super_priv patch based on MySQL 5.6.16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** sql/sql_db.cc.orig 2014-01-15 00:38:00.000000000 +0900 | |
--- sql/sql_db.cc 2014-02-28 17:13:19.383810416 +0900 | |
*************** | |
*** 44,49 **** | |
--- 44,51 ---- | |
#endif | |
#include "debug_sync.h" | |
+ #include "sql_parse.h" // check_global_access | |
+ | |
#define MAX_DROP_TABLE_Q_LEN 1024 | |
const char *del_exts[]= {".frm", ".BAK", ".TMD", ".opt", ".OLD", NullS}; | |
*************** | |
*** 772,777 **** | |
--- 774,782 ---- | |
bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) | |
{ | |
+ if (check_global_access(thd, SUPER_ACL)) | |
+ DBUG_RETURN(0); | |
+ | |
ulong deleted_tables= 0; | |
bool error= true; | |
char path[2 * FN_REFLEN + 16]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment