mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 10:15:29 +02:00
bug with mysql_change_db() fixed
BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
parent
d1782bea92
commit
9914932787
4 changed files with 5 additions and 3 deletions
|
|
@ -264,9 +264,10 @@ bool mysql_change_db(THD *thd,const char *name)
|
|||
send_error(&thd->net,ER_NO_DB_ERROR); /* purecov: inspected */
|
||||
DBUG_RETURN(1); /* purecov: inspected */
|
||||
}
|
||||
if (length > NAME_LEN)
|
||||
if ((length > NAME_LEN) || check_db_name(dbname))
|
||||
{
|
||||
net_printf(&thd->net,ER_WRONG_DB_NAME, dbname);
|
||||
x_free(dbname);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
DBUG_PRINT("general",("Use database: %s", dbname));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue