mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
fixed up lock counting code - Monty's suggestions
updated manual about table lock counter fixed coredump in DROP DATABASE with long bogus name by non-root user fixed bug in handling STOP immediately after ROTATE added test case for buffer overrun on DROP DATABASE by non-root user added test case for the STOP bug in replication Docs/manual.texi: updates for Table_locks_immediate and Table_locks_waited include/thr_lock.h: fixes suggested by Monty to lock counts mysql-test/r/status.result: clean up of result for changes in the test case mysql-test/t/status.test: make it produce the same results if the had been some activity on the server already mysys/thr_lock.c: fixes suggested by Monty sql/mysqld.cc: fixes suggested by Monty sql/slave.cc: fixed bug in processing STOP event after rotate sql/sql_base.cc: fixes suggested by Monty sql/sql_parse.cc: fixed coredump in drop database with long name by a non-root user sql/sql_repl.cc: better status message
This commit is contained in:
@ -1886,6 +1886,13 @@ check_access(THD *thd,uint want_access,const char *db, uint *save_priv,
|
||||
|
||||
if (db == any_db)
|
||||
return FALSE; // Allow select on anything
|
||||
|
||||
if (strlen(db) > NAME_LEN || check_db_name(db))
|
||||
{
|
||||
net_printf(&thd->net,ER_WRONG_DB_NAME, db);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (db && (!thd->db || strcmp(db,thd->db)))
|
||||
db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr,
|
||||
thd->priv_user, db); /* purecov: inspected */
|
||||
|
Reference in New Issue
Block a user