mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
Fixed memory reference errors found by valgrind
This commit is contained in:
@@ -1911,7 +1911,7 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
|
||||
{
|
||||
DBUG_ENTER("prepare_schema_table");
|
||||
SELECT_LEX *sel= 0;
|
||||
switch(schema_table_idx) {
|
||||
switch (schema_table_idx) {
|
||||
case SCH_SCHEMATA:
|
||||
#if defined(DONT_ALLOW_SHOW_COMMANDS)
|
||||
my_message(ER_NOT_ALLOWED_COMMAND,
|
||||
@@ -1953,7 +1953,11 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
|
||||
thd->priv_user, thd->priv_host, db);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
lex->select_lex.db= db;
|
||||
/*
|
||||
We need to do a copy to make this prepared statement safe if this
|
||||
was thd->db
|
||||
*/
|
||||
lex->select_lex.db= thd->strdup(db);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user